From 993c2790a5c848d36c13135ad8a889c99426563e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 8 May 2009 17:26:06 +0000 Subject: [PATCH] xbps-bin: while updating a package, install reqdeps properly. --HG-- extra : convert_revision : 4bf0e7965a802a0f30e90d1ec1c0eb94bdbfe1d3 --- bin/xbps-bin/install.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/xbps-bin/install.c b/bin/xbps-bin/install.c index 65f5ccfb495..6d66f88ad1d 100644 --- a/bin/xbps-bin/install.c +++ b/bin/xbps-bin/install.c @@ -78,7 +78,7 @@ xbps_install_pkg(const char *pkg, bool force, bool update) const char *pkgname, *version; char size[64]; int rv = 0; - bool pkg_is_dep, first = false; + bool pkg_is_dep, doup = false, first = false; assert(props != NULL); @@ -260,7 +260,10 @@ xbps_install_pkg(const char *pkg, bool force, bool update) /* * Register binary package. */ - if ((rv = xbps_register_pkg(obj, update, pkg_is_dep)) != 0) { + if (update && !pkg_is_dep) + doup = true; + + if ((rv = xbps_register_pkg(obj, doup, pkg_is_dep)) != 0) { printf("error: registering %s-%s! (%s)\n", pkgname, version, strerror(rv)); prop_object_release(props);