* [gentoo-dev] portage suggestion
@ 2002-12-15 18:23 Jean-Francois Patenaude
2002-12-15 18:26 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Francois Patenaude @ 2002-12-15 18:23 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Related to this comment in the emerge manpage:
--update (-u)
Updates packages to the most recent version available. Note that
--update does not have full functionality yet. It will not
automatically update dependencies of packages in the world file,
unless they too are in the world file.
I created a kind of "emerge --update universe" that you can find
in the attached patch. Comments are welcome !
The patch applies over portage 2.0.45-r5
md5sum of the original emerge: 7eb429e274ff9713270b1a7b3649c22e
Jf.
[-- Attachment #2: Type: text/plain, Size: 5203 bytes --]
--- emerge 2002-12-13 19:15:34.000000000 -0500
+++ emerge-universe 2002-12-15 12:58:00.000000000 -0500
@@ -14,7 +14,7 @@
#number of ebuilds merged
merged=0
params=["selective", "deep", "self", "recurse", "empty"]
-actions=["clean", "config", "help", "info", "prune", "rsync", "search", "sync", "system", "unmerge", "world", "inject", "regen", "depclean"]
+actions=["clean", "config", "help", "info", "prune", "rsync", "search", "sync", "system", "unmerge", "world", "universe", "inject", "regen", "depclean"]
options=["--autoclean", "--deep", "--selective", "--buildpkg", "--debug", "--nodeps", "--emptytree", "--fetchonly",
"--noreplace", "--onlydeps", "--pretend", "--usepkg", "--usepkgonly", "--searchdesc", "--verbose", "--update", "--help", "--oneshot", "--version"]
@@ -82,6 +82,7 @@
print " Cleans the system by removing outdated packages which will not"
print " remove functionalities or prevent your system from working."
print " The arguments can be in several different formats :"
+ print " * universe "
print " * world "
print " * system "
print " * /var/db/pkg/category/package-version, or"
@@ -351,8 +352,8 @@
else:
myfiles.append(x)
-if (myaction in ["world", "system"]) and myfiles:
- print "emerge: please specify a package class (\"world\" or \"system\") or individual packages, but not both."
+if (myaction in ["universe", "world", "system"]) and myfiles:
+ print "emerge: please specify a package class (\"universe\", \"world\" or \"system\") or individual packages, but not both."
sys.exit(1)
# Always create packages if FEATURES=buildpkg
@@ -384,7 +385,7 @@
pass
elif (not myaction) and (not myfiles):
pass
- elif ("--pretend" in myopts) and (myaction in ["world","system","clean","prune","unmerge"]):
+ elif ("--pretend" in myopts) and (myaction in ["universe", "world","system","clean","prune","unmerge"]):
pass
else:
print "myaction",myaction
@@ -420,7 +421,7 @@
add.extend(["deep"])
if "--selective" in myopts:
add.extend(["selective"])
-if myaction in ["world","system"]:
+if myaction in ["universe", "world","system"]:
add.extend(["selective"])
elif myaction in ["depclean"]:
sub.extend(["selective"])
@@ -597,6 +598,8 @@
sys.exit(1)
elif mode=="world":
pfile=portage.root+"var/cache/edb/world"
+ elif mode=="universe":
+ pfile=portage.root+"var/cache/edb/universe"
try:
myfile=open(pfile,"r")
mylines=myfile.readlines()
@@ -895,6 +898,27 @@
global syslist
if mode=="system":
mylist=syslist
+ elif mode=="universe":
+ #universe mode
+ universelist=getlist("universe")
+ sysdict=genericdict(syslist)
+ universedict=genericdict(universelist)
+ #we're effectively upgrading sysdict to contain all new deps from universedict
+ for x in universedict.keys():
+ #only add the universe node if the package is:
+ #actually installed -- this prevents the remerging of already unmerged packages when we do a universe --update;
+ #actually available -- this prevents emerge from bombing out due to no match being found (we want a silent ignore)
+ if "empty" in myparams:
+ if portage.db["/"]["vartree"].dbapi.match(x):
+ sysdict[x]=universedict[x]
+ elif portage.db[portage.root]["vartree"].dbapi.match(x):
+ #package is installed
+ sysdict[x]=universedict[x]
+ else:
+ print "\n*** Package in universe file is not installed: "+x
+ mylist=[]
+ for x in sysdict.keys():
+ mylist.append(sysdict[x])
else:
#world mode
worldlist=getlist("world")
@@ -1151,11 +1175,11 @@
candidate_catpkgs=[]
global_unmerge=0
- if not unmerge_files or "world" in unmerge_files or "system" in unmerge_files:
+ if not unmerge_files or "world" in unmerge_files or "system" in unmerge_files or "universe" in unmerge_files:
if "unmerge"==unmerge_action:
print
print bold("emerge unmerge")+" can only be used with specific package names, not with "+bold("world")+" or"
- print bold("system")+" targets."
+ print bold("system")+" or "+bold("universe")+" targets."
print
return 0
else:
@@ -1164,7 +1188,7 @@
localtree=portage.db[portage.root]["vartree"]
# process all arguments and add all valid db entries to candidate_catpkgs
if global_unmerge:
- if not unmerge_files or "world" in unmerge_files:
+ if not unmerge_files or "world" in unmerge_files or "universe" in unmerge_files:
candidate_catpkgs.extend(localtree.getallnodes())
elif "system" in unmerge_files:
candidate_catpkgs.extend(getlist("system"))
@@ -1686,7 +1710,11 @@
mydepgraph=depgraph(myaction,myopts)
favorites=[]
syslist=getlist("system")
- if myaction in ["system","world"]:
+ if myaction in ["system","world","universe"]:
+ if "universe"==myaction:
+ print "Creating universe",
+ os.system ( '/usr/lib/portage/bin/pkglist | /bin/sed \'s/\-[0-9].*$//\' > /var/cache/edb/universe' )
+ print "...done!"
print "Calculating",myaction,"dependencies ",
if not mydepgraph.xcreate(myaction):
sys.exit(1)
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] portage suggestion
2002-12-15 18:23 [gentoo-dev] portage suggestion Jean-Francois Patenaude
@ 2002-12-15 18:26 ` Mike Frysinger
2002-12-21 19:49 ` [gentoo-dev] a --deep question Jean-Francois Patenaude
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2002-12-15 18:26 UTC (permalink / raw
To: gentoo-dev
`emerge world --update --deep` updates dependencies of packages in the world
file ...
-mike
On Sunday 15 December 2002 13:23, Jean-Francois Patenaude wrote:
> Related to this comment in the emerge manpage:
>
> --update (-u)
> Updates packages to the most recent version available. Note that
> --update does not have full functionality yet. It will not
> automatically update dependencies of packages in the world file,
> unless they too are in the world file.
>
> I created a kind of "emerge --update universe" that you can find
> in the attached patch. Comments are welcome !
>
> The patch applies over portage 2.0.45-r5
> md5sum of the original emerge: 7eb429e274ff9713270b1a7b3649c22e
>
> Jf.
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-dev] a --deep question
2002-12-15 18:26 ` Mike Frysinger
@ 2002-12-21 19:49 ` Jean-Francois Patenaude
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Francois Patenaude @ 2002-12-21 19:49 UTC (permalink / raw
To: gentoo-dev
Hello,
There's something I don't understand. Why the --deep option doesn't
flag the "glib" package as needing to be updated. I also looked in the
"emerge depclean" to make sure it wasn't there .. And what's happening
with that last cut/paste ? Why is there two packages, with the same name,
being a dependency of GTK ..
===========================================================
rabbit root # emerge --pretend --deep --update world
These are the packages that I would merge, in order:
Calculating world dependencies ...done!
[ebuild U ] net-im/gaim-0.59.6 [0.59.3-r0]
rabbit root #
===========================================================
rabbit root # emerge -s 'glib$'
Searching...
[ Results for search key : glib$ ]
[ Applications found : 1 ]
* dev-libs/glib
Latest version available: 2.0.7
Latest version installed: 1.2.10-r5
Size of downloaded files: 1,475 kB
Homepage: http://www.gtk.org/
Description: The GLib library of C routines
rabbit root #
===========================================================
rabbit root # emerge --pretend --update glib
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] dev-util/pkgconfig-0.14.0
[ebuild U ] dev-libs/glib-2.0.7 [1.2.10-r5]
rabbit root #
===========================================================
rabbit root # emerge --pretend -e gtk+ | grep 'glib-'
[ebuild N ] dev-libs/glib-2.0.7
[ebuild N ] dev-libs/glib-1.2.10-r5
rabbit root #
===========================================================
On Sun, 15 Dec 2002, Mike Frysinger wrote:
> `emerge world --update --deep` updates dependencies of packages in the world
> file ...
> -mike
>
> On Sunday 15 December 2002 13:23, Jean-Francois Patenaude wrote:
> > Related to this comment in the emerge manpage:
> >
> > --update (-u)
> > Updates packages to the most recent version available. Note that
> > --update does not have full functionality yet. It will not
> > automatically update dependencies of packages in the world file,
> > unless they too are in the world file.
> >
> > I created a kind of "emerge --update universe" that you can find
> > in the attached patch. Comments are welcome !
> >
> > The patch applies over portage 2.0.45-r5
> > md5sum of the original emerge: 7eb429e274ff9713270b1a7b3649c22e
> >
> > Jf.
>
> --
> gentoo-dev@gentoo.org mailing list
>
>
/\/\/\/\/\/\/\/
Jean-Francois Patenaude
MGR EXPERT. CTRE CLIENTS SERV. / DIR. CTRE EXP. SERVICE CLIENTS
1050 BEAVER HALL, SUITE 960 MONTREAL (QUEBEC) H2Z 1S4
Telephone (514) 870-4323 Pager (514) 330-4479
AlphaNum Pager http://teleav.bellmobilite.ca/ <ALIAS: patch>
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ jf.patenaude@bell.ca
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-21 19:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-15 18:23 [gentoo-dev] portage suggestion Jean-Francois Patenaude
2002-12-15 18:26 ` Mike Frysinger
2002-12-21 19:49 ` [gentoo-dev] a --deep question Jean-Francois Patenaude
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox