Merged from trunk 5501:5506
authorFabian Groffen <grobian@gentoo.org>
Fri, 12 Jan 2007 19:16:40 +0000 (19:16 -0000)
committerFabian Groffen <grobian@gentoo.org>
Fri, 12 Jan 2007 19:16:40 +0000 (19:16 -0000)
For bug #161003, disallow virtuals in package.provided and document it.  Thanks
to Robin Johnson <robbat2@gentoo.org> for the initial patch.

For bug #160971, rename dir.gz to dir.gz.old when necessary to avoid problems
with install-info.  Thanks to Ed Catmur <ed@catmur.co.uk> for the initial patch.

Misc typo fixes, patch by Benno Schulenberg (bug #157812) (genone)

Update x86 CFLAGS section, original patch by Peter Gantner (bug #133402) (genone)

Add elog related variables to make.conf(5) with a pointer to make.conf.example.
Add elog() description to ebuild(5) and update einfo() description. (genone)

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

bin/ebuild.sh
bin/emerge
cnf/make.conf.x86.diff
man/ebuild.5
man/make.conf.5
man/portage.5
pym/portage.py

index 75a8ff1a2fe21b565f0426c1ead3f619f436a86f..6d0ee1a43015d52be8e5e0e209ceace44a24c490 100755 (executable)
@@ -512,10 +512,10 @@ check_KV() {
        if [ -z "${KV}" ]; then
                eerror ""
                eerror "Could not determine your kernel version."
-               eerror "Make sure that you have /usr/src/linux symlink."
-               eerror "And that said kernel has been configured."
+               eerror "Make sure that you have a /usr/src/linux symlink,"
+               eerror "and that the indicated kernel has been configured."
                eerror "You can also simply run the following command"
-               eerror "in the kernel referenced by /usr/src/linux:"
+               eerror "in the directory referenced by /usr/src/linux:"
                eerror " make include/linux/version.h"
                eerror ""
                die
@@ -528,7 +528,7 @@ keepdir() {
        local x
        if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then
                shift
-               find "$@" -type d -printf "${ED}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || die "Failed to recursive create .keep files"
+               find "$@" -type d -printf "${ED}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || die "Failed to recursively create .keep files"
        else
                for x in "$@"; do
                        touch "${ED}/${x}/.keep_${CATEGORY}_${PN}-${SLOT}" || die "Failed to create .keep in ${ED}/${x}"
@@ -1115,7 +1115,7 @@ dyn_compile() {
 
        if [[ ${PORTAGE_BUILDDIR}/.compiled -nt ${WORKDIR} ]] ; then
                vecho ">>> It appears that '${PF}' is already compiled; skipping."
-               vecho ">>> Remove '${PORTAGE_BUILDDIR}/.compiled' to force install."
+               vecho ">>> Remove '${PORTAGE_BUILDDIR}/.compiled' to force compilation."
                trap SIGINT SIGQUIT
                [ "$(type -t post_src_compile)" == "function" ] && qa_call post_src_compile
                return
@@ -1255,22 +1255,22 @@ dyn_help() {
        echo "  help        : show this help screen"
        echo "  setup       : execute package specific setup actions"
        echo "  fetch       : download source archive(s) and patches"
-       echo "  digest      : creates a digest and a manifest file for the package"
-       echo "  manifest    : creates a manifest file for the package"
+       echo "  digest      : create a digest and a manifest file for the package"
+       echo "  manifest    : create a manifest file for the package"
        echo "  unpack      : unpack/patch sources (auto-fetch if needed)"
        echo "  compile     : compile sources (auto-fetch/unpack if needed)"
        echo "  test        : test package (auto-fetch/unpack/compile if needed)"
        echo "  preinst     : execute pre-install instructions"
        echo "  postinst    : execute post-install instructions"
-       echo "  install     : installs the package to the temporary install directory"
+       echo "  install     : install the package to the temporary install directory"
        echo "  qmerge      : merge image into live filesystem, recording files in db"
-       echo "  merge       : does fetch, unpack, compile, install and qmerge"
+       echo "  merge       : do fetch, unpack, compile, install and qmerge"
        echo "  prerm       : execute pre-removal instructions"
        echo "  postrm      : execute post-removal instructions"
        echo "  unmerge     : remove package from live filesystem"
        echo "  config      : execute package specific configuration actions"
-       echo "  package     : create tarball package in ${PKGDIR}/All"
-       echo "  rpm         : builds a RedHat RPM package"
+       echo "  package     : create a tarball package in ${PKGDIR}/All"
+       echo "  rpm         : build a RedHat RPM package"
        echo "  clean       : clean up all source and temporary files"
        echo
        echo "The following settings will be used for the ebuild process:"
index 7ea044164f85e51c295824ed032df25de205e9e9..20676976b60c61ec6147835406d58fabb85d98ba 100755 (executable)
@@ -3463,12 +3463,14 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval):
                        for inforoot in regen_infodirs:
                                if inforoot=='':
                                        continue
-                               try:
-                                       os.rename(inforoot+"/dir",inforoot+"/dir.old")
-                               except SystemExit, e:
-                                       raise # Needed else can't exit
-                               except:
-                                       pass
+                               for filename in ("dir", "dir.gz"):
+                                       file_path = os.path.join(inforoot, filename)
+                                       try:
+                                               os.rename(file_path, file_path + ".old")
+                                       except OSError, e:
+                                               if e.errno != errno.ENOENT:
+                                                       raise
+                                               del e
 
                                if not os.path.isdir(inforoot):
                                        continue
index 39a2bb13c2033bff95f0dd8a82cf36d26295369c..04e48b61e8c1436fb58c14b6d24bfed293a1ed0d 100644 (file)
@@ -1,5 +1,5 @@
---- make.conf  2006-03-19 18:40:11.000000000 +0100
-+++ make.conf.x86      2006-03-19 18:26:21.000000000 +0100
+--- make.conf  2007-01-10 03:22:07.410548112 +0100
++++ make.conf.x86      2007-01-10 03:22:13.206910362 +0100
 @@ -23,6 +23,15 @@
  # Example:
  #USE="X gtk gnome -alsa"
  # Host and optimization settings 
  # ==============================
  #
-@@ -33,10 +42,34 @@
+@@ -33,10 +42,65 @@
  # package (and in some cases the libraries it uses) at default optimizations
  # before reporting errors to developers.
  #
 -# Please refer to the GCC manual for a list of possible values.
+-#
+-#CFLAGS="-O2 -pipe"
 +# -mcpu=<cpu-type> means optimize code for the particular type of CPU without
 +# breaking compatibility with other CPUs.
  #
--#CFLAGS="-O2 -pipe"
 +# -march=<cpu-type> means to take full advantage of the ABI and instructions
 +# for the particular CPU; this will break compatibility with older CPUs (for
 +# example, -march=athlon-xp code will not run on a regular Athlon, and
 +# -march=i686 code will not run on a Pentium Classic.
 +#
-+# CPU types supported in gcc-3.2 and higher: athlon-xp, athlon-mp,
-+# athlon-tbird, athlon, k6, k6-2, k6-3, i386, i486, i586 (Pentium), i686
-+# (PentiumPro), pentium, pentium-mmx, pentiumpro, pentium2 (Celeron),
-+# pentium3, and pentium4.
++# CPU types supported by gcc version:
++# (Higher versions include the targets from older ones,
++# those listed on the same line are equivalent.)
++# === >=gcc-2.95
++# i386                        Original Intel's i386.
++# i486                        Intel's i486. (No scheduling implemented.)
++# i586, pentium       Intel Pentium with no MMX support.
++# pentium-mmx Intel PentiumMMX based on Pentium core with MMX.
++# i686, pentiumpro    Intel PentiumPro.
++# === >=gcc-3.2
++# k6                  AMD K6 with MMX.
++# k6-2, k6-3  AMD K6 with MMX and 3dNOW!.
++# pentium2            Intel Pentium2 based on PentiumPro with MMX.
++# pentium3            Intel Pentium3 based on PentiumPro with MMX and SSE.
++# pentium4            Intel Pentium4 with MMX, SSE and SSE2.
++# athlon, athlon-tbird        AMD Athlon with MMX, 3dNOW!, enhanced 3dNOW!
++#                             and SSE prefetch.
++# athlon-4, athlon-xp, athlon-mp      AMD Athlon with MMX, 3dNOW!, enhanced
++#                             3dNOW! and full SSE.
++# === >=gcc-3.3
++# winchip-c6  IDT Winchip C6, i486 with MMX.
++# winchip2            IDT Winchip2, i486 MMX and 3dNOW!.
++# c3                  Via C3 with MMX and 3dNOW! (No scheduling implemented.)
++# === >=gcc-4.1
++# c3-2                        Via C3-2 with MMX and SSE. (No scheduling implemented.)
++# pentium-m           Low power version of Intel Pentium3 with MMX, SSE, SSE2.
++#                             Used by Centrino notebooks.
++# prescott            Intel Pentium4 with MMX, SSE, SSE2 and SSE3.
++# nocona              Intel Pentium4 with 64-bit extensions, MMX, SSE, SSE2
++#                             and SSE3.
++# k8, opteron, athlon64, athlon-fx    AMD K8 core based CPUs with x86-64.
++#                             (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and
++#                             64-bit extensions.)
 +#
-+# Note that Gentoo Linux 1.4 and higher include at least gcc-3.2.
++# Gentoo Linux 1.2 and below used gcc-2.95*
++# Gentoo Linux 1.4 and 2004.* had gcc-3.2
++# Gentoo Linux 2005.1 through 2006.0 use gcc-3.3
++# Gentoo Linux 2006.1 has gcc-4.1
 +# 
-+# CPU types supported in gcc-2.95*: k6, i386, i486, i586 (Pentium), i686
-+# (Pentium Pro), pentium, pentiumpro Gentoo Linux 1.2 and below use gcc-2.95*
 +#
 +# CRITICAL WARNINGS: ****************************************************** #
 +# K6 markings are deceptive. Avoid setting -march for them. See Bug #24379. #
 +# Pentium-M CPU's should not enable sse2 until at least gcc-3.4. Bug 50616. #
 +# ************************************************************************* #
- #
-+# Decent examples:
 +#
++# NOTE: the -On optimization levels are set with the letter O, not -0 (zero).
++#
++# Decent examples:
 +#CFLAGS="-mcpu=athlon-xp -O3 -pipe"
 +#CFLAGS="-march=pentium3 -O3 -pipe"
 +
  # If you set a CFLAGS above, then this line will set your default C++ flags to
  # the same settings.
  #CXXFLAGS="${CFLAGS}"
-@@ -61,7 +80,7 @@
+@@ -61,7 +125,7 @@
  # DO NOT PUT ANYTHING BUT YOUR SPECIFIC ~ARCHITECTURE IN THE LIST.
  # IF YOU ARE UNSURE OF YOUR ARCH, OR THE IMPLICATIONS, DO NOT MODIFY THIS.
  #
index 9e2243a59d0cda1df2051f77731c5c6d6ad0e7f3..209cd031b646b7029bf249e28b94abd0ebb37ffe 100644 (file)
@@ -547,10 +547,15 @@ VERINS="$(best_version net-ftp/glftpd)"
 .RE
 .SH "HELPER FUNCTIONS: OUTPUT"
 .TP
-\fBeinfo\fR \fI"informative message"\fR
+\fBeinfo\fR \fI"disposable message"\fR
+Same as \fBelog\fR, but should be used when the message isn't important to the
+user (like progress or status messages during the build process).
+.TP
+\fBelog\fR \fI"informative message"\fR
 If you need to display an message that you wish the user to read and take 
-notice of, then use \fBeinfo\fR.  It works just like \fBecho\fR(1), but 
-adds a little more to the output so as to catch the user's eye.
+notice of, then use \fBelog\fR.  It works just like \fBecho\fR(1), but 
+adds a little more to the output so as to catch the user's eye. The message
+will also be logged by portage for later review.
 .TP
 \fBewarn\fR \fI"warning message"\fR
 Same as \fBeinfo\fR, but should be used when showing a warning to the user.
index affc47a7d5aacf6168ed8d6e505dfdf6b892bee1..035d4d58f3ec8b1a4e058c2af1ffb548e7a798df 100644 (file)
@@ -322,6 +322,19 @@ emerge is running at.  In other words, this will not set the nice level,
 it will increment it.  For more information about nice levels and what 
 are acceptable ranges, see \fBnice\fR(1).
 .TP
+\fBPORTAGE_ELOG_CLASSES\fR
+.TP
+\fBPORTAGE_ELOG_SYSTEM\fR
+.TP
+\fBPORTAGE_ELOG_COMMAND\fR
+.TP
+\fBPORTAGE_ELOG_MAILURI\fR
+.TP
+\fBPORTAGE_ELOG_MAILFROM\fR
+.TP
+\fBPORTAGE_ELOG_MAILSUBJECT\fR
+Please see /etc/make.conf.example for elog documentation.
+.TP
 \fBPORTAGE_RSYNC_EXTRA_OPTS\fR = \fI[rsync options string]\fR
 Additional rsync options to be used by \fBemerge --sync\fR.
 .br
index cfe71a67289bc84bc6de614d79fdef20bb5fd1a6..66547521e302907ca07a8bf1f154c2a0e3a645dd 100644 (file)
@@ -207,6 +207,11 @@ For example, if you manage your own copy of a 2.6 kernel, then you can
 tell portage that 'sys-kernel/development-sources-2.6.7' is already taken 
 care of and it should get off your back about it.
 
+Virtual packages (virtual/*) should not be specified in package.provided.
+Depending on the type of virtual, it may be necessary to add an entry to the
+virtuals file and/or add a package that satisfies a virtual to
+package.provided.
+
 .I Format:
 .nf
 \- comments begin with #
index 8747efad78e19d7410b0754561f13c96f2a612e2..80c7dd91f14476179fd6cf041f672682e55c5105 100644 (file)
@@ -1348,13 +1348,31 @@ class config:
 
                        pkgprovidedlines = [grabfile(os.path.join(x, "package.provided")) for x in self.profiles]
                        pkgprovidedlines = stack_lists(pkgprovidedlines, incremental=1)
+                       has_invalid_data = False
                        for x in range(len(pkgprovidedlines)-1, -1, -1):
+                               myline = pkgprovidedlines[x]
+                               if not isvalidatom("=" + myline):
+                                       writemsg("Invalid package name in package.provided:" + \
+                                               " %s\n" % myline, noiselevel=-1)
+                                       has_invalid_data = True
+                                       del pkgprovidedlines[x]
+                                       continue
                                cpvr = catpkgsplit(pkgprovidedlines[x])
                                if not cpvr or cpvr[0] == "null":
                                        writemsg("Invalid package name in package.provided: "+pkgprovidedlines[x]+"\n",
                                                noiselevel=-1)
+                                       has_invalid_data = True
                                        del pkgprovidedlines[x]
-
+                                       continue
+                               if cpvr[0] == "virtual":
+                                       writemsg("Virtual package in package.provided: %s\n" % \
+                                               myline, noiselevel=-1)
+                                       has_invalid_data = True
+                                       del pkgprovidedlines[x]
+                                       continue
+                       if has_invalid_data:
+                               writemsg("See portage(5) for correct package.provided usage.\n",
+                                       noiselevel=-1)
                        self.pprovideddict = {}
                        for x in pkgprovidedlines:
                                cpv=catpkgsplit(x)