xbps_remove_pkg: don't unregister pkg while updating.

--HG--
extra : convert_revision : 94b1a99f3799838f676a496028032347b40210d3
This commit is contained in:
Juan RP 2009-08-10 00:33:11 +02:00
parent 1f901fb737
commit 90b9325fbd
1 changed files with 7 additions and 5 deletions

View File

@ -367,11 +367,13 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
if (rv != 0)
return rv;
/*
* Unregister pkg from database.
*/
if ((rv = xbps_unregister_pkg(pkgname)) != 0)
return rv;
if (update == false) {
/*
* Unregister pkg from database.
*/
if ((rv = xbps_unregister_pkg(pkgname)) != 0)
return rv;
}
/*
* Remove pkg metadata directory.