From 9edd60c3a77aa141ce6819e2579657f0bb270337 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 14 Jul 2012 12:11:55 +0200 Subject: [PATCH] libxbps: extend the list of symlinks in rootdir to be ignored. --- NEWS | 7 ++++++- include/xbps_api.h | 2 +- lib/package_remove_obsoletes.c | 16 ++++++---------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 151ef9c1..423ffaac 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ -xbps-0.16.5 (???): +xbps-0.16.5 (2012-07-14): + + * xbps.conf: remove obsolete remote repositories. + + * libxbps: extend the list of ignored symlinks in rootfs if they were found + as obsoletes at package upgrade time. * libxbps: at package register time a new string object in pkgdb is added "install-date" that records the package installation date with the following diff --git a/include/xbps_api.h b/include/xbps_api.h index ea9cfc06..145edb0a 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -56,7 +56,7 @@ */ #define XBPS_PKGINDEX_VERSION "1.5" -#define XBPS_API_VERSION "20120711" +#define XBPS_API_VERSION "20120714" #define XBPS_VERSION "0.16.5" /** diff --git a/lib/package_remove_obsoletes.c b/lib/package_remove_obsoletes.c index 8626900d..a0d6c729 100644 --- a/lib/package_remove_obsoletes.c +++ b/lib/package_remove_obsoletes.c @@ -48,7 +48,7 @@ xbps_remove_obsoletes(struct xbps_handle *xhp, prop_string_t oldstr, newstr; struct stat st; const char *array_str = "files"; - const char *oldhash, *hash; + const char *oldhash; char *file; int rv = 0; bool found, dodirs = false, dolinks = false; @@ -119,20 +119,12 @@ again: goto out; } /* - * Skip files with same path and/or hash. + * Skip files with same path. */ if (prop_string_equals(oldstr, newstr)) { found = true; break; } - - hash = NULL; - prop_dictionary_get_cstring_nocopy(obj2, - "sha256", &hash); - if (hash && strcmp(hash, oldhash) == 0) { - found = true; - break; - } } prop_object_iterator_reset(iter2); if (found) { @@ -144,8 +136,12 @@ again: * system transition to /usr. */ if ((strcmp(file, "./bin") == 0) || + (strcmp(file, "./bin/") == 0) || (strcmp(file, "./sbin") == 0) || + (strcmp(file, "./sbin/") == 0) || (strcmp(file, "./lib") == 0) || + (strcmp(file, "./lib/") == 0) || + (strcmp(file, "./lib64/") == 0) || (strcmp(file, "./lib64") == 0)) { free(file); continue;