summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-13 07:00:11 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-13 07:00:11 +0000
commit3f79789781bdb03c78ce44e1e6e798828e459259 (patch)
tree912f4bca104c6d085cbd755fb4c085d7493a0dd0 /sys-apps
parentupdate HOMEPAGE #129653 by Salah Coronya (diff)
downloadgentoo-2-3f79789781bdb03c78ce44e1e6e798828e459259.tar.gz
gentoo-2-3f79789781bdb03c78ce44e1e6e798828e459259.tar.bz2
gentoo-2-3f79789781bdb03c78ce44e1e6e798828e459259.zip
2.1_pre8-r3 bug fix revbump
(Portage version: 2.1_pre8-r3)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog8
-rw-r--r--sys-apps/portage/files/2.1/pre8/1070_r3136_bug_129737_digest.patch122
-rw-r--r--sys-apps/portage/files/digest-portage-2.1_pre8-r33
-rw-r--r--sys-apps/portage/portage-2.1_pre8-r3.ebuild193
4 files changed, 325 insertions, 1 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index b8919d84a9e6..4a4f4bd03296 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,12 @@
# 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.109 2006/04/12 08:14:13 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.110 2006/04/13 07:00:11 zmedico Exp $
+
+*portage-2.1_pre8-r3 (13 Apr 2006)
+
+ 13 Apr 2006; <zmedico@gentoo.org> +portage-2.1_pre8-r3.ebuild,
+ +files/2.1/pre8/1070_r3136_bug_129737_digest.patch:
+ Bug fix revbump for #129737.
*portage-2.1_pre8-r2 (12 Apr 2006)
diff --git a/sys-apps/portage/files/2.1/pre8/1070_r3136_bug_129737_digest.patch b/sys-apps/portage/files/2.1/pre8/1070_r3136_bug_129737_digest.patch
new file mode 100644
index 000000000000..87b7dc7f8032
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre8/1070_r3136_bug_129737_digest.patch
@@ -0,0 +1,122 @@
+=== modified file 'pym/portage.py'
+--- pym/portage.py
++++ pym/portage.py
+@@ -2060,33 +2060,20 @@
+ return 1
+
+ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0):
+- """generates digest file if missing. Assumes all files are available. If
+- overwrite=0, the digest will only be created if it doesn't already exist.
++ """Generates a digest file if missing. Assumes all files are available.
+ DEPRECATED: this now only is a compability wrapper for
+- portage_manifest.Manifest()"""
+-
+- # NOTE: manifestonly is useless with manifest2 and therefore ignored
+- # NOTE: the old code contains a lot of crap that should really be elsewhere
+- # (e.g. cvs stuff should be in ebuild(1) and/or repoman)
+- # TODO: error/exception handling
+-
++ portage_manifest.Manifest()
++ NOTE: manifestonly and overwrite are useless with manifest2 and
++ are therefore ignored."""
+ global settings
+ mf = Manifest(mysettings["O"], FetchlistDict(mysettings["O"], mysettings), mysettings["DISTDIR"])
+- mf.create(assumeDistfileHashes=True)
+- for f in myarchives:
+- # the whole type evaluation is only for the case that myarchives isn't a
+- # DIST file as create() determines the type on its own
+- writemsg(">>> Creating Manifest for %s\n" % mysettings["O"])
+- try:
+- writemsg(">>> Adding digests for file %s\n" % f)
+- mf.updateHashesGuessType(f, checkExisting=False, reuseExisting=not os.path.exists(os.path.join(mysettings["DISTDIR"], f)))
+- except portage_exception.FileNotFound, e:
+- writemsg("!!! File %s doesn't exist, can't update Manifest\n" % str(e))
+- return 0
+- # NOTE: overwrite=0 is only used by emerge --digest, not sure we wanna keep that
+- if overwrite or not os.path.exists(mf.getFullname()):
+- mf.write(sign=False)
+-
++ writemsg(">>> Creating Manifest for %s\n" % mysettings["O"])
++ try:
++ mf.create(assumeDistfileHashes=True, requiredDistfiles=myarchives)
++ except portage_exception.FileNotFound, e:
++ writemsg("!!! File %s doesn't exist, can't update Manifest\n" % str(e))
++ return 0
++ mf.write(sign=False)
+ return 1
+
+ def digestParseFile(myfilename, mysettings=None):
+
+=== modified file 'pym/portage_manifest.py'
+--- pym/portage_manifest.py
++++ pym/portage_manifest.py
+@@ -3,7 +3,8 @@
+ # $Header: $
+
+ import errno, os, sets
+-from itertools import imap
++if not hasattr(__builtins__, "set"):
++ from sets import Set as set
+
+ import portage_exception, portage_versions, portage_const
+ from portage_checksum import *
+@@ -135,6 +136,15 @@
+ for cpv in cpvlist:
+ dname = os.path.join(self.pkgdir, "files", "digest-%s" % self._catsplit(cpv)[1])
+ distlist = self._getCpvDistfiles(cpv)
++ have_all_checksums = True
++ for f in distlist:
++ if f not in self.fhashdict["DIST"] or len(self.fhashdict["DIST"][f]) == 0:
++ have_all_checksums = False
++ break
++ if not have_all_checksums:
++ # We don't have all the required checksums to generate a proper
++ # digest, so we have to skip this cpv.
++ continue
+ update_digest = True
+ if not force:
+ try:
+@@ -275,10 +285,13 @@
+ return t
+ return None
+
+- def create(self, checkExisting=False, assumeDistfileHashes=True):
++ def create(self, checkExisting=False, assumeDistfileHashes=True, requiredDistfiles=None):
+ """ Recreate this Manifest from scratch, not using any existing checksums
+ (exception: if assumeDistfileHashes is true then existing DIST checksums are
+- reused if the file doesn't exist in DISTDIR."""
++ reused if the file doesn't exist in DISTDIR. The requiredDistfiles
++ parameter specifies a list of distfiles to raise a FileNotFound
++ exception for (if no file or existing checksums are available), and
++ defaults to all distfiles when not specified."""
+ if checkExisting:
+ self.checkAllHashes()
+ if assumeDistfileHashes:
+@@ -308,18 +321,21 @@
+ self.fhashdict["AUX"][f] = perform_multiple_checksums(
+ os.path.join(self.pkgdir, "files", f.lstrip(os.sep)), self.hashes)
+ cpvlist = [os.path.join(self._pkgdir_category(), x[:-7]) for x in os.listdir(self.pkgdir) if x.endswith(".ebuild")]
+- distlist = []
++ distlist = set()
+ for cpv in cpvlist:
+- distlist.extend(self._getCpvDistfiles(cpv))
++ distlist.update(self._getCpvDistfiles(cpv))
++ if requiredDistfiles is None or len(requiredDistfiles) == 0:
++ # repoman passes in an empty list, which implies that all distfiles
++ # are required.
++ requiredDistfiles = distlist.copy()
+ for f in distlist:
+ fname = os.path.join(self.distdir, f)
+ if os.path.exists(fname):
+ self.fhashdict["DIST"][f] = perform_multiple_checksums(fname, self.hashes)
+ elif assumeDistfileHashes and f in distfilehashes:
+ self.fhashdict["DIST"][f] = distfilehashes[f]
+- else:
+- raise FileNotFound(fname)
+-
++ elif f in requiredDistfiles:
++ raise FileNotFound(fname)
+ def _pkgdir_category(self):
+ return self.pkgdir.rstrip(os.sep).split(os.sep)[-2]
+
+
diff --git a/sys-apps/portage/files/digest-portage-2.1_pre8-r3 b/sys-apps/portage/files/digest-portage-2.1_pre8-r3
new file mode 100644
index 000000000000..0766c33a8e88
--- /dev/null
+++ b/sys-apps/portage/files/digest-portage-2.1_pre8-r3
@@ -0,0 +1,3 @@
+MD5 9e46a3fdb720c1d746525f82e74c3eaa portage-2.1_pre8.tar.bz2 258150
+RMD160 4cfb15ee4fcddae8b53166a810649a98349591ea portage-2.1_pre8.tar.bz2 258150
+SHA256 b5c2d9c0af4f392b3b8e0325ad6b76d908c11ddb32019117155fb4c2ef1a6804 portage-2.1_pre8.tar.bz2 258150
diff --git a/sys-apps/portage/portage-2.1_pre8-r3.ebuild b/sys-apps/portage/portage-2.1_pre8-r3.ebuild
new file mode 100644
index 000000000000..3d4ec50f0d95
--- /dev/null
+++ b/sys-apps/portage/portage-2.1_pre8-r3.ebuild
@@ -0,0 +1,193 @@
+# 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_pre8-r3.ebuild,v 1.1 2006/04/13 07:00:11 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 ~x86-fbsd"
+
+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 ) \
+ elibc_glibc? ( sys-apps/sandbox )
+ elibc_uclibc? ( sys-apps/sandbox )
+ !userland_Darwin? ( >=app-misc/pax-utils-0.1.10 )
+ 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_r3120_fetchlist_dict.patch
+ 1010_r3123_manifest2_fixes.patch
+ 1020_r3118_bug_121368.patch
+ 1030_r3128_bug_129559_qmerge.patch
+ 1040_r3126_bug_129244_ebuild_phase.patch
+ 1050_r3133_lazy_items.patch
+ 1060_r3134_porttrees_realpath.patch
+ 1070_r3136_bug_129737_digest.patch"
+ local patches_dir="${PV%_*}/${PV/*_}"
+ for patch_name in ${my_patches}; do
+ einfo "Applying ${patch_name} ..."
+ patch -p0 --no-backup-if-mismatch < \
+ "${FILESDIR}"/${patches_dir}/${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."
+}