xbps-bin: while installing binpkgs, detect properly in some cases its return value.

--HG--
extra : convert_revision : 89cb21eed183c1d9702613690fb7f48f8cceb5e2
This commit is contained in:
Juan RP 2009-02-22 06:00:08 +01:00
parent 2cfb55735b
commit eb2e824a33
2 changed files with 8 additions and 9 deletions

View file

@ -105,8 +105,8 @@ xbps_install_binary_pkg(const char *pkgname, const char *destdir, int flags)
*/
rv = xbps_callback_array_iter_in_repolist(install_binpkg_repo_cb,
(void *)&cb);
if (rv == 0 && errno == EAGAIN)
return ENOENT;
if (rv == 0 && errno != 0)
return errno;
return rv;
}