summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-13 23:37:09 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-13 23:37:09 +0000
commit07a30d06a771507f6483bfa4593930041dbbc824 (patch)
treec1dd1a589f1a62a4f8920013744cdbc7b0a41a3d /pym
parentfffee6384c42c706909f0804304d2af0ea521c1e (diff)
downloadportage-07a30d06a771507f6483bfa4593930041dbbc824.tar.gz
portage-07a30d06a771507f6483bfa4593930041dbbc824.tar.bz2
portage-07a30d06a771507f6483bfa4593930041dbbc824.zip
Save the repo name along with the other metadata inside dyn_compile() so that it's saved inside binary packages for when they are finally merged.
svn path=/main/trunk/; revision=7247
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py10
-rw-r--r--pym/portage/dbapi/vartree.py15
2 files changed, 10 insertions, 15 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index da9f499ab..822f813be 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -3279,6 +3279,16 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
mysettings["ROOT"] = myroot
mysettings["STARTDIR"] = getcwd()
+ mysettings["PORTAGE_REPO_NAME"] = ""
+ # bindbapi has no getRepositories() method
+ if mydbapi and hasattr(mydbapi, "getRepositories"):
+ # do we have a origin repository name for the current package
+ repopath = os.sep.join(pkg_dir.split(os.path.sep)[:-2])
+ for reponame in mydbapi.getRepositories():
+ if mydbapi.getRepositoryPath(reponame) == repopath:
+ mysettings["PORTAGE_REPO_NAME"] = reponame
+ break
+
mysettings["EBUILD"] = ebuild_path
mysettings["O"] = pkg_dir
mysettings.configdict["pkg"]["CATEGORY"] = cat
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 0060b5715..fd543d5cd 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1736,21 +1736,6 @@ class dblink(object):
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
- if not foundname:
- ewarn("Could not determine name of source repository at %s" % repopath, phase="preinst", key=self.mycpv)
-
# write local package counter for recording
lcfile = open(os.path.join(self.dbtmpdir, "COUNTER"),"w")
lcfile.write(str(counter))