Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 22080 Details for
Bug 34964
[PATCH] BUILD_PKGS=... : a configurable "buildpkg" replacement
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
custom-buildpkg-2.0.50_pre1.patch
custom-buildpkg-2.0.50_pre1.patch (text/plain), 5.10 KB, created by
TGL
on 2003-12-12 03:46:28 UTC
(
hide
)
Description:
custom-buildpkg-2.0.50_pre1.patch
Filename:
MIME Type:
Creator:
TGL
Created:
2003-12-12 03:46:28 UTC
Size:
5.10 KB
patch
obsolete
>diff -uNr portage-2.0.50_pre1/bin/emerge portage-2.0.50_pre1.work/bin/emerge >--- portage-2.0.50_pre1/bin/emerge 2003-12-10 23:44:07.000000000 +0100 >+++ portage-2.0.50_pre1.work/bin/emerge 2003-12-12 11:19:55.886854685 +0100 >@@ -165,11 +165,9 @@ > print "emerge: can't specify both of \"--tree\" and \"--columns\"." > sys.exit(1) > >-# Always create packages if FEATURES=buildpkg > # Imply --buildpkg if --buildpkgonly >-if ("buildpkg" in portage.features) or ("--buildpkgonly" in myopts): >- if "--buildpkg" not in myopts: >- myopts.append("--buildpkg") >+if ("--buildpkgonly" in myopts) and ("--buildpkg" not in myopts): >+ myopts.append("--buildpkg") > > # Also allow -S to invoke search action (-sS) > if ("--searchdesc" in myopts): >@@ -1350,7 +1348,47 @@ > > def outdated(self): > return self.outdatedpackages >- >+ >+ #buildpkg: check if a package is in system >+ def issyspkg(self,mycpv): >+ mykey=portage.cpv_getkey(mycpv) >+ myreturn=0 >+ mysysdict=genericdict(syslist) >+ if mysysdict.has_key(mykey): >+ myreturn=1 >+ # FIXME: this won't recognize packages emerged for the fisrt time if they >+ # are not the default for their virtuals. >+ else: >+ myvirtdict=portage.grabdict(portage.root+"var/cache/edb/virtuals") >+ for myvirt in myvirtdict.keys(): >+ if mykey in myvirtdict[myvirt] and mysysdict.has_key(myvirt): >+ myreturn=1 >+ break >+ return myreturn >+ >+ # buildpkg: check if a package should be kept as a binary tbz2 >+ def istobuildpkg(self,mycpv): >+ mykey=portage.cpv_getkey(mycpv) >+ mycat=mykey.split("/")[0] >+ mybuildpolicy=self.pkgsettings["BUILD_PKGS"].split() >+ # A package will be kept if it matches at least one positive rules, >+ # and no negative rule. >+ myreturn=0 >+ for myrule in mybuildpolicy: >+ if myrule[0]=="!": >+ myret=0 >+ myrule=myrule[1:] >+ else: >+ myret=1 >+ if (myrule=="system" and self.issyspkg(mycpv)) \ >+ or myrule=="*" or myrule==mycat or myrule==mykey: >+ myreturn=myret >+ if myret==0: >+ break >+ if myreturn: >+ print ">>> We'll keep a binary tarball of this package." >+ return myreturn >+ > def merge(self,mylist): > returnme=0 > mymergelist=[] >@@ -1366,8 +1404,6 @@ > if ("--pretend" not in myopts): > sys.exit(1) > >- #buildsyspkg: I need mysysdict also on resume (moved from the else block) >- mysysdict=genericdict(syslist) > if ("--resume" in myopts): > # We're resuming. > print green("*** Resuming merge...") >@@ -1378,6 +1414,7 @@ > else: > myfavs=portage.grabfile(portage.root+"var/cache/edb/world") > myfavdict=genericdict(myfavs) >+ mysysdict=genericdict(syslist) > for x in range(len(mylist)): > if mylist[x][3]!="nomerge": > # Add to the mergelist >@@ -1418,10 +1455,6 @@ > print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1] > emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1]) > self.pkgsettings["EMERGE_FROM"] = x[0][:] >- #buildsyspkg: Check if we need to _force_ binary package creation >- issyspkg = ("buildsyspkg" in myfeat) \ >- and mysysdict.has_key(portage.cpv_getkey(x[2])) \ >- and not ("--buildpkg" in myopts) > if x[0] in ["ebuild","blocks"]: > if (x[0]=="blocks") and ("--fetchonly" not in myopts): > raise Exception, "Merging a blocker" >@@ -1433,11 +1466,7 @@ > print > returnme=1 > continue >- elif "--buildpkg" in myopts or issyspkg: >- #buildsyspkg: Sounds useful to display something, but I don't know if we should also log it >- if issyspkg: >- print ">>> This is a system package, let's pack a rescue tarball." >- #emergelog(">>> This is a system package, let's pack a rescue tarball.") >+ elif ("--buildpkg" in myopts) or ("buildpkg" in portage.features and self.istobuildpkg(x[pkgindex])): > #create pkg, then merge pkg > emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+x[pkgindex]+"::"+y+")") > retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug) >@@ -2083,7 +2112,7 @@ > myvars=['GENTOO_MIRRORS', 'CONFIG_PROTECT', 'CONFIG_PROTECT_MASK', > 'PORTDIR', 'DISTDIR', 'PKGDIR', 'PORTAGE_TMPDIR', 'PORTDIR_OVERLAY', > 'USE', 'COMPILER', 'CHOST', 'CFLAGS', 'CXXFLAGS','ACCEPT_KEYWORDS', >- 'MAKEOPTS', 'AUTOCLEAN', 'SYNC', 'FEATURES'] >+ 'MAKEOPTS', 'AUTOCLEAN', 'SYNC', 'FEATURES', 'BUILD_PKGS'] > myvars.sort() > for x in myvars: > print x+'="'+portage.settings[x]+'"' >diff -uNr portage-2.0.50_pre1/pym/portage.py portage-2.0.50_pre1.work/pym/portage.py >--- portage-2.0.50_pre1/pym/portage.py 2003-12-10 23:44:34.000000000 +0100 >+++ portage-2.0.50_pre1.work/pym/portage.py 2003-12-12 11:03:38.745005693 +0100 >@@ -178,7 +178,7 @@ > writemsg(red("*** Please add this user to the portage group if you wish to use portage.\n")) > writemsg("\n") > >-incrementals=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"] >+incrementals=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK","BUILD_PKGS"] > stickies=["KEYWORDS_ACCEPT","USE","CFLAGS","CXXFLAGS","MAKEOPTS","EXTRA_ECONF","EXTRA_EMAKE"] > > def getcwd():
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34964
:
21634
|
21963
|
22080
|
22081
|
23379
|
23380
|
23666
|
23673
|
24890
|
71430
|
71431
|
71432