From 12db11ab68bf67fbaf9f2d212628f2afa9d60e07 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 21 Jan 2007 20:55:09 +0000 Subject: [PATCH] Merged from trunk 5740:5746 Use XARGS for portable xargs handling when find doesn't find any files. Minor fixes thanks to Fabio Correa in bug #162647. Don't require MANIFEST2 hashes since that can trigger excessive fetches when sufficient digests already exist. Thanks to vapier for reporting. To ease transition while Manifest 1 is being removed, only require hashes that will exist before and after the transition. svn path=/main/branches/prefix/; revision=5748 --- bin/ecompressdir | 2 +- man/emerge.1 | 14 +++++++------- pym/portage.py | 8 ++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/ecompressdir b/bin/ecompressdir index da388874d..cf834ba45 100755 --- a/bin/ecompressdir +++ b/bin/ecompressdir @@ -28,7 +28,7 @@ for dir in "$@" ; do vecho "${0##*/}: $(ecompress --bin) ${dir#${D}}" fi - find "${dir}" -type f '!' -name '*'${suffix} -print0 | xargs -0 ecompress + find "${dir}" -type f '!' -name '*'${suffix} -print0 | ${XARGS} -0 ecompress ((ret+=$?)) find -L "${dir}" -type l | \ while read brokenlink ; do diff --git a/man/emerge.1 b/man/emerge.1 index 5c2110ee6..671ca4d24 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -23,10 +23,10 @@ updated packages available. \fBemerge\fR gracefully handles updating installed packages to newer releases as well. It handles both source and binary packages, and it can be used to create binary packages for distribution. -.SH "EBUILDS, TBZ2S, SETS AND DEPENDENCIES" +.SH "EBUILDS, TBZ2S, SETS AND ATOMS" \fBemerge\fR primarily installs packages. You can specify packages to install in one of four main ways: an \fIebuild\fR, -a \fItbz2file\fR, a \fIset\fR, or a \fIatom\fR. +a \fItbz2file\fR, a \fIset\fR, or an \fIatom\fR. .LP .TP .BR ebuild @@ -39,8 +39,8 @@ as \fBsys\-apps/portage\fR or \fB=python\-2.2.1\-r2\fR. ignores a trailing slash so that filename completion can be used. The \fIebuild\fR may also be an actual filename, such as \fB/usr/portage/app\-admin/python/python\-2.2.1\-r2.ebuild\fR. -WARNING: The implementation of \fBemerge /path/to/ebuild\fR is broken and so -this syntax shouldn't be used. +\fBWARNING:\fR The implementation of \fBemerge /path/to/ebuild\fR is broken and +so this syntax shouldn't be used. .TP .BR tbz2file A \fItbz2file\fR must be a valid .tbz2 created with \fBebuild @@ -390,9 +390,9 @@ in order to indicate their status: .BR "\-\-with\-bdeps < y | n >" In dependency calculations, pull in build time dependencies that are not strictly required. This defaults to \'n\' for installation actions and -\'y\' for the \-\-depclean action. This setting can be added to -EMERGE_DEFAULT_OPTS (see make.conf(5)) and later overridden via the command -line. +\'y\' for the \fB\-\-depclean\fR action. This setting can be added to +\fBEMERGE_DEFAULT_OPTS\fR (see make.conf(5)) and later overridden via the +command line. .SH "ENVIRONMENT OPTIONS" .TP \fBROOT\fR = \fI[path]\fR diff --git a/pym/portage.py b/pym/portage.py index 8d2135ade..94d147cf9 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2707,8 +2707,12 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None distfiles_map.setdefault(myfile, []).append(cpv) mf = Manifest(mysettings["O"], mysettings["DISTDIR"], fetchlist_dict=fetchlist_dict) - required_hash_types = set(portage_const.MANIFEST1_HASH_FUNCTIONS) - required_hash_types.update(portage_const.MANIFEST2_HASH_FUNCTIONS) + # Don't require all hashes since that can trigger excessive + # fetches when sufficient digests already exist. To ease transition + # while Manifest 1 is being removed, only require hashes that will + # exist before and after the transition. + required_hash_types = set(portage_const.MANIFEST1_HASH_FUNCTIONS + ).intersection(portage_const.MANIFEST2_HASH_FUNCTIONS) required_hash_types.add("size") dist_hashes = mf.fhashdict.get("DIST", {}) missing_hashes = set() -- 2.26.2