xbps_pkg_reverts: use version instead of pkgname-version to find reverts
This commit is contained in:
parent
50fb6c1605
commit
dbab3f2cfc
@ -433,6 +433,7 @@ int
|
|||||||
xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) {
|
xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
xbps_array_t reverts;
|
xbps_array_t reverts;
|
||||||
|
const char *version = xbps_pkg_version(pkgver);
|
||||||
const char *revertver;
|
const char *revertver;
|
||||||
|
|
||||||
if ((reverts = xbps_dictionary_get(pkg, "reverts")) == NULL)
|
if ((reverts = xbps_dictionary_get(pkg, "reverts")) == NULL)
|
||||||
@ -440,7 +441,7 @@ xbps_pkg_reverts(xbps_dictionary_t pkg, const char *pkgver) {
|
|||||||
|
|
||||||
for (i = 0; i < xbps_array_count(reverts); i++) {
|
for (i = 0; i < xbps_array_count(reverts); i++) {
|
||||||
xbps_array_get_cstring_nocopy(reverts, i, &revertver);
|
xbps_array_get_cstring_nocopy(reverts, i, &revertver);
|
||||||
if (strcmp(pkgver, revertver) == 0) {
|
if (strcmp(version, revertver) == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user