From cd762bc0b821c5cf81a747af3848d639842bfe33 Mon Sep 17 00:00:00 2001 From: Marius Mauch Date: Thu, 5 Jul 2007 06:00:00 +0000 Subject: [PATCH] backport r7087 and r7093 to ease the upgrade to 2.2 wrt verbose pretend display svn path=/main/branches/2.1.2/; revision=7156 --- pym/portage.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index c325f2040..3552f8e44 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7667,6 +7667,19 @@ class dblink: for x in listdir(inforoot): self.copyfile(inforoot+"/"+x) + # do we have a origin repository name for the current package + repopath = os.sep.join(self.settings["O"].split(os.sep)[:-2]) + # bindbapi has no getRepositories() method + if mydbapi and hasattr(mydbapi, "getRepositories"): + foundname = False + for reponame in mydbapi.getRepositories(): + if mydbapi.getRepositoryPath(reponame) == repopath: + fd = open(os.path.join(self.dbtmpdir, "repository"), "w") + fd.write(reponame+"\n") + fd.close() + foundname = True + break + # get current counter value (counter_tick also takes care of incrementing it) # XXX Need to make this destroot, but it needs to be initialized first. XXX # XXX bis: leads to some invalidentry() call through cp_all(). -- 2.26.2