Add the concept of purging a package, such as with dpkg.

By default a package when is removed, its configuration files
and metadata files won't be removed unless the package is purged.

While here add two targets for xbps-bin:

 * purge [<pkgname>|<all>], passing the "all" string (case insensitive)
   will purge all packages that are in this state (XBPS_PKG_STATE_CONFIG_FILES).

 * reconfigure [<pkgname>|<all>], reconfigures a package or "all"
   if package hasn't been configured. Passing -f reconfigures it again
   even if it's state is ok.

--HG--
extra : convert_revision : bd2d3913ca087a0565b05fa9ee3f9b6d5e3cb934
This commit is contained in:
Juan RP 2009-08-13 16:46:20 +02:00
parent 09cede6d8a
commit 0d04547576
10 changed files with 389 additions and 195 deletions

View file

@ -415,10 +415,7 @@ exec_transaction(struct transaction *trans)
*/
while ((obj = prop_object_iterator_next(trans->iter)) != NULL) {
prop_dictionary_get_cstring_nocopy(obj, "pkgname", &pkgname);
prop_dictionary_get_cstring_nocopy(obj, "version", &version);
printf("Configuring package %s-%s ...\n", pkgname, version);
if ((rv = xbps_configure_pkg(pkgname, version)) != 0) {
if ((rv = xbps_configure_pkg(pkgname)) != 0) {
printf("Error configuring package %s-%s\n",
pkgname, version);
return rv;