Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350724 - app-shells/zsh-completion: Small Improvements regarding portage
Summary: app-shells/zsh-completion: Small Improvements regarding portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Tim Harder
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 17:52 UTC by Johannes Battenberg
Modified: 2014-11-27 07:30 UTC (History)
1 user (show)

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


Attachments
enhanced _gentoo_packages (_gentoo_packages,6.18 KB, text/plain)
2011-01-05 17:53 UTC, Johannes Battenberg
Details
diff to the old file (_gentoo_packages.diff,493 bytes, patch)
2011-01-05 17:54 UTC, Johannes Battenberg
Details | Diff
modified _portage file (_portage,13.89 KB, text/plain)
2011-01-12 19:56 UTC, Johannes Battenberg
Details
diff to the old _portage file (_portage.diff,400 bytes, patch)
2011-01-12 19:57 UTC, Johannes Battenberg
Details | Diff
updated _portage skript (_portage,13.98 KB, text/plain)
2011-01-13 19:46 UTC, Johannes Battenberg
Details
diff to _portage file from zsh-completion-20091203-r1 (_portage.diff,587 bytes, patch)
2011-01-13 19:49 UTC, Johannes Battenberg
Details | Diff
zsh-completion ebuild to enable portage 2.2 specific stuff (zsh-completion-20091203-r2.ebuild,1.37 KB, text/plain)
2011-01-14 20:13 UTC, Johannes Battenberg
Details
patch to current _gentoo_packages (_gentoo_packages.patch,1.26 KB, patch)
2011-01-14 20:15 UTC, Johannes Battenberg
Details | Diff
patch to current _portage file (_portage.patch,1.97 KB, text/plain)
2011-01-14 20:16 UTC, Johannes Battenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Battenberg 2011-01-05 17:52:44 UTC
I noticed packages in layman overlays are not shown for completion, neither are sets as introduced in portage 2.2. I fixed both as described below.

I tweaked _gentoo_packages (usually found in /usr/share/zsh/site-functions) to include layman's make.conf for overlays which fixed the first issue.
Second I added all sets defined in /etc/portage/sets or any overlay containing as 'sets' subdirectory.
So far it seems to work flawlessly, though I'm not quite sure I've chosen the best approach.

As attachements there's the new _gentoo_packages file as well as a diff to the old version.

Reproducible: Always
Comment 1 Johannes Battenberg 2011-01-05 17:53:52 UTC
Created attachment 258960 [details]
enhanced _gentoo_packages
Comment 2 Johannes Battenberg 2011-01-05 17:54:59 UTC
Created attachment 258961 [details, diff]
diff to the old file
Comment 3 Johannes Battenberg 2011-01-12 19:56:31 UTC
Created attachment 259645 [details]
modified _portage file

As I noticed --depclean does not include packages for completion. At least in portage 2.2 (don't know about earlier versions) it can and should be used to uninstall specific packages.
In difference to -C it checks if a package depends on the selected package, delivering a safer method to unmerge without accidently breaking something else.

The attached _portage file adds installed packages as completions for --depclean (and contains a modified description, of course)
Comment 4 Johannes Battenberg 2011-01-12 19:57:13 UTC
Created attachment 259647 [details, diff]
diff to the old _portage file
Comment 5 Johannes Battenberg 2011-01-13 19:46:15 UTC
Created attachment 259736 [details]
updated _portage skript

included option "--keep-going"
Comment 6 Johannes Battenberg 2011-01-13 19:49:51 UTC
Created attachment 259739 [details, diff]
diff to _portage file from zsh-completion-20091203-r1
Comment 7 Johannes Battenberg 2011-01-14 20:13:38 UTC
Created attachment 259882 [details]
zsh-completion ebuild to enable portage 2.2 specific stuff

I modified the existing ebuild to incorporate my modifications. Since most (if not all) features I included are part only included in portage 2.2, they are not included by default.
Right now I check if portage 2.2 is installed, if so I apply the two respective patches.
As a consequence I replaced the regular diff files with actual patches, as usual these go into the ./files directory.
Comment 8 Johannes Battenberg 2011-01-14 20:15:20 UTC
Created attachment 259884 [details, diff]
patch to current _gentoo_packages
Comment 9 Johannes Battenberg 2011-01-14 20:16:02 UTC
Created attachment 259886 [details]
patch to current _portage file
Comment 10 Nikolaj Šujskij 2012-08-20 18:22:31 UTC
It's a strange thing nobody has ever responded here.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-08-20 18:26:04 UTC
(In reply to comment #10)
> It's a strange thing nobody has ever responded here.

Not really.

The package is not maintained well in Gentoo, seems that no one cares about it since 2009 (the last version). Luckily, there is user interest such as Johannes to provide patches on bugzilla.
Comment 12 Johannes Battenberg 2012-08-21 13:24:44 UTC
This was just a small improvement, there are still things not working as intended (not just concerning portage). I switched to paludis a while back and thus haven’t worked on this any further.
I am on the verge to switch back to portage. Chances are good I’ll take up the work on zsh-completion again, provided I have enough time on my hands.

Should I continue to work on the completion scripts, I may as well just maintain them.
Comment 13 Tim Harder gentoo-dev 2014-11-27 07:30:19 UTC
I'm trying to reinvigorate gentoo zsh completion development, the new canonical repo is currently at https://github.com/radhermit/gentoo-zsh-completions.

I incorporated a few of these changes but some were a bit old compared to the current sources. Going forward, please either open issues or submit pull requests against the upstream github repo instead of opening bugs here.

Non-dev contributors who prove they're able and willing to aid development can be given push access to the github repo.