From: Fabian Groffen Date: Mon, 27 Aug 2007 19:41:03 +0000 (-0000) Subject: Merged from trunk 7698:7705 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d961e35edb383458cf13a82a10c15f9ddf7cf21a;p=portage.git Merged from trunk 7698:7705 | 7699 | remove $Id$ as it gives us nothing useful | | SpankMan | | | 7700 | Bug #190214 - Make the rpm phase use /usr/src/rpm instead | | zmedico | of /usr/src/redhat. Bug #190144 - Use the realpath of | | | DISTDIR so that things like subversion.eclass are | | | compatible with sandbox. | | 7701 | Move blocker handling from depgraph.create() to | | zmedico | select_dep(). | | 7702 | change directory to / in case $PWD doesnt exist | | SpankMan | | | 7705 | Bug #190406 - Filter the myheaders list so that it doesn't | | zmedico | include binary blobs added to cvs with the -kb option. | svn path=/main/branches/prefix/; revision=7707 --- diff --git a/bin/etc-update b/bin/etc-update index 7fef4366e..e99cd0873 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -1,5 +1,5 @@ #!@BASH@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -10,6 +10,8 @@ # Leo Lipelis # Karl Trygve Kalleberg +cd / + if type -P gsed >/dev/null ; then function sed() { gsed "$@"; } fi diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index c9e2588cd..008f31bdc 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -578,7 +578,9 @@ dyn_package() { } dyn_spec() { - tar czf "/usr/src/redhat/SOURCES/${PF}.tar.gz" "${O}/${PF}.ebuild" "${O}/files" || die "Failed to create base rpm tarball." + tar czf "/usr/src/rpm/SOURCES/${PF}.tar.gz" \ + "${O}/${PF}.ebuild" "${O}/files" || \ + die "Failed to create base rpm tarball." cat <<__END1__ > ${PF}.spec Summary: ${DESCRIPTION} @@ -610,11 +612,13 @@ __END1__ } dyn_rpm() { - addwrite /usr/src/redhat/ - addwrite ${RPMDIR} + addwrite /usr/src/rpm + addwrite "${RPMDIR}" dyn_spec rpmbuild -bb "${PF}.spec" || die "Failed to integrate rpm spec file" - install -D "/usr/src/redhat/RPMS/i386/${PN}-${PV}-${PR}.i386.rpm" "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || die "Failed to move rpm" + install -D "/usr/src/rpm/RPMS/i386/${PN}-${PV}-${PR}.i386.rpm" \ + "${RPMDIR}/${CATEGORY}/${PN}-${PV}-${PR}.rpm" || \ + die "Failed to move rpm" } if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then diff --git a/bin/repoman b/bin/repoman index e3d0fc4b3..4e390deea 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1767,11 +1767,15 @@ elif "--pretend" not in myoptions: print sys.exit(1) - if isCvs: + if True: mycvstree=portage.cvstree.getentries("./",recursive=1) mychanged=portage.cvstree.findchanged(mycvstree,recursive=1,basedir="./") mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./") myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./") + bin_blob_pattern = re.compile("^-kb$") + bin_blobs = set(portage.cvstree.findoption(mycvstree, + bin_blob_pattern, recursive=1, basedir="./")) + if isSvn: svnstatus = os.popen("svn status").readlines() mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ] @@ -1803,6 +1807,8 @@ elif "--pretend" not in myoptions: headerstring="'\$(Header|Id)" headerstring+=".*\$'" for myfile in myupdates: + if myfile in bin_blobs: + continue myout=getstatusoutput("egrep -q "+headerstring+" "+myfile) if myout[0]==0: myheaders.append(myfile) diff --git a/cnf/etc-update.conf b/cnf/etc-update.conf index 06c46ad74..12396b3b4 100644 --- a/cnf/etc-update.conf +++ b/cnf/etc-update.conf @@ -1,5 +1,5 @@ +# /etc/etc-update.conf: config file for `etc-update` utility # edit the lines below to your liking -# $Id: etc-update.conf 3483 2006-06-10 21:40:40Z genone $ # mode - 0 for text, 1 for menu (support incomplete) # note that you need dev-util/dialog installed diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 075e2eb87..1de6f8ae1 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1170,16 +1170,6 @@ class depgraph(object): mytype, myroot, mykey = mybigkey - if mytype == "blocks": - if myparent and \ - "--buildpkgonly" not in self.myopts and \ - "--nodeps" not in self.myopts and \ - myparent not in self._slot_collision_nodes: - mybigkey[1] = myparent[1] - self.blocker_parents.setdefault( - tuple(mybigkey), set()).add(myparent) - return 1 - # select the correct /var database that we'll be checking against vardbapi = self.trees[myroot]["vartree"].dbapi portdb = self.trees[myroot]["porttree"].dbapi @@ -1725,8 +1715,17 @@ class depgraph(object): print "Candidates:",mymerge for x in mymerge: selected_pkg = None - if x[0]=="!": - selected_pkg = (["blocks", myroot, x[1:]], None) + if x.startswith("!"): + if "--buildpkgonly" not in self.myopts and \ + "--nodeps" not in self.myopts and \ + myparent not in self._slot_collision_nodes: + p_type, p_root, p_key, p_status = myparent + if p_type != "installed" and p_status != "merge": + # It's safe to ignore blockers from --onlydeps nodes. + continue + self.blocker_parents.setdefault( + ("blocks", p_root, x[1:]), set()).add(myparent) + continue else: #We are not processing a blocker but a normal dependency if myparent: diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 924be6f69..cd1ff69aa 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3353,6 +3353,9 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m mysettings["PF"] = mypv mysettings["PORTDIR"] = os.path.realpath(mysettings["PORTDIR"]) + mysettings["DISTDIR"] = os.path.realpath(mysettings["DISTDIR"]) + mysettings["RPMDIR"] = os.path.realpath(mysettings["RPMDIR"]) + mysettings["ECLASSDIR"] = mysettings["PORTDIR"]+"/eclass" mysettings["SANDBOX_LOG"] = mycpv.replace("/", "_-_") diff --git a/pym/portage/cvstree.py b/pym/portage/cvstree.py index ca94d3512..f74ecd4ac 100644 --- a/pym/portage/cvstree.py +++ b/pym/portage/cvstree.py @@ -72,7 +72,24 @@ def findnew(entries,recursive=0,basedir=""): for mydir in entries["dirs"]: mylist+=findnew(entries["dirs"][mydir],recursive,basedir+mydir) return mylist - + +def findoption(entries, pattern, recursive=0, basedir=""): + """(entries, pattern, recursive=0, basedir="") + Iterate over paths of cvs entries for which the pattern.search() method + finds a match. Returns a list of paths, optionally prepended with a + basedir.""" + if not basedir.endswith("/"): + basedir += "/" + for myfile, mydata in entries["files"].iteritems(): + if "cvs" in mydata["status"]: + if pattern.search(mydata["flags"]): + yield basedir+myfile + if recursive: + for mydir, mydata in entries["dirs"].iteritems(): + for x in findoption(mydata, pattern, + recursive, basedir+mydir): + yield x + def findchanged(entries,recursive=0,basedir=""): """(entries,recursive=0,basedir="") Recurses the entries tree to find all elements that exist in the cvs tree