Store name of source repository in vdb node for later comparison
authorMarius Mauch <genone@gentoo.org>
Fri, 29 Jun 2007 08:03:46 +0000 (08:03 -0000)
committerMarius Mauch <genone@gentoo.org>
Fri, 29 Jun 2007 08:03:46 +0000 (08:03 -0000)
svn path=/main/trunk/; revision=7087

pym/portage/dbapi/vartree.py

index 61a80a1d0a28241cc4c60faae21db28649e3141c..ac4edbddb6b2f0ee28b87e3fad777eb3c3c800cb 100644 (file)
@@ -1699,6 +1699,16 @@ 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])
+               if mydbapi != None:
+                       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()
+                                       break
+
                # write local package counter for recording
                lcfile = open(os.path.join(self.dbtmpdir, "COUNTER"),"w")
                lcfile.write(str(counter))