From: Fabian Groffen Date: Fri, 12 Jan 2007 19:16:40 +0000 (-0000) Subject: Merged from trunk 5501:5506 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d939d43a29f530badc9c60b650837537ce90e1ff;p=portage.git Merged from trunk 5501:5506 For bug #161003, disallow virtuals in package.provided and document it. Thanks to Robin Johnson 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 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 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 75a8ff1a2..6d0ee1a43 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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:" diff --git a/bin/emerge b/bin/emerge index 7ea044164..20676976b 100755 --- a/bin/emerge +++ b/bin/emerge @@ -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 diff --git a/cnf/make.conf.x86.diff b/cnf/make.conf.x86.diff index 39a2bb13c..04e48b61e 100644 --- a/cnf/make.conf.x86.diff +++ b/cnf/make.conf.x86.diff @@ -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" @@ -16,44 +16,76 @@ # 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= means optimize code for the particular type of CPU without +# breaking compatibility with other CPUs. # --#CFLAGS="-O2 -pipe" +# -march= 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. # diff --git a/man/ebuild.5 b/man/ebuild.5 index 9e2243a59..209cd031b 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -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. diff --git a/man/make.conf.5 b/man/make.conf.5 index affc47a7d..035d4d58f 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -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 diff --git a/man/portage.5 b/man/portage.5 index cfe71a672..66547521e 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -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 # diff --git a/pym/portage.py b/pym/portage.py index 8747efad7..80c7dd91f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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)