diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2014-02-18 11:23:09 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2014-02-18 11:23:09 -0800 |
commit | 719dd3c25c5d14f6149ee410df2792a5665b6c9f (patch) | |
tree | 440a2a300a5a56a0d6b39838a98ac93b98da83af | |
parent | e49143d67bf5c67efb9293455d5d69d068c23e6c (diff) |
331.49331.49
-rw-r--r-- | backup.c | 9 | ||||
-rw-r--r-- | files.c | 42 | ||||
-rw-r--r-- | kernel.c | 4 | ||||
-rw-r--r-- | manifest.c | 3 | ||||
-rw-r--r-- | nvidia-installer.h | 13 | ||||
-rw-r--r-- | version.mk | 2 |
6 files changed, 52 insertions, 21 deletions
@@ -541,7 +541,7 @@ int log_mkdir(Options *op, const char *dirs) */ static int reverse_strlen_compare(const void *a, const void *b) { - return strlen((const char *)b) - strlen((const char *)a); + return strlen(*(char * const *)b) - strlen(*(char * const *)a); } @@ -557,7 +557,7 @@ static int reverse_strlen_compare(const void *a, const void *b) static int rmdir_recursive(Options *op) { FILE *log; - char *dir, **dirs; + char **dirs; int eof = FALSE, ret = TRUE, lines, i; /* open the log file */ @@ -572,6 +572,7 @@ static int rmdir_recursive(Options *op) /* Count the number of lines */ for (lines = 0; !eof; lines++) { + char *dir; dir = fget_next_line(log, &eof); nvfree(dir); } @@ -586,11 +587,11 @@ static int rmdir_recursive(Options *op) qsort(dirs, lines, sizeof(char*), reverse_strlen_compare); - for (i = lines; i < lines; i++) { + for (i = 0; i < lines; i++) { if (dirs[i]) { /* Ignore empty lines and the backup directory itself, since it is * never empty as long as the dirs file is still around. */ - if (strlen(dirs[i]) && strcmp(dir, BACKUP_DIRECTORY) != 0) { + if (strlen(dirs[i]) && strcmp(dirs[i], BACKUP_DIRECTORY) != 0) { if (rmdir(dirs[i]) != 0) { ui_log(op, "Failed to delete the directory '%s' (%s).", dirs[i], strerror(errno)); @@ -2175,23 +2175,43 @@ void get_default_prefixes_and_paths(Options *op) if (op->distro == DEBIAN && !op->compat32_chroot) { /* - * Newer versions of Debian have moved to the Ubuntu style of compat32 - * path, so use that if it exists. + * Newer versions of Debian install 32-bit compatibility libraries + * to dedicated directories that are not part of a chroot structure. + * Search for the known paths and use the first one that is found. */ - char *default_path = nvstrcat(op->compat32_prefix, "/" - UBUNTU_DEFAULT_COMPAT32_LIBDIR, NULL); - struct stat buf; - if (lstat(default_path, &buf) < 0 || S_ISLNK(buf.st_mode)) { + + char *debian_compat32_paths[] = { DEBIAN_DEFAULT_COMPAT32_LIBDIR, + UBUNTU_DEFAULT_COMPAT32_LIBDIR }; + int i, found = FALSE; + + for (i = 0; i < ARRAY_LEN(debian_compat32_paths); i++) { + char *default_path = nvstrcat(op->compat32_prefix, "/", + debian_compat32_paths[i], NULL); + + struct stat buf; + + if (lstat(default_path, &buf) == 0 && !S_ISLNK(buf.st_mode)) { + /* path exists and is not a symbolic link, so use it */ + op->compat32_libdir = debian_compat32_paths[i]; + found = TRUE; + } + + nvfree(default_path); + + if (found) { + break; + } + } + + if (!found) { /* - * Path doesn't exist or is a symbolic link. Use the compat32 + * Paths don't exist or are symbolic links. Use the compat32 * chroot path instead. */ + op->compat32_chroot = DEBIAN_DEFAULT_COMPAT32_CHROOT; - } else { - /* <prefix>/lib32 exists, so use that */ - op->compat32_libdir = UBUNTU_DEFAULT_COMPAT32_LIBDIR; } - nvfree(default_path); + } #endif @@ -598,11 +598,13 @@ static int build_kernel_module_helper(Options *op, const char *dir, ui_status_end(op, "Error."); ui_error(op, "Unable to build the %s kernel module.", module); /* XXX need more descriptive error message */ + + return FALSE; } ui_status_end(op, "done."); - return ret == 0; + return TRUE; } @@ -173,7 +173,8 @@ void get_installable_file_type_list( continue; } - if ((type == FILE_TYPE_KERNEL_MODULE_SRC) && + if (((type == FILE_TYPE_KERNEL_MODULE_SRC) || + (type == FILE_TYPE_UVM_MODULE_SRC)) && op->no_kernel_module_source) { continue; } diff --git a/nvidia-installer.h b/nvidia-installer.h index 904d43c..6ec5d0a 100644 --- a/nvidia-installer.h +++ b/nvidia-installer.h @@ -443,9 +443,9 @@ typedef struct __package { #define XORG7_DEFAULT_X_MODULEDIR "xorg/modules" /* - * Debian GNU/Linux for x86-64 installs 32-bit compatibility - * libraries relative to a chroot-like top-level directory; the - * prefix below is prepended to the full paths. + * Older versions of Debian GNU/Linux for x86-64 install 32-bit + * compatibility libraries relative to a chroot-like top-level + * directory; the prefix below is prepended to the full paths. */ #define DEBIAN_DEFAULT_COMPAT32_CHROOT "/emul/ia32-linux" @@ -464,6 +464,13 @@ typedef struct __package { */ #define UBUNTU_DEFAULT_COMPAT32_LIBDIR "lib32" +/* + * Newer versions of Debian GNU/Linux may install 32-bit + * compatibility libraries to ../lib/i386-linux-gnu instead + * of ../lib32. + */ + +#define DEBIAN_DEFAULT_COMPAT32_LIBDIR "lib/i386-linux-gnu" #define DEFAULT_PROC_MOUNT_POINT "/proc" @@ -1 +1 @@ -NVIDIA_VERSION = 331.38 +NVIDIA_VERSION = 331.49 |