1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

added ALLDEPS transaction flag mainly to handle "makepkg -s"

This commit is contained in:
Aurelien Foret 2006-01-10 18:19:06 +00:00
parent ec305c1443
commit 668e58626d
4 changed files with 5 additions and 8 deletions

View File

@ -176,9 +176,9 @@ int add_loadtarget(pmtrans_t *trans, pmdb_t *db, char *name)
goto error;
}
/* set the reason to EXPLICIT by default
* it will be overwritten in the case of an upgrade or a sync operation */
info->reason = PM_PKG_REASON_EXPLICIT;
if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
info->reason = PM_PKG_REASON_EXPLICIT;
}
/* add the package to the transaction */
trans->packages = pm_list_add(trans->packages, info);

View File

@ -214,6 +214,7 @@ enum {
#define PM_TRANS_FLAG_CASCADE 0x10
#define PM_TRANS_FLAG_RECURSE 0x20
#define PM_TRANS_FLAG_DBONLY 0x40
#define PM_TRANS_FLAG_ALLDEPS 0x80
/* Transaction Events */
enum {

View File

@ -62,7 +62,7 @@ pmpkg_t *pkg_new(const char *name, const char *version)
pkg->size = 0;
pkg->scriptlet = 0;
pkg->force = 0;
pkg->reason = 0;
pkg->reason = PM_PKG_REASON_EXPLICIT;
pkg->requiredby = NULL;
pkg->conflicts = NULL;
pkg->files = NULL;

View File

@ -690,11 +690,7 @@ int sync_commit(pmtrans_t *trans, pmdb_t *db_local, PMList **data)
* end of the tr->packages list */
spkg = _alpm_list_last(tr->packages)->data;
if(sync->type == PM_SYNC_TYPE_DEPEND) {
/* ORE
* if called from makepkg, reason should be set to PM_PKG_REASON_DEPEND */
spkg->reason = PM_PKG_REASON_DEPEND;
} else {
spkg->reason = PM_PKG_REASON_EXPLICIT;
}
}
if(trans_prepare(tr, data) == -1) {