Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143145 - equery list minor bugfix patch and more
Summary: equery list minor bugfix patch and more
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-07 16:46 UTC by Jesper Saxtorph
Modified: 2010-03-06 16:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Examples of usage and output (examples.txt,2.13 KB, text/plain)
2006-08-07 16:49 UTC, Jesper Saxtorph
Details
emerge --info (emerge.info,3.56 KB, text/plain)
2006-08-07 16:50 UTC, Jesper Saxtorph
Details
the full patch (equery-0.1.4-maskinfo-keywordchange-doc.patch,6.91 KB, patch)
2006-08-07 16:53 UTC, Jesper Saxtorph
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Saxtorph 2006-08-07 16:46:39 UTC
The following is made and tested:
- Fixes keyword problems in output.
- Add keyword information for both installed and portage package (for both parts only if it exist)
- Added option too search for changed keywords.
- Added documentation.

I got a puzzled about 'equery list gcc' told me the gcc package marked unstable:
[I--] [ -] sys-devel/gcc-3.4.6-r1 (3.4)
This problem is also described in bug 121220, but since this is only part of what I have looked at / fixed (hopefully ;-) ) I have made a new bug report.

I looked into it and found several problems as far as I could interpret the code (they are all taken care of in the patch):
1) -* overrides arch, but now ~arch
2) The keywords written is taken from install time (assuming vartree is the installed base - is this correct). portage <2.0 did not save keywords wich means no info for those packages. equery then defaults to stable (' '). This can be pretty misleading if you are not aware of it. Further there is no way to see if it is stable or unknown.
3) If a package is installed as ~arch and later made stable, it still shows up as ~arch (maybe a version bump is supposed to be made, but if so, packages are not following it).

The patch solve these problems as follows:
ad 1) Specific arch keywords (arch, ~arch, -arch) take precedence over * keywords (*, ~*, -*). If none of the six are there but we have keywords, fallback on -arch as I understand it should from the 'Ebuild HOWTO'.
ad 2) If there is no keywords from the install, write a '?' to differentiate.
ad 3) Show also portage keywords (by adding an extra character) if it exist.

For both installed and portage keywords I have used a dot '.' to indicate if it does not exist (not installed / not in portage anymore)


I also added a new option. First comes the reason:
When doing these fixes, I also though it would be nice to have an option to see what keywords have changed. In general I use stable packages, but sometimes I install a ~arch or even rarely a -arch package.
One reason for that is a missing feature in stable that I need. I then put a line in package.keywords like
<foo-4.5 ~i386
to have the new feature in 4.4.x but be sure to go stable in 4.5.x versions.
In time the line maybe get outdated since 4.4.7 is marked stable and I want to clean it out of package.keywords to not have it cluttered too much.

So I added an option to list packages with changed keywords since install.
Actually I added two options, so you are able to control if you want to see differences coursed by unknown keywords in installed packages or not. Default is to now list a package if we do not know the keywords installed packages.

Last I added some documentation for the new options and also some kind of documentation for the output information given by equery list.

I hope this is helpfull and will find it way into the official gentoolkit package.
Please inform me if any further information is needed.

Keep up the good work on Gentoo,
Jesper Saxtorph
Comment 1 Jesper Saxtorph 2006-08-07 16:49:07 UTC
Created attachment 93699 [details]
Examples of usage and output
Comment 2 Jesper Saxtorph 2006-08-07 16:50:27 UTC
Created attachment 93700 [details]
emerge --info
Comment 3 Jesper Saxtorph 2006-08-07 16:53:24 UTC
Created attachment 93701 [details, diff]
the full patch

I have made the changes in three steps:
1) Output fix
2) Add option
3) Documentation
If partial patches is needed, just let me know.
Comment 4 Douglas Anderson 2010-03-06 16:13:14 UTC
Thanks very much and sorry that no one paid much attention to you patch.

Thankfully, almost all of the things you suggested have been fixed in the 0.3.0 branch, including a complete rewrite of the list output code and a complete doc rewrite.  The only thing that hasn't come to fruition is the keyword changed patch, though equery meta/epkginfo is quite close. If there's any interest in this capability that's not currently handled by epkginfo (0.3.0 branch) then reopen and attach patch for that.