diff options
author | Michał Górny <gentoo@mgorny.alt.pl> | 2010-07-05 11:21:23 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-27 16:13:16 -0700 |
commit | ad54ccc5c9dff04ffa47daf87f1364e6ec17a9ef (patch) | |
tree | 2fb42e2ee59ebb7c235738dd07950b28568e40fc /pym/portage/dbapi/__init__.py | |
parent | 53f820a855cc9c817424c4705ca6f7b72b63e31e (diff) | |
download | portage-ad54ccc5c9dff04ffa47daf87f1364e6ec17a9ef.tar.gz portage-ad54ccc5c9dff04ffa47daf87f1364e6ec17a9ef.tar.bz2 portage-ad54ccc5c9dff04ffa47daf87f1364e6ec17a9ef.zip |
Support repository-wide updates.
Support reading repository-wide update files. Apply them as long as the
'repository' for vardb entry matches the repository update is
originating from. For world and configuration files, use the best vardb
match.
Diffstat (limited to 'pym/portage/dbapi/__init__.py')
-rw-r--r-- | pym/portage/dbapi/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 2467cb54e..c2e7989b8 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -230,10 +230,11 @@ class dbapi(object): if onProgress: onProgress(maxval, i+1) - def move_slot_ent(self, mylist): + def move_slot_ent(self, mylist, repo_name = None): """This function takes a sequence: Args: mylist: a sequence of (package, originalslot, newslot) + repo_name: repository from which update is originated Returns: The number of slotmoves this function did """ @@ -248,6 +249,8 @@ class dbapi(object): slot = self.aux_get(mycpv, ["SLOT"])[0] if slot != origslot: continue + if repo_name and self.aux_get(mycpv, ['repository'])[0] != repo_name: + continue moves += 1 mydata = {"SLOT": newslot+"\n"} self.aux_update(mycpv, mydata) |