xbps-bin: don't make false positives detecting pkgmatches vs pkgnames
while installing packages. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100114030001-0m1cb3m1cf7oc7un
This commit is contained in:
parent
023841b060
commit
37008d3c75
@ -330,11 +330,23 @@ xbps_install_new_pkg(const char *pkg)
|
||||
* Check if 'pkg' string is a pkgmatch valid pattern or it
|
||||
* is just a pkgname.
|
||||
*/
|
||||
if ((pkgname = xbps_get_pkgdep_name(pkg)))
|
||||
pkgmatch = true;
|
||||
else if ((pkgname = xbps_get_pkg_name(pkg)))
|
||||
pkgmatch = true;
|
||||
else
|
||||
if ((pkgname = xbps_get_pkgdep_name(pkg))) {
|
||||
if (xbps_cmpver("0.0", pkgname) <= 0)
|
||||
pkgmatch = true;
|
||||
else {
|
||||
free(pkgname);
|
||||
pkgname = NULL;
|
||||
}
|
||||
}
|
||||
if (pkgname == NULL && (pkgname = xbps_get_pkg_name(pkg))) {
|
||||
if (xbps_cmpver("0.0", pkgname) <= 0)
|
||||
pkgmatch = true;
|
||||
else {
|
||||
free(pkgname);
|
||||
pkgname = NULL;
|
||||
}
|
||||
}
|
||||
if (pkgname == NULL)
|
||||
pkgname = __UNCONST(pkg);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user