summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2014-03-12 10:22:40 -0700
committerAaron Plattner <aplattner@nvidia.com>2014-03-12 10:22:40 -0700
commit66b23b2e00b57ef7ea1525bf528b549b4b4a1448 (patch)
tree47f8060d1ec6c56f8205ac0d4c14090cd5fbe5c8
parent299147d127871de31db71d90e5cc64fd6efc5181 (diff)
304.121304.121
-rw-r--r--files.c42
-rw-r--r--nvidia-installer.h13
-rw-r--r--version.mk2
3 files changed, 42 insertions, 15 deletions
diff --git a/files.c b/files.c
index e90a2cf..936d279 100644
--- a/files.c
+++ b/files.c
@@ -2077,23 +2077,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
diff --git a/nvidia-installer.h b/nvidia-installer.h
index cd42866..61d194e 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -470,9 +470,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"
@@ -491,6 +491,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"
diff --git a/version.mk b/version.mk
index fe4f7b7..35ec521 100644
--- a/version.mk
+++ b/version.mk
@@ -1 +1 @@
-NVIDIA_VERSION = 304.119
+NVIDIA_VERSION = 304.121