xbps-bin: fix pkgpattern to install new pkgs.

This commit is contained in:
Juan RP 2012-01-24 20:48:54 +01:00
parent 9a1f05ee89
commit 9becfc29d2

View File

@ -252,11 +252,11 @@ install_new_pkg(const char *pkg, bool reinstall)
pkgpatt = __UNCONST(pkg); pkgpatt = __UNCONST(pkg);
} else { } else {
/* /*
* If only pkgname has been specified, always append * If only pkgname has been specified, always make it
* '-[0-9]*' at the end, will be easier to parse. * use a package pattern, i.e 'foo>=0'.
*/ */
pkgmatch = true; pkgmatch = true;
pkgpatt = xbps_xasprintf("%s%s", pkg, "-[0-9]*"); pkgpatt = xbps_xasprintf("%s%s", pkg, ">=0");
if (pkgpatt == NULL) if (pkgpatt == NULL)
return -1; return -1;
} }