Bug 154405 - [PATCH]app-portage/portage-utils-0.1.21 add overlays support
|
Bug#:
154405
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: NEW
|
Severity: enhancement
|
Priority: P2
|
|
Resolution:
|
Assigned To: portage-utils@gentoo.org
|
Reported By: samuel.lethiec@intelunix.fr
|
|
Component: Applications
|
|
|
URL:
|
|
Summary: [PATCH]app-portage/portage-utils-0.1.21 add overlays support
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-11-07 15:07 0000
|
Hi, I was patching portage-utils so that it works with paludis, and thus with
overlays, I though others than me might be interested by this.
basicaly, I changed the syntax of the .ebuild.x a bit:
overlay::category/packagename/packageversion.ebuild
where 'overlay' is the name of the overlay (name found in
/path/to/overlay/profile/repo_name otherwise basename( /path/to/overlay) )
This file is still in $portdir but contains ebuild from every overlay (every
overlay that is defined in the $PORTDIR_OVERLAY)
I also added the option --overlay ( -o ) for the qgrep, qsearch and quse tool
(for the last one I just hope it will encourage overlay maintainers to describe
their own flag in the correspondant files ( profiles/desc/* and
profiles/use.*desc )
This option allow you to do the given action for only one overlay.
AFAIK, portage doesn't have yet an option to list overlay. that's why I added
the option --ls-overlays (-l) to base tool 'q' ( q --ls-overlays )
Hope you'll like it. Every comment is welcomed.
(In reply to comment #2)
> (From update of attachment 101420 [details] [edit])
> post a new patch that isnt full of pointless whitespace changes
>
white space change are there for the better, just keep them, I just correct
what wasn't correct from the beginning..
Anyway, I don't see any problem. but feel free to remove them
i'm not going to pick through and figure out what is legit changes and what is
whitespace
as for it being "for the better", that's nice, see above
ok, I did delete the 'useless' part of the patch, so here is the new against
your tarball
but you didnt ... that still contains pointless changes:
- whitespace changes == noise
- do not change portage -> paludis
- do not insert spurious whitespace
- do not omit whitespace where it belongs
- cuddle braces (except for func def)
- do not cast xmalloc() return
ignoring all that, rather than having a portage tree var and an overlay var,
it'd probably simplify thing to just have a list of trees to search
(In reply to comment #8)
> but you didnt ... that still contains pointless changes:
> - do not change portage -> paludis
I'm sorry about that
> - do not omit whitespace where it belongs
> - cuddle braces (except for func def)
I don't understand this one:/
> - do not cast xmalloc() return
actually I tried to take the same syntax as you did. just grep for xmallox and
you'll see you're sometimes doing a cast, sometimes not.
> ignoring all that, rather than having a portage tree var and an overlay var,
> it'd probably simplify thing to just have a list of trees to search
actually, since it's a simple chained list, the overlay_gentoo is just the
start of the list.. that makes things simpler, since the 'repodir' is often use
when it HAS to be the portage tree path. (especially for qcache). Doing what
you said would just add useless loop where it is just not needed (I think)
Anyway thanks for your time.
ive cleaned up the cvs tree as i noticed there were inconsistencies
in the README it tells you how to pull from anoncvs
So here is the patch for the revision of today: 20061110
there shouldn't be any space changes, nor cast'ing (?) on xmalloc() return.
Created an attachment (id=101575) [details]
overlay-support.patch
So here is the patch for the revision of today: 20061110
there shouldn't be any space changes, nor cast'ing (?) on xmalloc() return.
I still don't know what you meant with 'cuddle brace'.. (my dictionnary didn't
really help..)
> ignoring all that, rather than having a portage tree var and an overlay var,
> it'd probably simplify thing to just have a list of trees to search
there is an other reason for that, the file .ebuild.x is stored in the
$portdir, and there is only one .ebuild.x file for all overlays
why did you change qglsa in applets.h ? i also still see some xmalloc() casts
in there ...
wonder if it'd be useful to make the overlay option a global one ? maybe not
so much ...
(In reply to comment #17)
> why did you change qglsa in applets.h ?
Actually, I probably should not make this change in the public patch, but since
qglsa is disabled in the Makefile, it just avoids the qglsa symlink to be
created
> i also still see some xmalloc() casts in there ...
oops..
> wonder if it'd be useful to make the overlay option a global one ? maybe not
> so much ...
I don't think, the only applets concerned are qsearch, qgrep, and quse, for the
others it just doesn't have any sense (for qcache: I haven't seen an overlay
with metadata/cache yet, and due to portage log format, it's not easily
possible to add overlay support to qlop too)
Here is a new one (without the qglsa change). It also stops(with an error
message) when the user tries to to select an overlay that doesn't exist (
qapplet --overlay wrong_overlay_name)
The patch also change a little bit test/install/dotest due to a space added in
the "Usage:" help
well I think that's it for the portage part.
btw, once all this will be correct, do you think we can add a "paludis" use
flag, if you say so, i will post the patch too, but, one thing at a time..
I forgot to say:
make -C tests/source/
fails (src.style), but it looks like it's due to some of your recent changes
(most of the incorrect lines are comments)
(In reply to comment #18)
> (for qcache: I haven't seen an overlay with metadata/cache yet
CVS log from 8 weeks, 2 days ago...
Re-wrote qcache to use /var/cache/edb/dep instead of
PORTDIR/metadata/cache....
Created an attachment (id=101954) [details]
overlay-support.patch
(In reply to comment #23)
> (In reply to comment #18)
> > (for qcache: I haven't seen an overlay with metadata/cache yet
>
> CVS log from 8 weeks, 2 days ago(...)
Oh well.. but it is portage which 'generates' /var/cache/edb/dep, So I just
have nothing to do in qcache.c right?
I haven't look in 'the new' qcache.c yet, but do I really need to?
small fix, that so that quse now correctly frees search_vars[idx] when idx=3
(option --format)
Created an attachment (id=102433) [details]
FYI: quse.patch
There was something I've missed a lot, so I added it to quse, you'll tell me if
you like,
I wanted to be able to see the useflag (or whatever search_vars you want) for a
particular package instead of every package (works only with the --all switch)
quse -a rtage-ut
gentoo::app-portage/portage-utils/portage-utils-0.1.20.ebuild python
gentoo::app-portage/portage-utils/portage-utils-0.1.21.ebuild python
local::app-portage/portage-utils/portage-utils-20061122.ebuild python paludis
the diff for this particular change is is the quse.patch, but it is already
included in the overlay-support.patch
I've also made a small change in quse.c, so that it now uses the different
verbosity level.
And, the last change is again in quse.c when doing something like this:
quse -o local -a rtage-ut -vv
local::app-portage/portage-utils/portage-utils-20061122.ebuild python paludis
global:python: Adds support/bindings for the Python language
(local) global:paludis: Add paludis(the other package mangler) support
(with verbose>1 and with the --overlay option ) the flag discription is search
in every overlay and not just the one given as argument to the --overlay option
Created an attachment (id=107119) [details]
overlay-support.patch
hey, I'm just dropping the latest patch here in case someone wanted to look
into it
portage-utils does almost no longer depend on the gentoo overlay, it's now a
simple chain list as suggested.
If you know where to store .ebuild.x and .metadata.x instead of inside the
gentoo tree, then portage-utils won't depend anymore on it.
many things changed, probably too many so that you want review/integrate it.
anyway...
Created an attachment (id=107450) [details]
overlay-support.patch portage2paludis.patch and more..
again a new bump:
portage-utils now use the overlay/profiles/categories, if it exists
when searching the name ( ie not the DESCRIPTION ) it is now possible to make
full use of the atom_explode thing:
eg:
To list every package in the sys-apps category
qsearch sys-apps/
To list every package in the sys-apps category in the overlays the regexp match
pal.*a.$
qsearch sys-apps/::pal.*a.$
or even exlude an overlay while searching
qsearch sthg::[^gentoo]
and so on, a kind of changelog can be found here:
http://fatimademe.free.fr/portage-utils/changelog