summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-25 16:39:08 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-25 16:39:08 +0000
commit8c55efcdd98d2f38a2f05167e0532e56c8a87c14 (patch)
tree75ea9822b619084b167b9b9dd284af2978a70961 /sys-apps
parentMark 3.4.3 stable on ia64 (diff)
downloadhistorical-8c55efcdd98d2f38a2f05167e0532e56c8a87c14.tar.gz
historical-8c55efcdd98d2f38a2f05167e0532e56c8a87c14.tar.bz2
historical-8c55efcdd98d2f38a2f05167e0532e56c8a87c14.zip
2.1_pre7 bug fix release
Package-Manager: portage-2.1_pre7
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog9
-rw-r--r--sys-apps/portage/Manifest24
-rw-r--r--sys-apps/portage/files/2.1_pre7/1000_r2994_workdir_mode.patch32
-rw-r--r--sys-apps/portage/files/2.1_pre7/1010_r3004_lazy_virtuals.patch233
-rw-r--r--sys-apps/portage/files/digest-portage-2.1_pre73
-rw-r--r--sys-apps/portage/portage-2.1_pre7.ebuild184
6 files changed, 478 insertions, 7 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index 694190043bd4..db0f0ca4c5f1 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/portage
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.97 2006/03/25 04:08:37 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.98 2006/03/25 16:39:08 zmedico Exp $
+
+*portage-2.1_pre7 (25 Mar 2006)
+
+ 25 Mar 2006; Zac Medico <zmedico@gentoo.org> +portage-2.1_pre7.ebuild,
+ +files/2.1_pre7/1000_r2994_workdir_mode.patch,
+ +files/2.1_pre7/1010_r3004_lazy_virtuals.patch:
+ Bug fix release for 2.1.
*portage-2.1_pre6-r7 (25 Mar 2006)
diff --git a/sys-apps/portage/Manifest b/sys-apps/portage/Manifest
index f65db664c10c..a52a3a8a12da 100644
--- a/sys-apps/portage/Manifest
+++ b/sys-apps/portage/Manifest
@@ -1,9 +1,9 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 2a92c70d42aee6633d1ef9086f8c36db ChangeLog 9958
-RMD160 a03be363b224f488114498739efd411a0d75e287 ChangeLog 9958
-SHA256 e833c63bb83bf185d3ee42ef89d4a100397ab23351f0ca6b71cef2d0145b8072 ChangeLog 9958
+MD5 f7d9c7bc5fd0112ffe20bedf99584bcd ChangeLog 10191
+RMD160 38367ba8a61342b562ddb202bcfeeb612021c004 ChangeLog 10191
+SHA256 66bbfb141dd15cad772add1d373d31351e7dc7738e9077f0db7c74c8c8a30728 ChangeLog 10191
MD5 d5d5b818347fd87b290ecb0b17516b34 files/05portage.envd 34
RMD160 014194a1786a0983a8ba91c3924b798f353c330d files/05portage.envd 34
SHA256 dbe8db19d03b39ad2b7f9f6dfcd24c615a14886b3fe6d5ce4dd88bac27c0e225 files/05portage.envd 34
@@ -64,6 +64,12 @@ SHA256 07b58bd7326ae3a6d8c03aeb877656b4712e60d4b22ab83fe84728976f6cb9c6 files/2.
MD5 71c574fba30ecdc66e30c944da6a5f40 files/2.1_pre6/1170_r2986_bug_127374_selinux_labels.patch 1254
RMD160 271eece2c2a1ab785808b985ee0d3f5b742b8139 files/2.1_pre6/1170_r2986_bug_127374_selinux_labels.patch 1254
SHA256 0337694c3ee59b341580bb11ea335a000479639ba125329dbb3a634abcc37749 files/2.1_pre6/1170_r2986_bug_127374_selinux_labels.patch 1254
+MD5 5347de9da65c2d77b2ae2faf149364a6 files/2.1_pre7/1000_r2994_workdir_mode.patch 1096
+RMD160 39e882bb941f5ac3560b9a5cfa795e957199c51e files/2.1_pre7/1000_r2994_workdir_mode.patch 1096
+SHA256 ce4eb3023d4d2a1a2ca52778b843f90d85a147030e190e2bd2bd4473ea2561d2 files/2.1_pre7/1000_r2994_workdir_mode.patch 1096
+MD5 c2b78a47a57679befb0b05a2983ff321 files/2.1_pre7/1010_r3004_lazy_virtuals.patch 7519
+RMD160 1e1cf9086c235ea9b89a661d6f1e0bdd8dbad72a files/2.1_pre7/1010_r3004_lazy_virtuals.patch 7519
+SHA256 b25090b81b82afeea8492ae2080db1f15130fc1bb9845d0272da36055233050e files/2.1_pre7/1010_r3004_lazy_virtuals.patch 7519
MD5 c906e2e6782e197725b70f84cfe112a4 files/README.RESCUE 137
RMD160 b8d015f266501fd1f57c91899c6815de9f9d5685 files/README.RESCUE 137
SHA256 69bea0c755eab59b6b4d90838b8551744f0b0c8eeac170b1cd13a71ee83f9ac4 files/README.RESCUE 137
@@ -82,6 +88,9 @@ SHA256 31fbf92704c8c3836a781144c1fe6c1a5d7a81e14fa79973821df688baf3f63d files/di
MD5 3fb2faffeb73793f7928e07619991317 files/digest-portage-2.1_pre6-r7 253
RMD160 db4da0bfd99ef42a13051e4089009e9ad3c316c2 files/digest-portage-2.1_pre6-r7 253
SHA256 bf94181b86808452bb19e43fe4d58aeeb6736924e7bd453f38c0f166b227957c files/digest-portage-2.1_pre6-r7 253
+MD5 6aebb952d3a284aa4f52d7e5dc7791de files/digest-portage-2.1_pre7 253
+RMD160 437829798fb49cf829eadb8dd84fd8353eb4fdb1 files/digest-portage-2.1_pre7 253
+SHA256 f96288447c0bb578ae0fb80a0169df536c3421f00df4dd8a83d2e910ca489fb5 files/digest-portage-2.1_pre7 253
MD5 9e669b11a86a57aa8d2a452531085bb6 files/xterm-titles.patch 1115
RMD160 60cea5a3cfd37b6a3a15ced00a778defaca09212 files/xterm-titles.patch 1115
SHA256 0e23efd78cff2d7702a4e3ddcf6b53cd7de417f03234397321281066ea8c026c files/xterm-titles.patch 1115
@@ -103,10 +112,13 @@ SHA256 6f7f1500f7a6ab4a7d651a7dbe44695995fdd2a37e4c6826d5eb9de5749b458a portage-
MD5 da44da773a57bcbbe8f0c52573812d2e portage-2.1_pre6-r7.ebuild 5819
RMD160 1ad330182592ffd5637aabed39f3ba52dc29285d portage-2.1_pre6-r7.ebuild 5819
SHA256 634bed09fc46df9611027f97c3e658c6a11ab237ddc2c774bf10aadeda7f7451 portage-2.1_pre6-r7.ebuild 5819
+MD5 a9ce266c809db4dbb13819c046f74e23 portage-2.1_pre7.ebuild 5355
+RMD160 9124f59e152e5c5e34ffd0216c1292194642336b portage-2.1_pre7.ebuild 5355
+SHA256 b64a1d66de594a73cb17ed24232669a310fe0b89b0d2835a398edccca5ca3fb8 portage-2.1_pre7.ebuild 5355
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
-iD8DBQFEJMJH/ejvha5XGaMRAv4wAJ96Lof6yqEq42CGULwwNxzJfu1OsACgim8B
-or+ztMMm5q+q9xkvNSZ7vmg=
-=eiLh
+iD8DBQFEJXI3/ejvha5XGaMRAiVgAJ9WkNRPMPppVvPJKV6vd0Cl9IUNMQCfSoVm
+aR0qeeh+3xmPgGcLdi312UM=
+=pJHJ
-----END PGP SIGNATURE-----
diff --git a/sys-apps/portage/files/2.1_pre7/1000_r2994_workdir_mode.patch b/sys-apps/portage/files/2.1_pre7/1000_r2994_workdir_mode.patch
new file mode 100644
index 000000000000..e9c2aafec02c
--- /dev/null
+++ b/sys-apps/portage/files/2.1_pre7/1000_r2994_workdir_mode.patch
@@ -0,0 +1,32 @@
+=== modified file 'pym/portage.py'
+--- pym/portage.py
++++ pym/portage.py
+@@ -2613,15 +2613,22 @@
+
+ workdir_mode = 0700
+ try:
+- parsed_mode = int(eval(mysettings["PORTAGE_WORKDIR_MODE"]))
++ mode = mysettings["PORTAGE_WORKDIR_MODE"]
++ if mode.isdigit():
++ parsed_mode = int(mode, 8)
++ elif mode == "":
++ raise KeyError()
++ else:
++ raise ValueError()
+ if parsed_mode & 07777 != parsed_mode:
+- raise ValueError("Invalid file mode: %s" % mysettings["PORTAGE_WORKDIR_MODE"])
++ raise ValueError("Invalid file mode: %s" % mode)
+ else:
+ workdir_mode = parsed_mode
+ except KeyError, e:
+- writemsg("!!! PORTAGE_WORKDIR_MODE is unset, using %s." % oct(workdir_mode))
+- except (ValueError, SyntaxError), e:
+- writemsg("%s\n" % e)
++ writemsg("!!! PORTAGE_WORKDIR_MODE is unset, using %s.\n" % oct(workdir_mode))
++ except ValueError, e:
++ if len(str(e)) > 0:
++ writemsg("%s\n" % e)
+ writemsg("!!! Unable to parse PORTAGE_WORKDIR_MODE='%s', using %s.\n" % \
+ (mysettings["PORTAGE_WORKDIR_MODE"], oct(workdir_mode)))
+ mysettings["PORTAGE_WORKDIR_MODE"] = oct(workdir_mode)
+
diff --git a/sys-apps/portage/files/2.1_pre7/1010_r3004_lazy_virtuals.patch b/sys-apps/portage/files/2.1_pre7/1010_r3004_lazy_virtuals.patch
new file mode 100644
index 000000000000..dba252d6c743
--- /dev/null
+++ b/sys-apps/portage/files/2.1_pre7/1010_r3004_lazy_virtuals.patch
@@ -0,0 +1,233 @@
+=== modified file 'bin/emerge'
+--- bin/emerge
++++ bin/emerge
+@@ -2127,9 +2127,9 @@
+ syslist = []
+ for x in realsyslist:
+ mycp = portage.dep_getkey(x)
+- if mycp in portage.settings.virtuals:
++ if mycp in portage.settings.getvirtuals():
+ providers = []
+- for provider in portage.settings.virtuals[mycp]:
++ for provider in portage.settings.getvirtuals()[mycp]:
+ if portage.db[portage.root]["vartree"].dbapi.match(provider):
+ providers.append(provider)
+ if len(providers) == 1:
+
+=== modified file 'bin/repoman'
+--- bin/repoman
++++ bin/repoman
+@@ -1115,7 +1115,7 @@
+
+ for myprovide in myaux["PROVIDE"].split():
+ prov_cp = portage.dep_getkey(myprovide)
+- if prov_cp not in dep_settings.virtuals:
++ if prov_cp not in dep_settings.getvirtuals():
+ stats["virtual.unavailable"]+=1
+ fails["virtual.unavailable"].append(x+"/"+y+".ebuild: "+keyword+"("+prof[0]+") "+prov_cp)
+
+
+=== modified file 'pym/portage.py'
+--- pym/portage.py
++++ pym/portage.py
+@@ -880,6 +880,8 @@
+ self.modifiedkeys = []
+
+ self.virtuals = {}
++ self.virts_p = {}
++ self.dirVirtuals = None
+ self.v_count = 0
+
+ # Virtuals obtained from the vartree
+@@ -1141,9 +1143,6 @@
+ archlist = stack_lists(archlist, incremental=1)
+ self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist)
+
+- # get virtuals -- needs categories
+- self.loadVirtuals('/')
+-
+ #package.mask
+ pkgmasklines = [grabfile_package(os.path.join(x, "package.mask")) for x in self.profiles]
+ for l in locations:
+@@ -1184,7 +1183,8 @@
+ if not useorder:
+ # reasonable defaults; this is important as without USE_ORDER,
+ # USE will always be "" (nothing set)!
+- useorder="env:pkg:conf:auto:defaults"
++ useorder = "env:pkg:conf:defaults"
++ self.backupenv["USE_ORDER"] = useorder
+ useordersplit=useorder.split(":")
+
+ self.uvlist=[]
+@@ -1258,7 +1258,9 @@
+ self.setcpv(mycpv)
+
+ def loadVirtuals(self,root):
+- self.virtuals = self.getvirtuals(root)
++ """Not currently used by portage."""
++ writemsg("DEPRECATED: portage.config.loadVirtuals\n")
++ self.getvirtuals(root)
+
+ def load_best_module(self,property_string):
+ best_mod = best_from_dict(property_string,self.modules,self.module_priority)
+@@ -1346,6 +1348,8 @@
+ self.reset(keeping_pkg=1,use_cache=use_cache)
+
+ def setinst(self,mycpv,mydbapi):
++ if len(self.virtuals) == 0:
++ self.getvirtuals()
+ # Grab the virtuals this package provides and add them into the tree virtuals.
+ provides = mydbapi.aux_get(mycpv, ["PROVIDE"])[0]
+ if isinstance(mydbapi, portdbapi):
+@@ -1384,7 +1388,7 @@
+ if mykey=="USE":
+ mydbs=self.uvlist
+ # XXX Global usage of db... Needs to go away somehow.
+- if db.has_key(root) and db[root].has_key("vartree"):
++ if "auto" in self["USE_ORDER"].split(":") and db.has_key(root) and db[root].has_key("vartree"):
+ self.configdict["auto"]["USE"]=autouse(db[root]["vartree"],use_cache=use_cache)
+ else:
+ self.configdict["auto"]["USE"]=""
+@@ -1450,7 +1454,20 @@
+
+ self.already_in_regenerate = 0
+
+- def getvirtuals(self, myroot):
++ def get_virts_p(self, myroot):
++ if self.virts_p:
++ return self.virts_p
++ virts = self.getvirtuals(myroot)
++ if virts:
++ myvkeys = virts.keys()
++ for x in myvkeys:
++ vkeysplit = x.split("/")
++ if not self.virts_p.has_key(vkeysplit[1]):
++ self.virts_p[vkeysplit[1]] = virts[x]
++ return self.virts_p
++
++ def getvirtuals(self, myroot="/"):
++ #XXX: due to caching, myroot is ignored on all but the first call
+ if self.virtuals:
+ return self.virtuals
+
+@@ -1504,7 +1521,8 @@
+ # Reduce the provides into a list by CP.
+ self.treeVirtuals = map_dictlist_vals(getCPFromCPV,temp_vartree.get_all_provides())
+
+- return self.__getvirtuals_compile()
++ self.virtuals = self.__getvirtuals_compile()
++ return self.virtuals
+
+ def __getvirtuals_compile(self):
+ """Actually generate the virtuals we have collected.
+@@ -3152,16 +3170,17 @@
+ newsplit.append(dep_virtual(x, mysettings))
+ else:
+ mykey=dep_getkey(x)
+- if mysettings.virtuals.has_key(mykey):
+- if len(mysettings.virtuals[mykey])==1:
+- a=string.replace(x, mykey, mysettings.virtuals[mykey][0])
++ myvirtuals = mysettings.getvirtuals()
++ if myvirtuals.has_key(mykey):
++ if len(myvirtuals[mykey]) == 1:
++ a = string.replace(x, mykey, myvirtuals[mykey][0])
+ else:
+ if x[0]=="!":
+ # blocker needs "and" not "or(||)".
+ a=[]
+ else:
+ a=['||']
+- for y in mysettings.virtuals[mykey]:
++ for y in myvirtuals[mykey]:
+ a.append(string.replace(x, mykey, y))
+ newsplit.append(a)
+ else:
+@@ -3469,6 +3488,9 @@
+
+ def key_expand(mykey,mydb=None,use_cache=1):
+ mysplit=mykey.split("/")
++ global settings
++ virts = settings.getvirtuals("/")
++ virts_p = settings.get_virts_p("/")
+ if len(mysplit)==1:
+ if mydb and type(mydb)==types.InstanceType:
+ for x in settings.categories:
+@@ -3490,6 +3512,9 @@
+ are no installed/available candidates."""
+ myslash=mycpv.split("/")
+ mysplit=pkgsplit(myslash[-1])
++ global settings
++ virts = settings.getvirtuals("/")
++ virts_p = settings.get_virts_p("/")
+ if len(myslash)>2:
+ # this is illegal case.
+ mysplit=[]
+@@ -6612,20 +6637,29 @@
+ return settings.getvirtuals(myroot)
+
+ def do_vartree(mysettings):
+- global virts,virts_p
+- virts=mysettings.getvirtuals("/")
+- virts_p={}
+-
+- if virts:
+- myvkeys=virts.keys()
+- for x in myvkeys:
+- vkeysplit=x.split("/")
+- if not virts_p.has_key(vkeysplit[1]):
+- virts_p[vkeysplit[1]]=virts[x]
+- db["/"]={"virtuals":virts,"vartree":vartree("/",virts)}
++ class LazyVirtualsDict(dict):
++ def __init__(self, myroot):
++ super(LazyVirtualsDict, self).__init__()
++ self.myroot = myroot
++ self["virtuals"] = None
++ def __getitem__(self, key):
++ if "virtuals" == key:
++ if "virtuals" in self:
++ virtuals = super(LazyVirtualsDict, self).__getitem__("virtuals")
++ if virtuals is not None:
++ return virtuals
++ else:
++ global settings
++ virtuals = settings.getvirtuals(self.myroot)
++ self["virtuals"] = virtuals
++ return virtuals
++ return super(LazyVirtualsDict, self).__getitem__(key)
++ global db, root
++ db["/"] = LazyVirtualsDict("/")
++ db["/"]["vartree"] = vartree("/")
+ if root!="/":
+- virts=mysettings.getvirtuals(root)
+- db[root]={"virtuals":virts,"vartree":vartree(root,virts)}
++ db[root] = LazyVirtualsDict(root)
++ db[root]["vartree"] = vartree(root)
+ #We need to create the vartree first, then load our settings, and then set up our other trees
+
+ usedefaults=settings.use_defs
+@@ -6891,7 +6925,7 @@
+ writemsg("%s\n" % msg)
+ update_config_files(myupd)
+
+- db["/"]["bintree"] = binarytree("/", settings["PKGDIR"], virts)
++ db["/"]["bintree"] = binarytree("/", settings["PKGDIR"], settings.getvirtuals("/"))
+ for update_cmd in myupd:
+ if update_cmd[0] == "move":
+ db["/"]["vartree"].dbapi.move_ent(update_cmd)
+@@ -6938,11 +6972,11 @@
+ global_updates()
+
+ #continue setting up other trees
+-db["/"]["porttree"]=portagetree("/",virts)
+-db["/"]["bintree"]=binarytree("/",settings["PKGDIR"],virts)
++db["/"]["porttree"] = portagetree("/")
++db["/"]["bintree"] = binarytree("/", settings["PKGDIR"])
+ if root!="/":
+- db[root]["porttree"]=portagetree(root,virts)
+- db[root]["bintree"]=binarytree(root,settings["PKGDIR"],virts)
++ db[root]["porttree"] = portagetree(root)
++ db[root]["bintree"] = binarytree(root, settings["PKGDIR"])
+
+ profileroots = [settings["PORTDIR"]+"/profiles/"]
+ for x in settings["PORTDIR_OVERLAY"].split():
+
diff --git a/sys-apps/portage/files/digest-portage-2.1_pre7 b/sys-apps/portage/files/digest-portage-2.1_pre7
new file mode 100644
index 000000000000..2892d68c8269
--- /dev/null
+++ b/sys-apps/portage/files/digest-portage-2.1_pre7
@@ -0,0 +1,3 @@
+MD5 a27283b750830207a79325ac4ed4c88d portage-2.1_pre7.tar.bz2 256493
+RMD160 543c4090ee7ade75d8005962b55ebbcf57dfd0b5 portage-2.1_pre7.tar.bz2 256493
+SHA256 14a49c685002c7e9bb39bb0b59310eef3f4509448549977d2c2e718894a4092d portage-2.1_pre7.tar.bz2 256493
diff --git a/sys-apps/portage/portage-2.1_pre7.ebuild b/sys-apps/portage/portage-2.1_pre7.ebuild
new file mode 100644
index 000000000000..2248e2c76364
--- /dev/null
+++ b/sys-apps/portage/portage-2.1_pre7.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/portage-2.1_pre7.ebuild,v 1.1 2006/03/25 16:39:08 zmedico Exp $
+
+inherit toolchain-funcs
+
+DESCRIPTION="The Portage Package Management System. The primary package management and distribution system for Gentoo."
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2 http://dev.gentoo.org/~zmedico/portage/archives/${PN}-${PV}.tar.bz2"
+LICENSE="GPL-2"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
+
+SLOT="0"
+IUSE="build doc selinux"
+DEPEND=">=dev-lang/python-2.3"
+RDEPEND="!build? ( >=sys-apps/sed-4.0.5 \
+ dev-python/python-fchksum \
+ >=dev-lang/python-2.3 \
+ userland_GNU? ( sys-apps/debianutils ) \
+ >=app-shells/bash-2.05a ) \
+ !userland_Darwin? ( >=app-misc/pax-utils-0.1.10 sys-apps/sandbox ) \
+ selinux? ( >=dev-python/python-selinux-2.15 ) \
+ doc? ( app-portage/portage-manpages )
+ >=dev-python/pycrypto-2.0.1-r4"
+
+PROVIDE="virtual/portage"
+
+S=${WORKDIR}/${PN}-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ local my_patches="1000_r2994_workdir_mode.patch
+ 1010_r3004_lazy_virtuals.patch"
+ for patch_name in ${my_patches}; do
+ einfo "Applying ${patch_name} ..."
+ patch -p0 --no-backup-if-mismatch < \
+ "${FILESDIR}"/${PV}/${patch_name} >/dev/null || \
+ die "Failed to apply patch"
+ done
+ if [ "${PR}" != "r0" ]; then
+ einfo "Setting portage.VERSION to ${PVR} ..."
+ sed -i "s/^VERSION=.*/VERSION=\"${PVR}\"/" pym/portage.py || \
+ die "Failed to patch portage.VERSION"
+ fi
+}
+
+src_compile() {
+ python -O -c "import compileall; compileall.compile_dir('${S}/pym')"
+
+ cd "${S}"/src
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o tbz2tool tbz2tool.c || \
+ die "Failed to build tbz2tool"
+
+ if ! use userland_Darwin; then
+ cd "${S}"/src/python-missingos
+ chmod +x setup.py
+ ./setup.py build || die "Failed to build missingos module"
+ fi
+
+ if use elibc_FreeBSD; then
+ cd "${S}"/src/bsd-flags
+ chmod +x setup.py
+ ./setup.py build || die "Failed to install bsd-chflags module"
+ fi
+}
+
+src_install() {
+ cd "${S}"/cnf
+ insinto /etc
+ doins etc-update.conf dispatch-conf.conf make.globals
+ if [ -f "make.conf.${ARCH}".diff ]; then
+ patch make.conf "make.conf.${ARCH}".diff || \
+ die "Failed to patch make.conf.example"
+ newins make.conf make.conf.example
+ else
+ eerror ""
+ eerror "Portage does not have an arch-specific configuration for this arch."
+ eerror "Please notify the arch maintainer about this issue. Using generic."
+ eerror ""
+ newins make.conf make.conf.example
+ fi
+
+ if ! use userland_Darwin; then
+ cd "${S}"/src/python-missingos
+ ./setup.py install --root ${D} || \
+ die "Failed to install missingos module"
+ fi
+
+ if use elibc_FreeBSD; then
+ cd "${S}"/src/bsd-flags
+ ./setup.py install --root ${D} || \
+ die "Failed to install bsd-chflags module"
+ fi
+
+ dodir /usr/lib/portage/bin
+ exeinto /usr/lib/portage/bin
+ cd "${S}"/bin
+ doexe *
+ doexe "${S}"/src/tbz2tool
+ dosym newins /usr/lib/portage/bin/donewins
+
+ for mydir in pym pym/cache pym/elog_modules; do
+ dodir /usr/lib/portage/${mydir}
+ insinto /usr/lib/portage/${mydir}
+ cd "${S}"/${mydir}
+ doins *.py *.pyo
+ done
+
+ doman "${S}"/man/*.[0-9]
+ dodoc "${S}"/ChangeLog
+ dodoc "${S}"/NEWS
+ dodoc "${S}"/RELEASE-NOTES
+
+ dodir /usr/bin
+ for x in ebuild emerge portageq repoman tbz2tool xpak; do
+ dosym ../lib/portage/bin/${x} /usr/bin/${x}
+ done
+
+ dodir /usr/sbin
+ local my_syms="archive-conf
+ dispatch-conf
+ emaint
+ emerge-webrsync
+ env-update
+ etc-update
+ fixpackages
+ quickpkg
+ regenworld"
+ for x in ${my_syms}; do
+ dosym ../lib/portage/bin/${x} /usr/sbin/${x}
+ done
+
+ dodir /etc/portage
+ keepdir /etc/portage
+
+ doenvd "${FILESDIR}"/05portage.envd
+}
+
+pkg_preinst() {
+ if has livecvsportage ${FEATURES} && [ "${ROOT}" = "/" ]; then
+ rm -rf ${IMAGE}/usr/lib/portage/pym/*
+ mv ${IMAGE}/usr/lib/portage/bin/tbz2tool ${T}
+ rm -rf ${IMAGE}/usr/lib/portage/bin/*
+ mv ${T}/tbz2tool ${IMAGE}/usr/lib/portage/bin/
+ else
+ for mydir in pym pym/cache pym/elog_modules; do
+ rm /usr/lib/portage/${mydir}/*.pyc >& /dev/null
+ rm /usr/lib/portage/${mydir}/*.pyo >& /dev/null
+ done
+ fi
+}
+
+pkg_postinst() {
+ local x
+
+ if [ ! -f "${ROOT}/var/lib/portage/world" ] &&
+ [ -f ${ROOT}/var/cache/edb/world ] &&
+ [ ! -h ${ROOT}/var/cache/edb/world ]; then
+ mv ${ROOT}/var/cache/edb/world ${ROOT}/var/lib/portage/world
+ ln -s ../../lib/portage/world /var/cache/edb/world
+ fi
+
+ for x in ${ROOT}etc/._cfg????_make.globals; do
+ # Overwrite the globals file automatically.
+ [ -e "${x}" ] && mv -f "${x}" "${ROOT}etc/make.globals"
+ done
+
+ ewarn "This series contains a completely rewritten caching framework."
+ ewarn "If you are using any cache modules (such as the CDB cache"
+ ewarn "module) portage will not work until they have been disabled."
+ echo
+ einfo "The default cache format has changed between 2.0.x and 2.1"
+ einfo "versions. If you have upgraded from 2.0.x, before using"
+ einfo "emerge, run \`emerge --metadata\` to restore portage's local"
+ einfo "cache."
+ echo
+ einfo "Flag ordering has changed for \`emerge --pretend --verbose\`."
+ einfo "Add EMERGE_DEFAULT_OPTS=\"--alphabetical\" to /etc/make.conf"
+ einfo "to restore the previous ordering."
+ echo
+ einfo "See NEWS and RELEASE-NOTES for further changes."
+}