diff options
author | Nagy Gabor <ngaba@bibl.u-szeged.hu> | 2009-04-13 15:08:38 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-05-19 06:11:05 +0200 |
commit | 882bff36acad5c47df5b35fd3afb411dc4f092b0 (patch) | |
tree | fa66989dc055132998537c0b8622efc0d903bad5 /pactest/pmfile.py | |
parent | f89f7e136ba8d923680a6d0342d5e51d4fda1570 (diff) | |
download | pacman-882bff36acad5c47df5b35fd3afb411dc4f092b0.tar.gz pacman-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/pmfile.py')
0 files changed, 0 insertions, 0 deletions