From 1d19f0896ccc1560a7e2f5b93cfe095b4aefe84a Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Thu, 14 May 2009 18:25:16 +0200 Subject: Introduce -Suu If the user switches from unstable repo to a stable one, it is quite hard to sync its system with the new repo (the user will see many "Local is newer than stable" messages, nothing more). That's why I introduced -Suu, which treats a sync package like an upgrade, iff the package version doesn't match with the local one's. I added a new pactest (sync104.py) to test this, and I updated the documentation of -Su. Signed-off-by: Nagy Gabor [Dan: slight doc reword] Signed-off-by: Dan McGee --- lib/libalpm/trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index d1c0e930..6e847e64 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -89,7 +89,7 @@ int SYMEXPORT alpm_trans_init(pmtranstype_t type, pmtransflag_t flags, /** Search for packages to upgrade and add them to the transaction. * @return 0 on success, -1 on error (pm_errno is set accordingly) */ -int SYMEXPORT alpm_trans_sysupgrade() +int SYMEXPORT alpm_trans_sysupgrade(int enable_downgrade) { pmtrans_t *trans; @@ -102,7 +102,7 @@ int SYMEXPORT alpm_trans_sysupgrade() ASSERT(trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1)); ASSERT(trans->type == PM_TRANS_TYPE_SYNC, RET_ERR(PM_ERR_TRANS_TYPE, -1)); - return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync)); + return(_alpm_sync_sysupgrade(trans, handle->db_local, handle->dbs_sync, enable_downgrade)); } /** Add a target to the transaction. -- cgit v1.2.3-54-g00ecf