rindex_pkgdeps.c: simplify and reduce (a bit).

This commit is contained in:
Juan RP 2012-11-30 08:21:20 +01:00
parent 15b148fb51
commit 9715d8a6a1

View File

@ -179,11 +179,8 @@ find_repo_deps(struct xbps_handle *xhp,
* Pass 1: check if required dependency is already installed * Pass 1: check if required dependency is already installed
* and its version is fully matched. * and its version is fully matched.
*/ */
/* if (((tmpd = xbps_pkgdb_get_pkg(xhp, reqpkg)) == NULL) &&
* Look for a real package installed... ((tmpd = xbps_pkgdb_get_virtualpkg(xhp, reqpkg)) == NULL)) {
*/
tmpd = xbps_pkgdb_get_pkg(xhp, reqpkg);
if (tmpd == NULL) {
if (errno && errno != ENOENT) { if (errno && errno != ENOENT) {
/* error */ /* error */
rv = errno; rv = errno;
@ -192,21 +189,6 @@ find_repo_deps(struct xbps_handle *xhp,
reqpkg, strerror(errno)); reqpkg, strerror(errno));
break; break;
} }
/*
* real package not installed, try looking for
* a virtual package instead.
*/
tmpd = xbps_pkgdb_get_virtualpkg(xhp, reqpkg);
if (errno && errno != ENOENT) {
/* error */
rv = errno;
xbps_dbg_printf(xhp, "failed to find "
"installed virtual pkg for `%s': %s\n",
reqpkg, strerror(errno));
break;
}
}
if (tmpd == NULL) {
/* Required pkgdep not installed */ /* Required pkgdep not installed */
xbps_dbg_printf_append(xhp, "not installed "); xbps_dbg_printf_append(xhp, "not installed ");
reason = "install"; reason = "install";