summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2009-05-14 18:25:16 +0200
committerDan McGee <dan@archlinux.org>2009-07-23 03:16:52 +0200
commit1d19f0896ccc1560a7e2f5b93cfe095b4aefe84a (patch)
treefc8916e5fb63e474d3cdcd8af937b1c6d07d811d /lib/libalpm/trans.c
parentca6ef852f9944ad31e8a136f7faf71da2c5fb57f (diff)
downloadpacman-1d19f0896ccc1560a7e2f5b93cfe095b4aefe84a.tar.gz
pacman-1d19f0896ccc1560a7e2f5b93cfe095b4aefe84a.tar.xz
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 <ngaba@bibl.u-szeged.hu> [Dan: slight doc reword] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c4
1 files changed, 2 insertions, 2 deletions
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.