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);
} else {
/*
* If only pkgname has been specified, always append
* '-[0-9]*' at the end, will be easier to parse.
* If only pkgname has been specified, always make it
* use a package pattern, i.e 'foo>=0'.
*/
pkgmatch = true;
pkgpatt = xbps_xasprintf("%s%s", pkg, "-[0-9]*");
pkgpatt = xbps_xasprintf("%s%s", pkg, ">=0");
if (pkgpatt == NULL)
return -1;
}