ldconfig_aux-cache_path_fix.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. Upstream-Status: Pending
  2. Coming from this bug: http://sourceware.org/bugzilla/show_bug.cgi?id=11149
  3. Nitin A Kamble <nitin.a.kamble@intel.com>2011/03/29
  4. --- ldconfig-native-2.12.1.orig/ldconfig.c
  5. +++ ldconfig-native-2.12.1/ldconfig.c
  6. @@ -1359,14 +1359,9 @@ main (int argc, char **argv)
  7. const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
  8. if (opt_chroot)
  9. - {
  10. - aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
  11. - if (aux_cache_file == NULL)
  12. - error (EXIT_FAILURE, errno, _("Can't open cache file %s\n"),
  13. - _PATH_LDCONFIG_AUX_CACHE);
  14. - }
  15. + aux_cache_file = chroot_canon (opt_chroot, aux_cache_file);
  16. - if (! opt_ignore_aux_cache)
  17. + if (! opt_ignore_aux_cache && aux_cache_file)
  18. load_aux_cache (aux_cache_file);
  19. else
  20. init_aux_cache ();
  21. @@ -1376,7 +1371,8 @@ main (int argc, char **argv)
  22. if (opt_build_cache)
  23. {
  24. save_cache (cache_file);
  25. - save_aux_cache (aux_cache_file);
  26. + if (aux_cache_file)
  27. + save_aux_cache (aux_cache_file);
  28. }
  29. return 0;