Merged from trunk -r11893:11913
authorFabian Groffen <grobian@gentoo.org>
Sat, 15 Nov 2008 16:25:53 +0000 (16:25 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 15 Nov 2008 16:25:53 +0000 (16:25 -0000)
   | 11894   | Bug #244485 - Document SRC_URI arrows for output file        |
   | zmedico | customization.                                               |

   | 11896   | Having a leading ./ prefix on file paths can trigger a bug   |
   | zmedico | in the cvs server when committing files to multiple          |
   |         | directories, so strip the prefix. Thanks to Robin H. Johnson |
   |         | <robbat2@g.o> for reporting.                                 |

   | 11898   | Bug #244485 - Document USE dependencies.                     |
   | zmedico |                                                              |

   | 11899   | Note that USE dependencies appear on the right hand side of  |
   | zmedico | SLOT dependencies.                                           |

   | 11900   | Add newlines so that first lines of tables display properly  |
   | zmedico | with man2html.                                               |

   | 11901   | Bug #244485 - Document the !!atom blocker syntax.            |
   | zmedico |                                                              |

   | 11902   | Use a table to condense the docs for the default_* phase     |
   | zmedico | functions.                                                   |

   | 11904   | * git support for repoman                                    |
   | zmedico |                                                              |

   | 11907   | Add a --changelog-rev option that truncates the ChangeLog at |
   | zmedico | a specific revision. Also, add -i to the svn2cl options so   |
   |         | that the actual svn revision numbers are included in the     |
   |         | log. (trunk r11889) Use svn2cl --reparagraph option for      |
   |         | better ChangeLog formatting. (trunk r11906)                  |

   | 11909   | In dyn_package(), use the 'assert' macro (from               |
   | zmedico | isolated-functions.sh) die if PIPESTATUS array contains a    |
   |         | non-zero exist status.                                       |

   | 11911   | Exempt live ebuilds from KEYWORDS.missing and                |
   | zmedico | KEYWORDS.dropped warnings. Thanks to Jorge Manuel B. S.      |
   |         | Vicetto <jmbsvicetto@g.o> for the suggestion.                |

   | 11913   | Make the EbuildQuote check filter out matches that appear to |
   | zmedico | be an argument to a message command. For example: false ||   |
   |         | ewarn "foo $WORKDIR/bar baz" Thanks to Diego 'Flameeyes'     |
   |         | Pettenò <flameeyes@g.o> for reporting this issue (currently |
   |         | triggered by ruby-prof-0.7.0.ebuild).                        |

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

NEWS
bin/misc-functions.sh
bin/repoman
doc/package/ebuild/eapi/2.docbook
man/ebuild.5
pym/repoman/checks.py

diff --git a/NEWS b/NEWS
index 6e9a531094ed739b97230b05849f17d47d35b2ef..11d601c1e8197ddc77bd573e8bfa677b7280695d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,7 @@ portage-2.2
   remaining packages and any with unsatisfied dependencies are
   automatically dropped. The --skipfirst option automatically drops
   packages in the same way, and also drops any masked packages.
-* Add subversion support for repoman.
+* Add git and subversion support for repoman.
 * It is now possible to use `emerge <file>` to reinstall the package that
   installed a particular file. Package contents entries are indexed to
   improve performance. A command such as `emerge /lib/modules` can serve
index 7a17af14dc630c2ba5cba1bba6396a59197a19cb..7753c65fadc5b35837d56c4aeefcd81d9613e6f3 100644 (file)
@@ -747,8 +747,8 @@ dyn_package() {
                PORTAGE_BINPKG_TMPFILE="${PKGDIR}/${CATEGORY}/${PF}.tbz2"
        mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed"
        tar $tar_options -cf - $PORTAGE_BINPKG_TAR_OPTS -C "${D}" . | \
-               bzip2 -f > "$PORTAGE_BINPKG_TMPFILE" || \
-               die "Failed to create tarball"
+               bzip2 -f > "$PORTAGE_BINPKG_TMPFILE"
+       assert
        PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
        python -c "from portage import xpak; t=xpak.tbz2('${PORTAGE_BINPKG_TMPFILE}'); t.recompose('${PORTAGE_BUILDDIR}/build-info')"
        if [ $? -ne 0 ]; then
index f63c724aa63b506fe8e15f92be3a82826f1a9984..89dc322bf91a7c71575a48f40d19b1146176e094 100755 (executable)
@@ -1106,6 +1106,7 @@ for x in scanlist:
                myaux = pkg.metadata
                eapi = myaux["EAPI"]
                inherited = pkg.inherited
+               live_ebuild = live_eclasses.intersection(inherited)
 
                if not src_uri_error:
                        # Check that URIs don't reference a server from thirdpartymirrors.
@@ -1153,6 +1154,8 @@ for x in scanlist:
                                if catdir == "virtual" and \
                                        missing_var in ("HOMEPAGE", "LICENSE"):
                                        continue
+                               if live_ebuild and missing_var == "KEYWORDS":
+                                       continue
                                myqakey=missingvars[pos]+".missing"
                                stats[myqakey]=stats[myqakey]+1
                                fails[myqakey].append(x+"/"+y+".ebuild")
@@ -1184,7 +1187,7 @@ for x in scanlist:
                previous_keywords = slot_keywords.get(myaux["SLOT"])
                if previous_keywords is None:
                        slot_keywords[myaux["SLOT"]] = set()
-               else:
+               elif not live_ebuild:
                        dropped_keywords = previous_keywords.difference(ebuild_archs)
                        if dropped_keywords:
                                stats["KEYWORDS.dropped"] += 1
@@ -1210,7 +1213,7 @@ for x in scanlist:
                Ebuilds that inherit a "Live" eclass (darcs,subversion,git,cvs,etc..) should
                not be allowed to be marked stable
                """
-               if live_eclasses.intersection(pkg.inherited):
+               if live_ebuild:
                        bad_stable_keywords = []
                        for keyword in keywords:
                                if not keyword.startswith("~") and \
@@ -1878,6 +1881,11 @@ else:
                print green("------------------------------------------------------------------------------")
                print
 
+               # Having a leading ./ prefix on file paths can trigger a bug in
+               # the cvs server when committing files to multiple directories,
+               # so strip the prefix.
+               myfiles = [f.lstrip("./") for f in myfiles]
+
                retval = None
                if options.pretend:
                        if vcs == "cvs":
index 849d29857ab279a03f8dd78074a118c04676c211..c658a8237588aaa19825e3bf31e98ab64d366184 100644 (file)
        </section>
        <section id='package-ebuild-eapi-2-metadata-dependencies-use'>
        <title>USE Dependencies</title>
+       <para>
+       When used together with SLOT dependencies, USE dependencies
+       appear on the right hand side of SLOT dependencies.
+       </para>
        <section id='package-ebuild-eapi-2-metadata-dependencies-use-unconditional'>
        <title>Unconditional USE Dependencies</title>
        <table><title>Syntax Examples</title>
index d01b14f635231fa97e8ee2d71374c58e2322e8fb..76cd27e68241aa3eb562dba6fe35f0aaa9436b68 100644 (file)
@@ -157,6 +157,10 @@ the EAPI to which this package conforms.
 Contains a list of URI's for the required source files.  It can contain
 multiple URI's for a single source file.  The list is processed in order
 if the file was not found on any of the \fIGENTOO_MIRRORS\fR.
+Beginning with \fBEAPI 2\fR, the output file name of a given URI may be
+customized with a "->" operator on the right hand side, followed by the
+desired output file name. All tokens, including the operator and output
+file name, should be separated by whitespace.
 .TP
 \fBHOMEPAGE\fR = \fI"http://happy.com/"\fR
 Should contain a list of URL's for the sources main sites and other further
@@ -256,10 +260,16 @@ examples you may find in the portage tree:
 =dev\-libs/glib\-2\fI*\fR
 \fI!\fR=net\-fs/samba\-2\fI*\fR
 \fI~\fRnet\-libs/libnet\-1.0.2a
+\fI!!\fR<sys\-apps/portage\-2.1.4_rc1\fI\fR
 .fi
 
 \fI!\fR means block packages from being installed at the same time.
 .br
+\fI!!\fR means block packages from being installed at the same time
+and explicitly disallow them from being temporarily installed
+simultaneously during a series of upgrades. This syntax is supported
+beginning with \fBEAPI 2\fR.
+.br
 \fI*\fR means match any version of the package so long as the specified base
 is matched.  So with a version of '2*', we can match '2.1', '2.2', '2.2.1',
 etc... and not match version '1.0', '3.0', '4.1', etc...
@@ -279,6 +289,41 @@ x11\-libs/qt:3
 \fI>=\fRx11\-libs/qt-3.3.8:3
 \fI=\fRx11\-libs/qt-3.3*:3
 .fi
+.TP
+.B Atom USE
+Beginning with \fBEAPI 2\fR, any atom can be constrained to match specific
+\fBUSE\fR flag settings. When used together with \fBSLOT\fR dependencies,
+\fBUSE\fR dependencies appear on the right hand side of \fBSLOT\fR
+dependencies.
+
+.RS
+.TP
+.B Unconditional USE Dependencies
+.TS
+l l
+__
+l l.
+Example        Meaning
+
+foo[bar]       foo must have bar enabled
+foo[bar,baz]   foo must have both bar and baz enabled
+foo[\-bar,baz] foo must have bar disabled and baz enabled
+.TE
+
+.TP
+.B Conditional USE Dependencies
+.TS
+l l
+__
+l l.
+Compact Form   Equivalent Expanded Form
+
+foo[bar?]      bar? ( foo[bar] ) !bar? ( foo )
+foo[!bar?]     bar? ( foo ) !bar? ( foo[\-bar] )
+foo[bar=]      bar? ( foo[bar] ) !bar? ( foo[\-bar] )
+foo[!bar=]     bar? ( foo[\-bar] ) !bar? ( foo[bar] )
+.TE
+.RE
 .RE
 .TP
 .B Dynamic DEPENDs
@@ -539,29 +584,28 @@ Initial working directory of $PWD.
 Calls the default phase function implementation for the currently executing
 phase. This function is supported beginning with \fBEAPI 2\fR.
 .TP
-.B default_pkg_nofetch
-Calls the default pkg_nofetch phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
-.TP
-.B default_src_unpack
-Calls the default src_unpack phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
-.TP
-.B default_src_prepare
-Calls the default src_prepare phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
-.TP
-.B default_src_configure
-Calls the default src_configure phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
-.TP
-.B default_src_compile
-Calls the default src_compile phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
-.TP
-.B default_src_test
-Calls the default src_test phase function implementation.
-This function is supported beginning with \fBEAPI 2\fR.
+.B default_*
+Beginning with \fBEAPI 2\fR, the default pkg_nofetch and src_* phase
+functions are accessible via a function having a name that begins with
+default_ and ends with the respective phase function name. For example,
+a call to a function with the name default_src_compile is equivalent to
+a call to the default src_compile implementation.
+
+.RS
+.TS
+l
+_
+l.
+Default Phase Functions
+
+default_pkg_nofetch
+default_src_unpack
+default_src_prepare
+default_src_configure
+default_src_compile
+default_src_test
+.TE
+.RE
 .SH "HELPER FUNCTIONS: GENERAL"
 .TP
 \fBdie\fR \fI[reason]\fR
index dd81d87162641cdceb791d07283f08850e7e588d..c9415b759b2936786beff1b38679f92f46fb94bc 100644 (file)
@@ -83,8 +83,11 @@ class EbuildQuote(LineCheck):
        """Ensure ebuilds have valid quoting around things like D,FILESDIR, etc..."""
 
        repoman_check_name = 'ebuild.minorsyn'
-       _ignored_commands = ["echo", "local", "export"]
-       _ignored_commands += ["eerror", "einfo", "elog", "eqawarn", "ewarn"]
+       _message_commands = ["die", "echo", "eerror",
+               "einfo", "elog", "eqawarn", "ewarn"]
+       _message_re = re.compile(r'\s(' + "|".join(_message_commands) + \
+               r')\s+"[^"]*"\s*$')
+       _ignored_commands = ["local", "export"] + _message_commands
        ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)' + \
                r'|(^\s*(' + "|".join(_ignored_commands) + r')\s+)')
        var_names = ["D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "WORKDIR"]
@@ -125,6 +128,15 @@ class EbuildQuote(LineCheck):
                        if self.var_reference.search(group) is None:
                                continue
 
+                       # Filter matches that appear to be an
+                       # argument to a message command.
+                       # For example: false || ewarn "foo $WORKDIR/bar baz"
+                       message_match = self._message_re.search(line)
+                       if message_match is not None and \
+                               message_match.start() < pos and \
+                               message_match.end() > pos:
+                               break
+
                        # This is an attempt to avoid false positives without getting
                        # too complex, while possibly allowing some (hopefully
                        # unlikely) violations to slip through. We just assume