diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-22 06:27:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-22 06:27:32 +0000 |
commit | 29fd2e335caa465372eb35a1b65ecdf9a37f83a6 (patch) | |
tree | 556544d3719f854f1a67a20841068226a5071e27 /pym | |
parent | e258a70559dfb3720f8370c483241e2487e88a97 (diff) | |
download | portage-29fd2e335caa465372eb35a1b65ecdf9a37f83a6.tar.gz portage-29fd2e335caa465372eb35a1b65ecdf9a37f83a6.tar.bz2 portage-29fd2e335caa465372eb35a1b65ecdf9a37f83a6.zip |
When ${PKGDIR}/All/ doesn't exist, put packages in ${PKGDIR}/${CATEGORY}/ instead. This new layout is backward compatible with portage-2.1.2 and it will be a requirement for new PORTAGE_BINHOST support that is comming.
svn path=/main/trunk/; revision=6568
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 5 | ||||
-rw-r--r-- | pym/portage/dbapi/bintree.py | 13 |
2 files changed, 9 insertions, 9 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 171806f7a..f79b525ed 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3816,11 +3816,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, actionmap[x]["dep"] = ' '.join(actionmap_deps[x]) if mydo in actionmap.keys(): - if mydo=="package": - portage.util.ensure_dirs( - os.path.join(mysettings["PKGDIR"], mysettings["CATEGORY"])) - portage.util.ensure_dirs( - os.path.join(mysettings["PKGDIR"], "All")) retval = spawnebuild(mydo, actionmap, mysettings, debug, logfile=logfile) elif mydo=="qmerge": diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 4a0c70e18..2a9651df5 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -113,6 +113,8 @@ class binarytree(object): self.invalids = [] self.settings = settings self._pkg_paths = {} + self._all_directory = os.path.isdir( + os.path.join(self.pkgdir, "All")) def move_ent(self, mylist): if not self.populated: @@ -285,6 +287,8 @@ class binarytree(object): use for a given cpv. If a collision will occur with an existing package from another category, the existing package will be bumped to ${PKGDIR}/${CATEGORY}/${PF}.tbz2 so that both can coexist.""" + if not self._all_directory: + return if not self.populated: # Try to avoid the population routine when possible, so that # FEATURES=buildpkg doesn't always force population. @@ -357,8 +361,6 @@ class binarytree(object): "populates the binarytree" if (not os.path.isdir(self.pkgdir) and not getbinpkgs): return 0 - if (not os.path.isdir(self.pkgdir+"/All") and not getbinpkgs): - return 0 categories = set(self.settings.categories) @@ -500,8 +502,11 @@ class binarytree(object): if mypath: return os.path.join(self.pkgdir, mypath) mycat, mypkg = catsplit(mycpv) - mypath = os.path.join("All", mypkg + ".tbz2") - if mypath in self._pkg_paths.values(): + if self._all_directory: + mypath = os.path.join("All", mypkg + ".tbz2") + if mypath in self._pkg_paths.values(): + mypath = os.path.join(mycat, mypkg + ".tbz2") + else: mypath = os.path.join(mycat, mypkg + ".tbz2") self._pkg_paths[mycpv] = mypath # cache for future lookups return os.path.join(self.pkgdir, mypath) |