* [gentoo-commits] portage r15837 - in main/branches/prefix: bin man pym/_emerge pym/portage
@ 2010-03-20 18:31 Fabian Groffen (grobian)
0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2010-03-20 18:31 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2010-03-20 18:31:13 +0000 (Sat, 20 Mar 2010)
New Revision: 15837
Modified:
main/branches/prefix/bin/ebuild
main/branches/prefix/bin/ebuild.sh
main/branches/prefix/bin/emerge
main/branches/prefix/bin/repoman
main/branches/prefix/man/emerge.1
main/branches/prefix/man/make.conf.5
main/branches/prefix/man/portage.5
main/branches/prefix/pym/_emerge/BinpkgExtractorAsync.py
main/branches/prefix/pym/_emerge/help.py
main/branches/prefix/pym/portage/update.py
Log:
Merged from trunk -r15825:15835
| 15826 | Update SIGPIPE comments to refer to "[Errno 32] Broken pipe" |
| zmedico | exceptions since this is signal hander now set automatically |
| | for subprocesses after the fork in portage.process.spawn(). |
| 15827 | Revert tar error handling changes from bug #309001 since we |
| zmedico | can't necessarily trust tar exist status alone (reverts |
| | r15820 and r15821). |
| 15828 | Bug #299095 - Always use UTF-8 codec when opening ebuilds, |
| zmedico | to avoid UnicodeDecodeError with python3. |
| 15829 | Add a TODO note about adding a registration interface for |
| zmedico | eclasses to register phase hooks, in order to migrate away |
| | from global scope useq() calls. |
| 15830 | Fix breakage from previous commit. |
| zmedico | |
| 15831 | Bug #309699 - Update --emptytree docs. Thanks to Ben Kohler |
| zmedico | <bkohler@gmail.com> for wording suggestions. |
| 15832 | Bug #309907 - Fix update_config_files() to handle |
| zmedico | package.license. |
| 15833 | Bug #310135 - Skip the changelog.ebuildadded for all |
| zmedico | distributed SCMs. |
| 15834 | Note that use.local.desc is automatically generated, and |
| zmedico | refer to GLEP 56. |
| 15835 | Fix typo. |
| zmedico | |
Modified: main/branches/prefix/bin/ebuild
===================================================================
--- main/branches/prefix/bin/ebuild 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/bin/ebuild 2010-03-20 18:31:13 UTC (rev 15837)
@@ -17,7 +17,8 @@
signal.signal(signal.SIGINT, exithandler)
signal.signal(signal.SIGTERM, exithandler)
- # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
+ # Prevent "[Errno 32] Broken pipe" exceptions when
+ # writing to a pipe.
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
except KeyboardInterrupt:
Modified: main/branches/prefix/bin/ebuild.sh
===================================================================
--- main/branches/prefix/bin/ebuild.sh 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/bin/ebuild.sh 2010-03-20 18:31:13 UTC (rev 15837)
@@ -140,12 +140,14 @@
fi
if [[ $EBUILD_PHASE = depend ]] ; then
- # Skip this for older EAPIs since lots of ebuilds/eclasses
- # have stuff in global scope that really belongs somewhere
- # like pkg_setup or src_configure.
- if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 3 3_pre2 ; then
- die "use() called during invalid phase: $EBUILD_PHASE"
- fi
+ # TODO: Add a registration interface for eclasses to register
+ # any number of phase hooks, so that global scope eclass
+ # initialization can by migrated to phase hooks in new EAPIs.
+ # Example: add_phase_hook before pkg_setup $ECLASS_pre_pkg_setup
+ #if [[ -n $EAPI ]] && ! hasq "$EAPI" 0 1 2 3 ; then
+ # die "use() called during invalid phase: $EBUILD_PHASE"
+ #fi
+ true
# Make sure we have this USE flag in IUSE
elif [[ -n $PORTAGE_IUSE && -n $EBUILD_PHASE ]] ; then
@@ -362,7 +364,8 @@
_unpack_tar() {
if [ "${y}" == "tar" ]; then
- $1 -dc "$srcdir$x" | tar xof - || die "$myfail"
+ $1 -dc "$srcdir$x" | tar xof -
+ assert "$myfail"
else
$1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
fi
@@ -377,7 +380,8 @@
tar xozf "$srcdir$x" || die "$myfail"
;;
tbz|tbz2)
- bzip2 -dc "$srcdir$x" | tar xof - || die "$myfail"
+ bzip2 -dc "$srcdir$x" | tar xof -
+ assert "$myfail"
;;
ZIP|zip|jar)
unzip -qo "${srcdir}${x}" || die "$myfail"
Modified: main/branches/prefix/bin/emerge
===================================================================
--- main/branches/prefix/bin/emerge 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/bin/emerge 2010-03-20 18:31:13 UTC (rev 15837)
@@ -17,7 +17,8 @@
signal.signal(signal.SIGINT, exithandler)
signal.signal(signal.SIGTERM, exithandler)
- # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
+ # Prevent "[Errno 32] Broken pipe" exceptions when
+ # writing to a pipe.
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
except KeyboardInterrupt:
Modified: main/branches/prefix/bin/repoman
===================================================================
--- main/branches/prefix/bin/repoman 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/bin/repoman 2010-03-20 18:31:13 UTC (rev 15837)
@@ -497,6 +497,12 @@
elif os.path.isdir(os.path.join(portdir_overlay, ".hg")):
vcs = "hg"
+# Note: We don't use ChangeLogs in distributed SCMs.
+# It will be generated on server side from scm log,
+# before package moves to the rsync server.
+# This is needed because we try to avoid merge collisions.
+check_changelog = vcs in ('CVS', 'SVN')
+
vcs_local_opts = repoman_settings.get("REPOMAN_VCS_LOCAL_OPTS", "").split()
vcs_global_opts = repoman_settings.get("REPOMAN_VCS_GLOBAL_OPTS")
if vcs_global_opts is None:
@@ -1275,11 +1281,8 @@
relative_path + ': %s' % error_match.group(1))
del mydigests
- # Note: We don't use ChangeLogs in distributed SCMs.
- # It will be generated on server side from scm log,
- # before package moves to the rsync server.
- # This is needed because we try to avoid merge collisions.
- if vcs not in ("git", "hg") and "ChangeLog" not in checkdirlist:
+
+ if check_changelog and "ChangeLog" not in checkdirlist:
stats["changelog.missing"]+=1
fails["changelog.missing"].append(x+"/ChangeLog")
@@ -1337,7 +1340,8 @@
if repolevel < 2:
ebuild_path = os.path.join(catdir, ebuild_path)
ebuild_path = os.path.join(".", ebuild_path)
- if not changelog_modified and ebuild_path in new_ebuilds:
+ if check_changelog and not changelog_modified \
+ and ebuild_path in new_ebuilds:
stats['changelog.ebuildadded'] += 1
fails['changelog.ebuildadded'].append(relative_path)
@@ -2318,7 +2322,9 @@
from portage.util import write_atomic
cvs_header = re.compile(r'^#\s*\$Header.*\$$')
for x in myheaders:
- f = open(x)
+ f = codecs.open(_unicode_encode(x,
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'], errors='strict')
mylines = f.readlines()
f.close()
modified = False
@@ -2327,7 +2333,8 @@
mylines[i] = line.replace("/Attic/", "/")
modified = True
if modified:
- write_atomic(x, "".join(mylines))
+ write_atomic(x, "".join(mylines),
+ encoding=_encodings['repo.content'], errors='strict')
manifest_commit_required = True
if vcs in ('cvs', 'svn') and (myupdates or myremoved):
Modified: main/branches/prefix/man/emerge.1
===================================================================
--- main/branches/prefix/man/emerge.1 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/man/emerge.1 2010-03-20 18:31:13 UTC (rev 15837)
@@ -354,10 +354,10 @@
required.
.TP
.BR "\-\-emptytree " (\fB\-e\fR)
-Reinstalls all world packages and their dependencies to the current USE
-specifications while differing from the installed set of packages as
-little as possible. You should run with \fB\-\-pretend\fR first to make
-sure the result is what you expect.
+Reinstalls target atoms and their entire deep
+dependency tree, as though no packages are currently
+installed. You should run this with \fB\-\-pretend\fR
+first to make sure the result is what you expect.
.TP
.BR "\-\-fail\-clean[=n]"
Clean up temporary files after a build failure. This is
Modified: main/branches/prefix/man/make.conf.5
===================================================================
--- main/branches/prefix/man/make.conf.5 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/man/make.conf.5 2010-03-20 18:31:13 UTC (rev 15837)
@@ -38,7 +38,7 @@
.TP
\fBACCEPT_LICENSE\fR = \fI[space delimited list of licenses or groups]\fR
This variable is used to mask packages based on licensing restrictions. It
-make contain both license and group names, where group names are prefixed
+may contain both license and group names, where group names are prefixed
with the '@' symbol. License groups are defined in the \fIlicense_groups\fR
file (see \fBportage\fR(5)). In addition to license and group names, the
\fI*\fR and \fI-*\fR wildcard tokens are also supported. Refer to GLEP 23
Modified: main/branches/prefix/man/portage.5
===================================================================
--- main/branches/prefix/man/portage.5 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/man/portage.5 2010-03-20 18:31:13 UTC (rev 15837)
@@ -811,8 +811,11 @@
.fi
.TP
.BR use.local.desc
-All local USE flags must be listed here along with the package and a
-description.
+All local USE flags are listed here along with the package and a
+description. This file is automatically generated from the
+metadata.xml files that are included with each individual package.
+Refer to GLEP 56 for further information:
+\fIhttp://www.gentoo.org/proj/en/glep/glep-0056.html\fR.
.nf
.I Format:
Modified: main/branches/prefix/pym/_emerge/BinpkgExtractorAsync.py
===================================================================
--- main/branches/prefix/pym/_emerge/BinpkgExtractorAsync.py 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/pym/_emerge/BinpkgExtractorAsync.py 2010-03-20 18:31:13 UTC (rev 15837)
@@ -20,7 +20,13 @@
def _start(self):
self.args = [self._shell_binary, "-c",
- ("bzip2 -dqc -- %s | tar -xp -C %s -f -") % \
+ ("bzip2 -dqc -- %s | tar -xp -C %s -f - ; " + \
+ "p=(${PIPESTATUS[@]}) ; " + \
+ "if [ ${p[0]} != 0 ] ; then " + \
+ "echo bzip2 failed with status ${p[0]} ; exit ${p[0]} ; fi ; " + \
+ "if [ ${p[1]} != 0 ] ; then " + \
+ "echo tar failed with status ${p[1]} ; exit ${p[1]} ; fi ; " + \
+ "exit 0 ;") % \
(portage._shell_quote(self.pkg_path),
portage._shell_quote(self.image_dir))]
Modified: main/branches/prefix/pym/_emerge/help.py
===================================================================
--- main/branches/prefix/pym/_emerge/help.py 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/pym/_emerge/help.py 2010-03-20 18:31:13 UTC (rev 15837)
@@ -372,10 +372,12 @@
print(" dependencies that are not strictly required.")
print()
print(" "+green("--emptytree")+" ("+green("-e")+" short option)")
- print(" Virtually tweaks the tree of installed packages to contain")
- print(" nothing. This is great to use together with --pretend. This makes")
- print(" it possible for developers to get a complete overview of the")
- print(" complete dependency tree of a certain package.")
+ desc = "Reinstalls target atoms and their entire deep " + \
+ "dependency tree, as though no packages are currently " + \
+ "installed. You should run this with --pretend " + \
+ "first to make sure the result is what you expect."
+ for line in wrap(desc, desc_width):
+ print(desc_indent + line)
print()
print(" "+green("--fail-clean[=n]"))
desc = "Clean up temporary files after a build failure. This is " + \
Modified: main/branches/prefix/pym/portage/update.py
===================================================================
--- main/branches/prefix/pym/portage/update.py 2010-03-20 18:30:18 UTC (rev 15836)
+++ main/branches/prefix/pym/portage/update.py 2010-03-20 18:31:13 UTC (rev 15837)
@@ -194,7 +194,7 @@
update_files = {}
file_contents = {}
myxfiles = ["package.mask", "package.unmask", \
- "package.keywords", "package.use"]
+ "package.keywords", "package.license", "package.use"]
myxfiles += [os.path.join("profile", x) for x in myxfiles]
abs_user_config = os.path.join(config_root, USER_CONFIG_PATH)
recursivefiles = []
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-20 18:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-20 18:31 [gentoo-commits] portage r15837 - in main/branches/prefix: bin man pym/_emerge pym/portage Fabian Groffen (grobian)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox