* [gentoo-commits] portage r11616 - in main/branches/prefix: bin man pym/_emerge pym/portage/elog
@ 2008-10-03 16:58 Fabian Groffen (grobian)
0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2008-10-03 16:58 UTC (permalink / raw
To: gentoo-commits
Author: grobian
Date: 2008-10-03 16:58:09 +0000 (Fri, 03 Oct 2008)
New Revision: 11616
Modified:
main/branches/prefix/bin/ebuild.sh
main/branches/prefix/bin/repoman
main/branches/prefix/man/repoman.1
main/branches/prefix/pym/_emerge/__init__.py
main/branches/prefix/pym/portage/elog/__init__.py
Log:
Merged from trunk -r11602:11613
| 11603 | Generate an eqawarn message if econf is called from |
| zmedico | src_compile and src_configure is also defined. Thanks to |
| | Betelgeuse for the patch which I've modified to be silent in |
| | EAPI 0 or 1 in case ebuilds want to define src_configure in |
| | those EAPIs and call it manually from src_compile. |
| 11604 | Bug #239272 - Handle InvalidAtom exception inside |
| zmedico | depgraph.validate_blockers(). |
| 11605 | When parsing PORTAGE_ELOG_SYSTEM, stack values in a dict so |
| zmedico | that things like "echo:info echo:qa" stack like one might |
| | expect. Thanks to Betelgeuse for reporting. |
| 11606 | Call elog_process before calling the "clean" phase for |
| zmedico | --buildpkgonly mode. |
| 11607 | Fix broken logic in Scheduler._main_loop() which would allow |
| zmedico | the main loop to exit while one or more merges are still |
| | scheduled. Thanks to Patrick Lauer for reporting. |
| 11608 | Optimize display_preserved_libs() by using a single |
| zmedico | getFileOwnerMap() to look up all the files. |
| 11609 | In JobStatusDisplay._update(), set _displayed = True when |
| zmedico | ruturning early due to stdout not being a tty. This fixes a |
| | problem excess output which was reported by Daniel Robbins. |
| 11610 | Implement a new "changelog.ebuildadded" check which causes |
| zmedico | repoman to bail out if an ebuild has been added and the |
| | ChangeLog has not been modified. This was requested by Robin |
| | H Johnson <robbat2@g.o> since it is a requirement for the |
| | packages.gentoo.org ChangeLog code. |
| 11611 | Remove pointless copying of the owners dict inside |
| zmedico | display_preserved_libs(). |
| 11613 | Fix `svn status` output parsing for compatibility with |
| zmedico | subversion-1.6. Thanks to Arfrever for this patch. |
Modified: main/branches/prefix/bin/ebuild.sh
===================================================================
--- main/branches/prefix/bin/ebuild.sh 2008-10-03 16:53:25 UTC (rev 11615)
+++ main/branches/prefix/bin/ebuild.sh 2008-10-03 16:58:09 UTC (rev 11616)
@@ -436,6 +436,10 @@
local x
local LOCAL_EXTRA_ECONF="${EXTRA_ECONF}"
+ ! hasq "$EAPI" 0 1 && [[ $EBUILD_PHASE = compile && \
+ $(type -t src_configure) = function ]] && \
+ eqawarn "econf called in src_compile instead of src_configure"
+
if [ -z "${ECONF_SOURCE}" ]; then
ECONF_SOURCE="."
fi
Modified: main/branches/prefix/bin/repoman
===================================================================
--- main/branches/prefix/bin/repoman 2008-10-03 16:53:25 UTC (rev 11615)
+++ main/branches/prefix/bin/repoman 2008-10-03 16:58:09 UTC (rev 11616)
@@ -22,7 +22,7 @@
import time
import platform
-from itertools import izip
+from itertools import chain, izip
from stat import S_ISDIR, ST_CTIME
try:
@@ -249,6 +249,7 @@
"desktop.invalid":"desktop-file-validate reports errors in a *.desktop file",
"ebuild.invalidname":"Ebuild files with a non-parseable or syntactically incorrect name (or using 2.1 versioning extensions)",
"ebuild.namenomatch":"Ebuild files that do not have the same name as their parent directory",
+ "changelog.ebuildadded":"An ebuild was added but the ChangeLog was not modified",
"changelog.missing":"Missing ChangeLog files",
"ebuild.notadded":"Ebuilds that exist but have not been added to cvs",
"ebuild.patches":"PATCHES variable should be a bash array to ensure white space safety",
@@ -743,11 +744,21 @@
print green("\nRepoMan scours the neighborhood...")
new_ebuilds = set()
+modified_changelogs = set()
if vcs == "cvs":
mycvstree = cvstree.getentries("./", recursive=1)
+ mychanged = cvstree.findchanged(mycvstree, recursive=1, basedir="./")
mynew = cvstree.findnew(mycvstree, recursive=1, basedir="./")
+
+if vcs == "svn":
+ svnstatus = os.popen("svn status").readlines()
+ mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ]
+ mynew = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ]
+
+if vcs:
new_ebuilds.update(x for x in mynew if x.endswith(".ebuild"))
- del mycvstree, mynew
+ modified_changelogs.update(x for x in chain(mychanged, mynew) \
+ if os.path.basename(x) == "ChangeLog")
have_masked = False
dofail = 0
@@ -1026,11 +1037,29 @@
del metadata_bad
+ changelog_path = "ChangeLog"
+ if repolevel < 3:
+ changelog_path = os.path.join(pkgdir, changelog_path)
+ if repolevel < 2:
+ changelog_path = os.path.join(catdir, changelog_path)
+ changelog_path = os.path.join(".", changelog_path)
+ changelog_modified = changelog_path in modified_changelogs
+
allmasked = True
for y in ebuildlist:
relative_path = os.path.join(x, y + ".ebuild")
full_path = os.path.join(repodir, relative_path)
+ ebuild_path = y + ".ebuild"
+ if repolevel < 3:
+ ebuild_path = os.path.join(pkgdir, ebuild_path)
+ if repolevel < 2:
+ ebuild_path = os.path.join(catdir, ebuild_path)
+ ebuild_path = os.path.join(".", ebuild_path)
+ if not changelog_modified and ebuild_path in new_ebuilds:
+ stats['changelog.ebuildadded'] += 1
+ fails['changelog.ebuildadded'].append(relative_path)
+
if stat.S_IMODE(os.stat(full_path).st_mode) & 0111:
stats["file.executable"] += 1
fails["file.executable"].append(x+"/"+y+".ebuild")
@@ -1119,12 +1148,6 @@
not keyword.startswith("-"):
stable_keywords.append(keyword)
if stable_keywords:
- ebuild_path = y + ".ebuild"
- if repolevel < 3:
- ebuild_path = os.path.join(pkgdir, ebuild_path)
- if repolevel < 2:
- ebuild_path = os.path.join(catdir, ebuild_path)
- ebuild_path = os.path.join(".", ebuild_path)
if ebuild_path in new_ebuilds:
stable_keywords.sort()
stats["KEYWORDS.stable"] += 1
@@ -1674,9 +1697,10 @@
sys.exit(1)
if vcs == "cvs":
- mycvstree=portage.cvstree.getentries("./",recursive=1)
- mychanged=portage.cvstree.findchanged(mycvstree,recursive=1,basedir="./")
- mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
+ if myautoadd:
+ mycvstree = cvstree.getentries("./", recursive=1)
+ mychanged = cvstree.findchanged(mycvstree, recursive=1, basedir="./")
+ mynew = cvstree.findnew(mycvstree, recursive=1, basedir="./")
myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
bin_blob_pattern = re.compile("^-kb$")
no_expansion = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
@@ -1684,10 +1708,11 @@
if vcs == "svn":
- svnstatus = os.popen("svn status").readlines()
- mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem and elem[:1] in "MR" ]
- mynew = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
- myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
+ if myautoadd:
+ svnstatus = os.popen("svn status").readlines()
+ mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ]
+ mynew = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ]
+ myremoved = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D") ]
# in contrast to CVS, SVN expands nothing by default.
# bin_blobs historically
# were just there to see what files need to be checked for
@@ -1699,7 +1724,7 @@
# For files with multiple props set, props are delimited by newlines,
# so exclude lines that don't contain " - " since each of those lines
# only a contain props for a file listed on a previous line.
- expansion = set(prop.split(" - ")[0] \
+ expansion = set("./" + prop.split(" - ")[0] \
for prop in props if " - " in prop)
if vcs:
Modified: main/branches/prefix/man/repoman.1
===================================================================
--- main/branches/prefix/man/repoman.1 2008-10-03 16:53:25 UTC (rev 11615)
+++ main/branches/prefix/man/repoman.1 2008-10-03 16:58:09 UTC (rev 11616)
@@ -183,6 +183,9 @@
.B SRC_URI.mirror
A uri listed in profiles/thirdpartymirrors is found in SRC_URI
.TP
+.B changelog.ebuildadded
+An ebuild was added but the ChangeLog was not modified
+.TP
.B changelog.missing
Missing ChangeLog files
.TP
Modified: main/branches/prefix/pym/_emerge/__init__.py
===================================================================
--- main/branches/prefix/pym/_emerge/__init__.py 2008-10-03 16:53:25 UTC (rev 11615)
+++ main/branches/prefix/pym/_emerge/__init__.py 2008-10-03 16:58:09 UTC (rev 11616)
@@ -2565,6 +2565,7 @@
if self._default_exit(packager) == os.EX_OK and \
self.opts.buildpkgonly:
# Need to call "clean" phase for buildpkgonly mode
+ portage.elog.elog_process(self.pkg.cpv, self.settings)
phase = "clean"
clean_phase = EbuildPhase(background=self.background,
pkg=self.pkg, phase=phase,
@@ -5921,10 +5922,16 @@
blocker_cache[cpv] = \
blocker_cache.BlockerData(counter, blocker_atoms)
if blocker_atoms:
- for myatom in blocker_atoms:
- blocker = Blocker(atom=portage.dep.Atom(myatom),
- eapi=pkg.metadata["EAPI"], root=myroot)
- self._blocker_parents.add(blocker, pkg)
+ try:
+ for atom in blocker_atoms:
+ blocker = Blocker(atom=portage.dep.Atom(atom),
+ eapi=pkg.metadata["EAPI"], root=myroot)
+ self._blocker_parents.add(blocker, pkg)
+ except portage.exception.InvalidAtom, e:
+ depstr = " ".join(vardb.aux_get(pkg.cpv, dep_keys))
+ show_invalid_depstring_notice(
+ pkg, depstr, "Invalid Atom: %s" % (e,))
+ return False
for cpv in stale_cache:
del blocker_cache[cpv]
blocker_cache.flush()
@@ -8750,6 +8757,7 @@
out = self.out
if not self._isatty:
out.write(self._format_msg(msg) + self._term_codes['newline'])
+ self._displayed = True
return
if self._displayed:
@@ -9892,7 +9900,7 @@
while True:
self._schedule()
- if not self._jobs or merge_queue:
+ if not (self._jobs or merge_queue):
break
if self._poll_event_handlers:
self._poll_loop()
@@ -10942,13 +10950,25 @@
print colorize("WARN", "!!!") + " existing preserved libs:"
plibdata = vardbapi.plib_registry.getPreservedLibs()
linkmap = vardbapi.linkmap
+
+ consumer_map = {}
+ search_for_owners = set()
for cpv in plibdata:
+ for f in plibdata[cpv]:
+ if f in consumer_map:
+ continue
+ consumers = list(linkmap.findConsumers(f))
+ consumers.sort()
+ consumer_map[f] = consumers
+ search_for_owners.update(consumers[:MAX_DISPLAY+1])
+
+ owners = vardbapi._owners.getFileOwnerMap(search_for_owners)
+
+ for cpv in plibdata:
print colorize("WARN", ">>>") + " package: %s" % cpv
for f in plibdata[cpv]:
print colorize("WARN", " * ") + " - %s" % f
- consumers = list(linkmap.findConsumers(f))
- consumers.sort()
- owners = vardbapi._owners.getFileOwnerMap(consumers[:MAX_DISPLAY+2])
+ consumers = consumer_map[f]
for c in consumers[:MAX_DISPLAY]:
print colorize("WARN", " * ") + " used by %s (%s)" % (c, ", ".join([x.mycpv for x in owners[c]]))
if len(consumers) == MAX_DISPLAY + 1:
Modified: main/branches/prefix/pym/portage/elog/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/elog/__init__.py 2008-10-03 16:53:25 UTC (rev 11615)
+++ main/branches/prefix/pym/portage/elog/__init__.py 2008-10-03 16:58:09 UTC (rev 11616)
@@ -91,6 +91,19 @@
all_logentries[key], _preserve_logentries[key] = phasefilter(all_logentries[key])
my_elog_classes = set(mysettings.get("PORTAGE_ELOG_CLASSES", "").split())
+ logsystems = {}
+ for token in mysettings.get("PORTAGE_ELOG_SYSTEM", "").split():
+ if ":" in token:
+ s, levels = token.split(":", 1)
+ levels = levels.split(",")
+ else:
+ s = token
+ levels = ()
+ levels_set = logsystems.get(s)
+ if levels_set is None:
+ levels_set = set()
+ logsystems[s] = levels_set
+ levels_set.update(levels)
for key in all_logentries:
default_logentries = filter_loglevels(all_logentries[key], my_elog_classes)
@@ -106,12 +119,9 @@
default_logentries, default_fulllog)
# pass the processing to the individual modules
- logsystems = mysettings["PORTAGE_ELOG_SYSTEM"].split()
- for s in logsystems:
+ for s, levels in logsystems.iteritems():
# allow per module overrides of PORTAGE_ELOG_CLASSES
- if ":" in s:
- s, levels = s.split(":", 1)
- levels = levels.split(",")
+ if levels:
mod_logentries = filter_loglevels(all_logentries[key], levels)
mod_fulllog = _combine_logentries(mod_logentries)
else:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-03 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-03 16:58 [gentoo-commits] portage r11616 - in main/branches/prefix: bin man pym/_emerge pym/portage/elog Fabian Groffen (grobian)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox