From df727d9c1de7db5fb4803d6ef23d454a286161a4 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sun, 28 Jan 2007 18:22:17 +0000 Subject: [PATCH] Merged from trunk 5795:5804 add support for parsing of unicode quotes (SpankMan) Ignore EEXIST from rmdir since some kernels (such as solaris) return that instead of ENOTEMPTY. Remove a stray print statement. Thanks to Rick Warner in bug #125261. fix format bug and mention default built_with_use behavior (SpankMan) Add a warning about confcache to make.conf(5) (genone) Catch EACCESS when running env-update, orignal patch by (bug #106061) (genone) translate unicode quotes to ascii ones so we can keep our regex simple (SpankMan) svn path=/main/branches/prefix/; revision=5813 --- bin/check-implicit-pointer-usage.py | 5 ++++- bin/emerge | 4 ++-- bin/env-update | 9 ++++++++- make.conf.txt | 4 ---- man/make.conf.5 | 4 ---- pym/portage/__init__.py | 9 ++++++--- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/bin/check-implicit-pointer-usage.py b/bin/check-implicit-pointer-usage.py index 27faf4bca..93b9d6b96 100755 --- a/bin/check-implicit-pointer-usage.py +++ b/bin/check-implicit-pointer-usage.py @@ -1,6 +1,7 @@ #!@PYTHON@ -O # Ripped from HP and updated from Debian +# Update by Gentoo to support unicode output # # Copyright (c) 2004 Hewlett-Packard Development Company, L.P. @@ -16,7 +17,7 @@ import re import sys implicit_pattern = re.compile("([^:]*):(\d+): warning: implicit declaration " - + "of function [`']([^']*)'") + + "of function `([^']*)'") pointer_pattern = re.compile( "([^:]*):(\d+): warning: " + "(" @@ -36,6 +37,8 @@ while True: line = sys.stdin.readline() if line == '': break + # translate unicode open/close quotes to ascii ones + line = line.replace("\xE2\x80\x98", "`").replace("\xE2\x80\x99", "'") m = implicit_pattern.match(line) if m: last_implicit_filename = m.group(1) diff --git a/bin/emerge b/bin/emerge index f255ec907..fa08cb289 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2994,7 +2994,8 @@ class MergeTask(object): try: os.rmdir(catdir) except OSError, e: - if e.errno != errno.ENOTEMPTY: + if e.errno not in (errno.ENOENT, + errno.ENOTEMPTY, errno.EEXIST): raise del e portage.locks.unlockdir(catdir_lock) @@ -3603,7 +3604,6 @@ def chk_updated_cfg_files(target_root, config_protect): if procount: #print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files." print " "+yellow("*")+" Type "+green("emerge --help config")+" to learn how to update config files." - print def checkUpdatedNewsItems( root, NEWS_PATH, UNREAD_PATH, repo_id ): """ diff --git a/bin/env-update b/bin/env-update index bf6f12902..bcc5a9044 100755 --- a/bin/env-update +++ b/bin/env-update @@ -28,4 +28,11 @@ try: except ImportError: sys.path.insert(0, "@PORTAGE_BASE@/pym") import portage -portage.env_update(makelinks) +try: + portage.env_update(makelinks) +except IOError, e: + if e.errno == 13: + print "env-update: Need superuser access" + sys.exit(1) + else: + raise diff --git a/make.conf.txt b/make.conf.txt index 6d1905909..5482b5021 100644 --- a/make.conf.txt +++ b/make.conf.txt @@ -180,10 +180,6 @@ _`ccache` in the users environment, then portage will default to ${PORTAGE_TMPDIR}/ccache (with userpriv) and to /root/.ccache otherwise. -_`confcache` - Enable confcache support; global configure caching, speeds up autotool based - configure calls via the econf helper function. See ebuild(5) for more information. - _`collision-protect` A QA-feature to ensure that a package doesn't overwrite files it doesn't own. The `COLLISION_IGNORE`_ variable can be used to selectively disable this feature. diff --git a/man/make.conf.5 b/man/make.conf.5 index 9251d8a58..85912d9bd 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -142,10 +142,6 @@ Enable portage support for the ccache package. If the ccache dir is not present in the user's environment, then portage will default to ${PORTAGE_TMPDIR}/ccache. .TP -.B confcache -Enable confcache support; global configure caching, speeds up autotool based configure -calls via the econf helper function. See \fBebuild\fR(5) for more information. -.TP .B collision\-protect A QA\-feature to ensure that a package doesn't overwrite files it doesn't own. The \fICOLLISION_IGNORE\fR variable can be used to selectively disable this diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 27aba9053..d5f9729e4 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -6357,7 +6357,8 @@ class binarytree(object): try: os.rmdir(os.path.join(self.pkgdir, mycat)) except OSError, e: - if e.errno not in (errno.ENOENT, errno.ENOTEMPTY): + if e.errno not in (errno.ENOENT, + errno.ENOTEMPTY, errno.EEXIST): raise del e @@ -6969,7 +6970,8 @@ class dblink: try: os.rmdir(catdir) except OSError, e: - if e.errno != errno.ENOTEMPTY: + if e.errno not in (errno.ENOENT, + errno.ENOTEMPTY, errno.EEXIST): raise del e portage.locks.unlockdir(catdir_lock) @@ -7974,7 +7976,8 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None, vartree=None, prev_mtimes try: os.rmdir(catdir) except OSError, e: - if e.errno != errno.ENOTEMPTY: + if e.errno not in (errno.ENOENT, + errno.ENOTEMPTY, errno.EEXIST): raise del e portage.locks.unlockdir(catdir_lock) -- 2.26.2