Simplify and share common code in xbps_repository_{update,install}_pkg().

This commit is contained in:
Juan RP
2011-01-24 18:49:24 +01:00
parent 0bb0838982
commit 72d82a3a26
2 changed files with 142 additions and 189 deletions

View File

@@ -322,7 +322,7 @@ xbps_install_new_pkg(const char *pkg)
return 0;
}
if ((rv = xbps_repository_install_pkg(pkgpatt)) != 0) {
if (rv == EAGAIN) {
if (rv == ENOENT) {
fprintf(stderr, "xbps-bin: unable to locate '%s' in "
"repository pool.\n", pkg);
rv = -1;