Merged from trunk -r14587:14601
authorFabian Groffen <grobian@gentoo.org>
Wed, 14 Oct 2009 19:41:43 +0000 (19:41 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 14 Oct 2009 19:41:43 +0000 (19:41 -0000)
   | 14589   | Add a reference to GLEP 23.                                  |
   | zmedico |                                                              |

   | 14591   | Update ACCEPT_LICENSE and ACCEPT_PROPERTIES docs.            |
   | zmedico |                                                              |

   | 14593   | Add a note about ACCEPT_LICENSE.                             |
   | zmedico |                                                              |

   | 14597   | Implement FetchlistDict.__len__, in order to avoid infinite  |
   | zmedico | recursion in some cases.                                     |

   | 14598   | Implement __len__.                                           |
   | zmedico |                                                              |

   | 14599   | When --depclean pulls in the provider of a library because   |
   | zmedico | of installed consumers, display the soname(s) of the         |
   |         | consumed libraries.                                          |

   | 14600   | Bug #288906 - Fix Scheduler._dblink_elog() to always append  |
   | zmedico | messages to the build log if available (regardless whether   |
   |         | or not message goes to stdout).                              |

   | 14601   | Add some examples for ACCEPT_LICENSE and ACCEPT_PROPERTIES.  |
   | zmedico |                                                              |

svn path=/main/branches/prefix/; revision=14605

RELEASE-NOTES
man/make.conf.5
man/portage.5
pym/_emerge/BlockerCache.py
pym/_emerge/Scheduler.py
pym/_emerge/actions.py
pym/portage/__init__.py

index 57274f942213de25e3623175e7be15c776e1e2c4..81ac86682ac4b6f99060c9ae1bec372bba3fd98c 100644 (file)
@@ -31,6 +31,10 @@ portage-2.1.7
   require a tty device (like the wget progress bar) will be disabled. This
   is due to an upstream python issue: http://bugs.python.org/issue5380. See
   bug #287648 for more information.
+* Licenses in the @EULA license group are now masked by the default
+  ACCEPT_LICENSE setting. You can unmask all licenses by setting
+  ACCEPT_LICENSE="*" in /etc/make.conf. See the make.conf(5) man page for
+  more information about ACCEPT_LICENSE.
 
 portage-2.1.6.12
 ==================================
index 0e7ebf888379aff1aba5b0adfe8adfd7ccf9faef..b9e5c516dbfd9b78ab39e9c2dac4ae833fd6b4c1 100644 (file)
@@ -37,17 +37,42 @@ set this to '~ppc'.  This is an incremental variable.  Only define a
 Defaults to the value of $ARCH.
 .TP
 \fBACCEPT_LICENSE\fR = \fI[space delimited list of licenses or groups]\fR
-This variable is used to mask packages based on licensing restrictions.
+This variable is used to mask packages based on licensing restrictions. It
+make 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
+for further information:
+\fIhttp://www.gentoo.org/proj/en/glep/glep-0023.html\fR.
 .br
 Defaults to the value of * -@EULA.
+.br
+.I Examples:
+.nf
+# Accept any license
+ACCEPT_LICENSE="*"
+# Accept any license except the "public-domain" license
+ACCEPT_LICENSE="* -public-domain"
+# Only accept licenses in the FSF-APPROVED license group
+ACCEPT_LICENSE="-* @FSF-APPROVED"
+.fi
 .TP
 \fBACCEPT_PROPERTIES\fR = \fI[space delimited list of properties]\fR
 This variable is used to mask packages based on PROPERTIES restrictions.
-This varable can be temporarily overridden using the the
+In addition to property names, the \fI*\fR and \fI-*\fR wildcard tokens are
+also supported. This varable can be temporarily overridden using the
 \fB\-\-accept\-properties\fR option of \fBemerge\fR(1).
 See \fBebuild\fR(5) for more information about PROPERTIES. 
 .br
 Defaults to the value of *.
+.br
+.I Examples:
+.nf
+# Accept any properties
+ACCEPT_PROPERTIES="*"
+# Accept any properties except the "interactive" property
+ACCEPT_PROPERTIES="* -interactive"
+.fi
 .TP
 .B CBUILD
 This variable is passed by the \fIebuild scripts\fR to the \fIconfigure\fR
index ae5f7f1f8981615e45d40d7e16ea5e70822c3c7f..963a9d4f9adceca36913121588072f57d792bb65 100644 (file)
@@ -685,13 +685,15 @@ A list of all the packages which will be displayed when you run `emerge info`.
 .TP
 .BR license_groups
 This contains groups of licenses that may be specifed in the
-\fBACCEPT_LICENSE\fR variable (see \fBmake.conf\fR(5)).
+\fBACCEPT_LICENSE\fR variable (see \fBmake.conf\fR(5)). Refer
+to GLEP 23 for further information:
+\fIhttp://www.gentoo.org/proj/en/glep/glep-0023.html\fR.
 
 .I Format:
 .nf
 \- comments begin with # (no inline comments)
 \- one group name, followed by list of licenses and nested groups
-\- nested groups are prefixed with the @ symbol
+\- nested groups are prefixed with the '@' symbol
 .fi
 
 .I Example:
index f88a7c43f16c5b41f9b384acaa7730c45f792386..de3b65e2267628d28dc0b48ecaaa3bacfb9b519b 100644 (file)
@@ -165,6 +165,11 @@ class BlockerCache(portage.cache.mappings.MutableMapping):
                        return iter([])
                return iter(self._cache_data["blockers"])
 
+       def __len__(self):
+               """This needs to be implemented in order to avoid
+               infinite recursion in some cases."""
+               return len(self._cache_data["blockers"])
+
        def __delitem__(self, cpv):
                del self._cache_data["blockers"][cpv]
 
index f2247578b19faf8923e2f257608790e87f3a5daf..eb2f894973069c77adc394b3516ba4527e162bfd 100644 (file)
@@ -10,6 +10,15 @@ import sys
 import textwrap
 import time
 import weakref
+
+try:
+       from io import StringIO
+except ImportError:
+       # Needed for python-2.6 with USE=build since
+       # io imports threading which imports thread
+       # which is unavailable.
+       from StringIO import StringIO
+
 import portage
 from portage import os
 from portage import _encodings
@@ -495,23 +504,19 @@ class Scheduler(PollScheduler):
        def _dblink_elog(self, pkg_dblink, phase, func, msgs):
 
                log_path = pkg_dblink.settings.get("PORTAGE_LOG_FILE")
-               log_file = None
-               out = sys.stdout
                background = self._background
+               out = StringIO()
 
-               if background and log_path is not None:
-                       log_file = codecs.open(_unicode_encode(log_path,
-                               encoding=_encodings['fs'], errors='strict'),
-                               mode='a', encoding=_encodings['content'],
-                               errors='backslashreplace')
-                       out = log_file
+               for msg in msgs:
+                       func(msg, phase=phase, key=pkg_dblink.mycpv, out=out)
 
-               try:
-                       for msg in msgs:
-                               func(msg, phase=phase, key=pkg_dblink.mycpv, out=out)
-               finally:
-                       if log_file is not None:
-                               log_file.close()
+               out_str = out.getvalue()
+
+               if not background:
+                       portage.util.writemsg_stdout(out_str, noiselevel=-1)
+
+               if log_path is not None:
+                       self._append_to_log_path(log_path, out_str)
 
        def _dblink_emerge_log(self, msg):
                self._logger.log(msg)
index 6c897a1aba23289af707ad7063b44b3a53f3ff8c..d9117be9e2232eda7c1761f531438ded504ccf1f 100644 (file)
@@ -1032,13 +1032,20 @@ def calc_depclean(settings, trees, ldpath_mtimes,
                        msg = []
                        for pkg in sorted(consumer_map, key=cmp_sort_key(cmp_pkg_cpv)):
                                consumers = consumer_map[pkg]
+                               consumer_libs = {}
+                               for lib, lib_consumers in consumers.items():
+                                       for consumer in lib_consumers:
+                                               consumer_libs.setdefault(
+                                                       consumer.mycpv, set()).add(linkmap.getSoname(lib))
                                unique_consumers = set(chain(*consumers.values()))
                                unique_consumers = sorted(consumer.mycpv \
                                        for consumer in unique_consumers)
                                msg.append("")
                                msg.append("  %s pulled in by:" % (pkg.cpv,))
                                for consumer in unique_consumers:
-                                       msg.append("    %s" % (consumer,))
+                                       libs = consumer_libs[consumer]
+                                       msg.append("    %s needs %s" % \
+                                               (consumer, ', '.join(sorted(libs))))
                        msg.append("")
                        writemsg_level("".join(prefix + "%s\n" % line for line in msg),
                                level=logging.WARNING, noiselevel=-1)
index 98965a28c5ee3cfdf008a7b4808a6dd148f4a40e..32656dd58ee86847e89380d41a3bc1bc00a9099f 100644 (file)
@@ -8630,6 +8630,11 @@ class FetchlistDict(portage.cache.mappings.Mapping):
        def __iter__(self):
                return iter(self.portdb.cp_list(self.cp, mytree=self.mytree))
 
+       def __len__(self):
+               """This needs to be implemented in order to avoid
+               infinite recursion in some cases."""
+               return len(self.portdb.cp_list(self.cp, mytree=self.mytree))
+
        def keys(self):
                """Returns keys for all packages within pkgdir"""
                return self.portdb.cp_list(self.cp, mytree=self.mytree)