diff --git a/include/xbps_api.h b/include/xbps_api.h index 459ec0cc..11bd17c0 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 "20120531" +#define XBPS_API_VERSION "20120601" #define XBPS_VERSION "0.16" /** diff --git a/lib/plist_remove.c b/lib/plist_remove.c index 6496a716..cb7d40a0 100644 --- a/lib/plist_remove.c +++ b/lib/plist_remove.c @@ -79,8 +79,10 @@ remove_obj_from_array(prop_array_t array, const char *str, int mode, /* match by pkgname, obj is a dictionary */ chkarch = prop_dictionary_get_cstring_nocopy(obj, "architecture", &arch); - if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) + if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) { + idx++; continue; + } prop_dictionary_get_cstring_nocopy(obj, "pkgname", &curname); if (strcmp(curname, str) == 0) { @@ -90,8 +92,10 @@ remove_obj_from_array(prop_array_t array, const char *str, int mode, } else if (mode == 3) { chkarch = prop_dictionary_get_cstring_nocopy(obj, "architecture", &arch); - if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) + if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) { + idx++; continue; + } /* match by pkgver, obj is a dictionary */ prop_dictionary_get_cstring_nocopy(obj, "pkgver", &curname); @@ -102,8 +106,10 @@ remove_obj_from_array(prop_array_t array, const char *str, int mode, } else if (mode == 4) { chkarch = prop_dictionary_get_cstring_nocopy(obj, "architecture", &arch); - if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) + if (chkarch && !xbps_pkg_arch_match(arch, targetarch)) { + idx++; continue; + } /* match by pattern, obj is a dictionary */ prop_dictionary_get_cstring_nocopy(obj, "pkgver", &curname);