summaryrefslogtreecommitdiffstats
path: root/pactest/tests
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2009-04-13 15:08:38 +0200
committerDan McGee <dan@archlinux.org>2009-05-18 23:11:05 -0500
commit882bff36acad5c47df5b35fd3afb411dc4f092b0 (patch)
treefa66989dc055132998537c0b8622efc0d903bad5 /pactest/tests
parentf89f7e136ba8d923680a6d0342d5e51d4fda1570 (diff)
downloadpacman-882bff36acad5c47df5b35fd3afb411dc4f092b0.tar.xz
Remove find_replacements()
"Foo replaces bar" simply means that "foo is a new version of bar". So this patch refactors the code to use this "rule". _alpm_sync_sysupgrade now does the following for each local package [bar] (pseudo-code): for db in syncdbs { if(db contains bar) {check if db/bar is an upgrade; break;} replacers = find(bar replacers in db); if(replacers!=NULL) {ask_user; break;} } Note: 1. Replacers are grouped per repo. If more than one package replace bar in a repo, all of them are considered ("package set of bar replacers"). 2. If repo1/foo1 and repo2/foo2 both replaces bar, only repo1/foo1 is considered (if repo1 stands before repo2 in pacman.conf). FS#11737 is fixed. 3. It can happen that pacman doesn't consider any replacer, if it found a literal "earlier", so sync132.py modified accordingly (btw, that situation should not appear irl). The new sysupgrade code doesn't use sync_newversion(), so I removed the "local is newer than repo" message, which was annoying with -Qu and SyncFirst. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'pactest/tests')
-rw-r--r--pactest/tests/sync132.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pactest/tests/sync132.py b/pactest/tests/sync132.py
index 5e85727d..2d671c73 100644
--- a/pactest/tests/sync132.py
+++ b/pactest/tests/sync132.py
@@ -14,5 +14,5 @@ self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("!PKG_EXIST=pkg2")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")