summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-04-23 08:21:39 +0000
committerZac Medico <zmedico@gentoo.org>2006-04-23 08:21:39 +0000
commit828e9553bc126097e60e03eaec17e5434bce8312 (patch)
tree20b41359333bec129e9fe42db4d47e3c5583fd31 /sys-apps
parentVersion bump #130879 by Alon Bar-Lev. (diff)
downloadgentoo-2-828e9553bc126097e60e03eaec17e5434bce8312.tar.gz
gentoo-2-828e9553bc126097e60e03eaec17e5434bce8312.tar.bz2
gentoo-2-828e9553bc126097e60e03eaec17e5434bce8312.zip
2.1_pre9-r4 bug fix revbump
(Portage version: 2.1_pre9-r4)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/portage/ChangeLog12
-rw-r--r--sys-apps/portage/files/2.1/pre9/1070_r3184_bug_130750_distfiles_size.patch66
-rw-r--r--sys-apps/portage/files/2.1/pre9/1080_r3185_bug_116796_download_size.patch38
-rw-r--r--sys-apps/portage/files/2.1/pre9/1090_r3189_bug_130824_pkgdir_sandbox.patch15
-rw-r--r--sys-apps/portage/files/2.1/pre9/1100_r3193_manifest_size.patch15
-rw-r--r--sys-apps/portage/files/2.1/pre9/1110_r3194_bug_130928.patch24
-rw-r--r--sys-apps/portage/files/digest-portage-2.1_pre9-r43
-rw-r--r--sys-apps/portage/portage-2.1_pre9-r4.ebuild210
8 files changed, 382 insertions, 1 deletions
diff --git a/sys-apps/portage/ChangeLog b/sys-apps/portage/ChangeLog
index 856d09c38659..5d634d957869 100644
--- a/sys-apps/portage/ChangeLog
+++ b/sys-apps/portage/ChangeLog
@@ -1,6 +1,16 @@
# 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.120 2006/04/22 20:21:12 antarus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/portage/ChangeLog,v 1.121 2006/04/23 08:21:39 zmedico Exp $
+
+*portage-2.1_pre9-r4 (23 Apr 2006)
+
+ 23 Apr 2006; Zac Medico <zmedico@gentoo.org> +portage-2.1_pre9-r4.ebuild,
+ +files/2.1/pre9/1070_r3184_bug_130750_distfiles_size.patch,
+ +files/2.1/pre9/1080_r3185_bug_116796_download_size.patch,
+ +files/2.1/pre9/1090_r3189_bug_130824_pkgdir_sandbox.patch,
+ +files/2.1/pre9/1100_r3193_manifest_size.patch,
+ +files/2.1/pre9/1110_r3194_bug_130928.patch:
+ 2.1_pre9-r4 bug fix revbump for #116796, #130750, #130824, and #116796.
*portage-2.1_pre9-r3 (22 Apr 2006)
diff --git a/sys-apps/portage/files/2.1/pre9/1070_r3184_bug_130750_distfiles_size.patch b/sys-apps/portage/files/2.1/pre9/1070_r3184_bug_130750_distfiles_size.patch
new file mode 100644
index 000000000000..d19243a0aff9
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre9/1070_r3184_bug_130750_distfiles_size.patch
@@ -0,0 +1,66 @@
+Modified: bin/emerge
+===================================================================
+--- bin/emerge 2006-04-21 08:58:17 UTC (rev 3183)
++++ bin/emerge 2006-04-21 19:07:30 UTC (rev 3184)
+@@ -784,27 +784,21 @@
+ mysum = [0,0]
+ mycat = match.split("/")[0]
+ mypkg = match.split("/")[1]
++ mycpv = match + "-" + myversion
++ myebuild = portage.portdb.findname(mycpv)
++ pkgdir = os.path.dirname(myebuild)
++ import portage_manifest
++ mf = portage_manifest.Manifest(pkgdir,
++ portage.FetchlistDict(pkgdir, portage.settings),
++ portage.settings["DISTDIR"])
++ mysum[0] = mf.getDistfilesSize(mf.fetchlist_dict[mycpv])
++ mystr = str(mysum[0]/1024)
++ mycount=len(mystr)
++ while (mycount > 3):
++ mycount-=3
++ mystr=mystr[:mycount]+","+mystr[mycount:]
++ mysum[0]=mystr+" kB"
+
+- mydigest = portage.db["/"]["porttree"].dbapi.finddigest(mycat+"/"+mypkg + "-" + myversion)
+-
+- try:
+- myfile = open(mydigest,"r")
+- for line in myfile.readlines():
+- mysum[0] += int(line.split(" ")[3])
+- myfile.close()
+- mystr = str(mysum[0]/1024)
+- mycount=len(mystr)
+- while (mycount > 3):
+- mycount-=3
+- mystr=mystr[:mycount]+","+mystr[mycount:]
+- mysum[0]=mystr+" kB"
+- except SystemExit, e:
+- raise # Needed else can't exit
+- except Exception, e:
+- if edebug:
+- print "!!! Exception:",e
+- mysum[0]=" [no/bad digest]"
+-
+ if "--quiet" not in myopts:
+ print " ", darkgreen("Latest version available:"),myversion
+ print " ", self.getInstallationStatus(mycat+'/'+mypkg)
+
+Modified: pym/portage_manifest.py
+===================================================================
+--- pym/portage_manifest.py 2006-04-21 08:58:17 UTC (rev 3183)
++++ pym/portage_manifest.py 2006-04-21 19:07:30 UTC (rev 3184)
+@@ -486,7 +486,13 @@
+ def _getCpvDistfiles(self, cpv):
+ """ Get a list of all DIST files associated to the given cpv """
+ return self.fetchlist_dict[cpv]
+-
++
++ def getDistfilesSize(self, fetchlist):
++ total_bytes = 0
++ for f in fetchlist:
++ total_bytes += int(self.fhashdict["DIST"][f]["size"])
++ return total_bytes
++
+ def updateFileHashes(self, ftype, fname, checkExisting=True, ignoreMissing=True, reuseExisting=False):
+ """ Regenerate hashes for the given file """
+ if checkExisting:
diff --git a/sys-apps/portage/files/2.1/pre9/1080_r3185_bug_116796_download_size.patch b/sys-apps/portage/files/2.1/pre9/1080_r3185_bug_116796_download_size.patch
new file mode 100644
index 000000000000..9e39e5817db6
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre9/1080_r3185_bug_116796_download_size.patch
@@ -0,0 +1,38 @@
+Modified: pym/portage.py
+===================================================================
+--- pym/portage.py 2006-04-21 19:07:30 UTC (rev 3184)
++++ pym/portage.py 2006-04-21 22:34:41 UTC (rev 3185)
+@@ -4802,12 +4802,27 @@
+ #XXX: maybe this should be improved: take partial downloads
+ # into account? check checksums?
+ for myfile in myfiles:
+- if debug and myfile not in checksums.keys():
+- print "[bad digest]: missing",myfile,"for",mypkg
+- elif myfile in checksums.keys():
+- distfile=settings["DISTDIR"]+"/"+myfile
+- if not os.access(distfile, os.R_OK):
+- filesdict[myfile]=int(checksums[myfile]["size"])
++ if myfile not in checksums:
++ if debug:
++ writemsg("[bad digest]: missing %s for %s\n" % (myfile, mypkg))
++ continue
++ file_path = os.path.join(self.mysettings["DISTDIR"], myfile)
++ mystat = None
++ try:
++ mystat = os.stat(file_path)
++ except OSError, e:
++ pass
++ if mystat is None:
++ existing_size = 0
++ else:
++ existing_size = mystat.st_size
++ remaining_size = int(checksums[myfile]["size"]) - existing_size
++ if remaining_size > 0:
++ # Assume the download is resumable.
++ filesdict[myfile] = remaining_size
++ elif remaining_size < 0:
++ # The existing file is too large and therefore corrupt.
++ filesdict[myfile] = int(checksums[myfile]["size"])
+ return filesdict
+
+ def fetch_check(self, mypkg, useflags=None, mysettings=None, all=False):
diff --git a/sys-apps/portage/files/2.1/pre9/1090_r3189_bug_130824_pkgdir_sandbox.patch b/sys-apps/portage/files/2.1/pre9/1090_r3189_bug_130824_pkgdir_sandbox.patch
new file mode 100644
index 000000000000..04b9e0b9d44c
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre9/1090_r3189_bug_130824_pkgdir_sandbox.patch
@@ -0,0 +1,15 @@
+Modified: bin/misc-functions.sh
+===================================================================
+--- bin/misc-functions.sh 2006-04-22 01:10:28 UTC (rev 3188)
++++ bin/misc-functions.sh 2006-04-22 19:46:07 UTC (rev 3189)
+@@ -349,7 +349,9 @@
+ install_mask "${PORTAGE_BUILDDIR}/image" ${PKG_INSTALL_MASK}
+ local pkg_dest="${PKGDIR}/All/${PF}.tbz2"
+ local pkg_tmp="${PKGDIR}/All/${PF}.tbz2.$$"
+- addwrite "${PKGDIR}"
++ # Sandbox is disabled in case the user wants to use a symlink
++ # for $PKGDIR and/or $PKGDIR/All.
++ export SANDBOX_ON="0"
+ tar cpvf - ./ | bzip2 -f > "${pkg_tmp}" || die "Failed to create tarball"
+ cd ..
+ python -c "import xpak; t=xpak.tbz2('${pkg_tmp}'); t.recompose('${PORTAGE_BUILDDIR}/build-info')"
diff --git a/sys-apps/portage/files/2.1/pre9/1100_r3193_manifest_size.patch b/sys-apps/portage/files/2.1/pre9/1100_r3193_manifest_size.patch
new file mode 100644
index 000000000000..6c907480efbb
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre9/1100_r3193_manifest_size.patch
@@ -0,0 +1,15 @@
+Modified: pym/portage_manifest.py
+===================================================================
+--- pym/portage_manifest.py 2006-04-22 20:12:47 UTC (rev 3191)
++++ pym/portage_manifest.py 2006-04-23 06:34:43 UTC (rev 3193)
+@@ -321,8 +321,9 @@
+ myhashkeys = myhashes.keys()
+ myhashkeys.sort()
+ for h in myhashkeys:
+- yield Manifest1Entry(type="AUX", name=digest_path,
+- hashes={"size":myhashes["size"], h:myhashes[h]})
++ if h in portage_const.MANIFEST1_HASH_FUNCTIONS:
++ yield Manifest1Entry(type="AUX", name=digest_path,
++ hashes={"size":myhashes["size"], h:myhashes[h]})
+ except FileNotFound:
+ pass
diff --git a/sys-apps/portage/files/2.1/pre9/1110_r3194_bug_130928.patch b/sys-apps/portage/files/2.1/pre9/1110_r3194_bug_130928.patch
new file mode 100644
index 000000000000..cbed8f4d4152
--- /dev/null
+++ b/sys-apps/portage/files/2.1/pre9/1110_r3194_bug_130928.patch
@@ -0,0 +1,24 @@
+Modified: pym/portage_manifest.py
+===================================================================
+--- pym/portage_manifest.py 2006-04-23 06:34:43 UTC (rev 3193)
++++ pym/portage_manifest.py 2006-04-23 07:23:40 UTC (rev 3194)
+@@ -465,10 +465,15 @@
+
+ def checkFileHashes(self, ftype, fname, ignoreMissing=False):
+ myhashes = self.fhashdict[ftype][fname]
+- ok,reason = verify_all(self._getAbsname(ftype, fname), self.fhashdict[ftype][fname])
+- if not ok:
+- raise DigestException(tuple([self._getAbsname(ftype, fname)]+list(reason)))
+- return ok, reason
++ try:
++ ok,reason = verify_all(self._getAbsname(ftype, fname), self.fhashdict[ftype][fname])
++ if not ok:
++ raise DigestException(tuple([self._getAbsname(ftype, fname)]+list(reason)))
++ return ok, reason
++ except FileNotFound, e:
++ if not ignoreMissing:
++ raise
++ return False, "File Not Found: '%s'" % str(e)
+
+ def checkCpvHashes(self, cpv, checkDistfiles=True, onlyDistfiles=False, checkMiscfiles=False):
+ """ check the hashes for all files associated to the given cpv, include all
diff --git a/sys-apps/portage/files/digest-portage-2.1_pre9-r4 b/sys-apps/portage/files/digest-portage-2.1_pre9-r4
new file mode 100644
index 000000000000..b8605c1727f7
--- /dev/null
+++ b/sys-apps/portage/files/digest-portage-2.1_pre9-r4
@@ -0,0 +1,3 @@
+MD5 da49b427cd47b47cca13703d7e3f5949 portage-2.1_pre9.tar.bz2 260738
+RMD160 6a31123ff904395c5d22f631241293e808b5f94f portage-2.1_pre9.tar.bz2 260738
+SHA256 aef6464ee7bb732038e31250252d544c81ad642691ee78fb2f90074b92c9d726 portage-2.1_pre9.tar.bz2 260738
diff --git a/sys-apps/portage/portage-2.1_pre9-r4.ebuild b/sys-apps/portage/portage-2.1_pre9-r4.ebuild
new file mode 100644
index 000000000000..16a8bfba47f1
--- /dev/null
+++ b/sys-apps/portage/portage-2.1_pre9-r4.ebuild
@@ -0,0 +1,210 @@
+# 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_pre9-r4.ebuild,v 1.1 2006/04/23 08:21:39 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 ~m68k ~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}
+
+portage_docs() {
+ einfo ""
+ einfo "For help with using portage please consult the Gentoo Handbook"
+ einfo "at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3"
+ einfo ""
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ local my_patches="1000_r3171_readDigests.patch
+ 1010_r3173_bug_57445_gpgsign.patch
+ 1020_r3176_bug_130406_bz.patch
+ 1030_r3177_bug_130541_auto_manifest.patch
+ 1040_r3178_bug_127585_other_phase.patch
+ 1050_r3179_commitmsgfile.patch
+ 1060_r3181_gpg_dir.patch
+ 1070_r3184_bug_130750_distfiles_size.patch
+ 1080_r3185_bug_116796_download_size.patch
+ 1090_r3189_bug_130824_pkgdir_sandbox.patch
+ 1100_r3193_manifest_size.patch
+ 1110_r3194_bug_130928.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
+ # BSD and OSX need a sed wrapper so that find/xargs work properly
+ if ! use userland_GNU; then
+ doexe ${FILESDIR}/sed
+ fi
+ 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."
+
+ portage_docs
+}