When checking for obsolete files ignore unexistent files.

This commit is contained in:
Juan RP 2013-03-13 22:08:13 +01:00
parent db5ddf0578
commit b5d141e28c
2 changed files with 10 additions and 3 deletions

7
NEWS
View File

@ -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

View File

@ -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;