Merged from trunk 5795:5804
authorFabian Groffen <grobian@gentoo.org>
Sun, 28 Jan 2007 18:22:17 +0000 (18:22 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 28 Jan 2007 18:22:17 +0000 (18:22 -0000)
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
<phajdan.jr@gmail.com> (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
bin/emerge
bin/env-update
make.conf.txt
man/make.conf.5
pym/portage/__init__.py

index 27faf4bca32cae156d52eac51cab5b571eabdc1a..93b9d6b968b24216e8f4a668858ef1907357f102 100755 (executable)
@@ -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)
index f255ec907a421e30803e93b48548351ab7a0b517..fa08cb28925159819628b4945307539185387ce0 100755 (executable)
@@ -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 ):
        """
index bf6f12902074f613166d28b7bb5719b7653d7454..bcc5a90444b5ebb7065d86235063dcaa01f16068 100755 (executable)
@@ -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
index 6d19059096fb2c6551ecdc7c1fc7ee802b2b9671..5482b5021dc9ddd903f62c122775c48d77fe8609 100644 (file)
@@ -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.
index 9251d8a588db879f5233a6120b93f1285d88f8da..85912d9bdfb550eec35cc559cd890418bcc2ef25 100644 (file)
@@ -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
index 27aba90532fb09b1716717b27e7f4a15aaae119a..d5f9729e41c0410634091b1ebb33f4eaa1c04644 100644 (file)
@@ -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)