diff --git a/NEWS b/NEWS index 2944196c..d3fc5ed7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ -xbps-0.21 (???): +xbps-0.22 (???): + + * When checking for obsolete files in upgrades, ignore unexistent files in + current package; this was hitting an assertion due to this. + +xbps-0.21 (2013-03-11): * libxbps: improved code to find obsolete pkg files in upgrades. Now the code compares the whole file list between current and new package. A test has been diff --git a/lib/package_find_obsoletes.c b/lib/package_find_obsoletes.c index 874b1379..51d6ddb4 100644 --- a/lib/package_find_obsoletes.c +++ b/lib/package_find_obsoletes.c @@ -104,8 +104,10 @@ xbps_find_pkg_obsoletes(struct xbps_handle *xhp, for (i = 0; i < prop_array_count(instfiles); i++) { found = false; obj = prop_array_get(instfiles, i); - assert(prop_object_type(obj) == PROP_TYPE_DICTIONARY); - + if (prop_object_type(obj) != PROP_TYPE_DICTIONARY) { + /* ignore unexistent files */ + continue; + } oldstr = prop_dictionary_get(obj, "file"); if (oldstr == NULL) continue;