Make it possible to overwrite the "automatic-install" pkg object via xbps_init().

Two new booleans were added to struct xbps_handle: install_reason_{auto,manual}.
The backend is able to force auto or manual installation for a package (and
dependencies that were installed/updated) by setting to true any of those
booleans. Bump XBPS_RELVER.
This commit is contained in:
Juan RP
2011-02-26 11:11:45 +01:00
parent 2c644c6587
commit 8191a1511c
2 changed files with 27 additions and 10 deletions

View File

@ -53,7 +53,7 @@
* @def XBPS_RELVER
* Current library release date.
*/
#define XBPS_RELVER "20110224"
#define XBPS_RELVER "20110225"
/**
* @def XBPS_META_PATH
@ -193,6 +193,23 @@ struct xbps_handle {
* Set to true to enable debugging messages to stderr.
*/
bool with_debug;
/**
* @var install_reason_auto
*
* Set to true to make installed or updated target package
* (and its dependencies) marked with automatic installation,
* thus it will be found as orphan if no packages are depending
* on it.
*/
bool install_reason_auto;
/**
* @var install_reason_manual
*
* Set to true to make installed or updated target package
* (and its dependencies) marked with manual installation, thus
* it will never will be found as orphan.
*/
bool install_reason_manual;
};
/**