Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350186 - app-shells/gentoo-bashcomp: completion of options for majority of equery modules is outdated
Summary: app-shells/gentoo-bashcomp: completion of options for majority of equery modu...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on: 350179
Blocks:
  Show dependency tree
 
Reported: 2010-12-30 21:19 UTC by Jacek Sowiński
Modified: 2021-04-18 16:16 UTC (History)
1 user (show)

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


Attachments
Update options completion for majority of equery modules (0002-Update-options-completion-for-majority-of-equery-mod.patch,3.64 KB, patch)
2012-04-24 14:27 UTC, Jacek Sowiński
Details | Diff
Fix completion for `equery belongs` (0003-Fix-completion-for-equery-belongs.patch,2.26 KB, patch)
2012-04-24 14:29 UTC, Jacek Sowiński
Details | Diff
Completion for `equery changes` (0004-Completion-for-equery-changes.patch,1.85 KB, patch)
2012-04-24 14:31 UTC, Jacek Sowiński
Details | Diff
Update equery module list (0005-Update-equery-module-list.patch,1.57 KB, patch)
2012-04-24 14:35 UTC, Jacek Sowiński
Details | Diff
Completion for `equery has` options (0006-Completion-for-equery-has-options.patch,1.03 KB, patch)
2012-04-24 14:35 UTC, Jacek Sowiński
Details | Diff
Preliminary support for `equery keywords` (0007-Preliminary-support-for-equery-keywords.patch,1.70 KB, patch)
2012-04-24 14:36 UTC, Jacek Sowiński
Details | Diff
Proper calling of _pkgname() in `equery list` (0008-Proper-calling-of-_pkgname-in-equery-list.patch,1.41 KB, patch)
2012-04-24 14:36 UTC, Jacek Sowiński
Details | Diff
Check options in `equery list` further than just in $prev (0009-Check-options-in-equery-list-further-than-just-in-pr.patch,1.27 KB, patch)
2012-04-24 14:37 UTC, Jacek Sowiński
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Sowiński 2010-12-30 21:19:32 UTC
I made a list of modules where options shown in output of `equery _module_ --help` and output of `equery _module_ -<TAB><TAB>` are different.

1. belongs
2. check
3. depends
4. depgraph
5. files
6. list
7. size
8. uses
9. which

Options of 'uses' and 'which' modules are updated in my patch for #350179

Now there is a question about conflict between options from gentoolkit-0.2.* and gentoolkit-0.3.*. Maybe this is the time to distribute gentoolkit completion file with gentoolkit package?
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-30 21:36:14 UTC
(In reply to comment #0)
> I made a list of modules where options shown in output of `equery _module_
> --help` and output of `equery _module_ -<TAB><TAB>` are different.
> 
> 1. belongs
> 2. check
> 3. depends
> 4. depgraph
> 5. files
> 6. list
> 7. size
> 8. uses
> 9. which
> 
> Options of 'uses' and 'which' modules are updated in my patch for #350179
> 
> Now there is a question about conflict between options from gentoolkit-0.2.*
> and gentoolkit-0.3.*. Maybe this is the time to distribute gentoolkit
> completion file with gentoolkit package?
> 

It is always better if "upstream" maintains their own bash-completion file. I'm fine with either way but rely on contributors for the gentoo-bashcomp package, so it lags in quality.
Comment 2 Jacek Sowiński 2010-12-30 23:13:15 UTC
How about making a branch for gentoolkit-0.2.* and telling gentoolkit guys to grab completion file from trunk or this branch (depending on gentoolkit version of course) before each release?

It would be perfect if both gentoolkit and gentoo-bashcomp would be version-controlled with git — submodules support is there very nice (example: Flaggie and completion file for it: http://github/mgorny/flaggie).
Comment 3 Jacek Sowiński 2010-12-30 23:21:12 UTC
(In reply to comment #1)

Another approach is to:

1. make a branch in gentoo-bashcomp for gentoolkit-0.2.*
2. commit fixes in completion for 0.2.* line there
3. continue to release this branch as stable one
4. commit fixes and updates for gentoolkit-0.3.* to trunk
5. make gentoo-bashcomp-999999999.ebuild
Comment 4 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-31 20:02:16 UTC
Jacek, fine and dandy idea but I've become the defacto sole committer to gentoo-bashcomp and I don't want to create more work :)
Comment 5 Jacek Sowiński 2012-04-24 09:41:53 UTC
(In reply to comment #4)
> Jacek, fine and dandy idea but I've become the defacto sole committer to
> gentoo-bashcomp and I don't want to create more work :)

Alright, gentoolkit-0.3* is stable now. How about updating gentoo-bashcomp?
I've forked repo from git.overlys... and did some work at: https://github.com/mruwek/gentoo-bashcomp Take a look.
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-24 12:41:09 UTC
Great. Attach some git format patches and I will apply them all.
Comment 7 Jacek Sowiński 2012-04-24 14:19:18 UTC
(In reply to comment #6)
> Great. Attach some git format patches and I will apply them all.

I thought that it will be easier to just pull those changesets from my repo, but as You wish ;)
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-24 14:23:43 UTC
I just can't envision a good workflow from github -> gentoo to be honest. What would you do to merge the changes?
Comment 9 Jacek Sowiński 2012-04-24 14:27:49 UTC
Created attachment 309917 [details, diff]
Update options completion for majority of equery modules

modules updated: 
     belongs,
     check,
     depends,
     depgraph,
     files,
     list,
     size.
Comment 10 Jacek Sowiński 2012-04-24 14:29:37 UTC
Created attachment 309919 [details, diff]
Fix completion for `equery belongs`

1. Remove -c and --category options as they are not present in
   `equery belongs --help` output.
2. Make code indentation more readable.
3. "Only complete if the previous entry on the command line is not
    a file name." now works properly also with options.
Comment 11 Jacek Sowiński 2012-04-24 14:31:33 UTC
Created attachment 309921 [details, diff]
Completion for `equery changes`

1. There is inconsitency in output of `equery changes --help`:
            * "Usage" and "examples" give different order of args.
            * In "Usage" it is: [options] pkgspec
            * In "examples" it is: pkgspec [options]
2. I chose "examples" approach so:
            * `equery c <TAB><TAB>` will complete pkgspec
            * `equery c -<TAB><TAB>` will complete -h and --help
            * `equery c pkgspec <TAB><TAB>` will complete other options
Comment 12 Jacek Sowiński 2012-04-24 14:34:03 UTC
(In reply to comment #8)
> I just can't envision a good workflow from github -> gentoo to be honest.

Current gentoo-bashcomp repo is powered by git. Isn't it? Can't You just pull to your local repo and from there push to the
git://git.overlays.gentoo.org/proj/gentoo-bashcomp.git ?
Comment 13 Jacek Sowiński 2012-04-24 14:35:06 UTC
Created attachment 309923 [details, diff]
Update equery module list

drop 'glsa' and 'stats'
add 'has' and 'keywords
Comment 14 Jacek Sowiński 2012-04-24 14:35:45 UTC
Created attachment 309925 [details, diff]
Completion for `equery has` options
Comment 15 Jacek Sowiński 2012-04-24 14:36:06 UTC
Created attachment 309927 [details, diff]
Preliminary support for `equery keywords`
Comment 16 Jacek Sowiński 2012-04-24 14:36:27 UTC
Created attachment 309929 [details, diff]
Proper calling of _pkgname() in `equery list`
Comment 17 Jacek Sowiński 2012-04-24 14:37:10 UTC
Created attachment 309931 [details, diff]
Check options in `equery list` further than just in $prev
Comment 18 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-24 16:11:54 UTC
Ok. Thanks. I pushed your updates, I don't see anything wrong if you have tested everything that you wrote.
Comment 19 Jacek Sowiński 2012-04-24 16:50:24 UTC
(In reply to comment #18)
> Ok. Thanks. I pushed your updates, I don't see anything wrong if you have
> tested everything that you wrote.

Yes, I've tested it. First two changes are really old (Dec 2010).

Just out of curiosity: how did you push? I've noticed that commit messages
have spaces instead of newlines now and SHAs are now different from
original ones. If I can fix something in my vcs workflow with next
submissions (they're coming really soon) jut tell me and I'll try :)
Comment 20 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2012-04-24 17:00:25 UTC
Well, by no means am I an expert at git. Here is what I did:

1) Clone your github repo
2) git format-patch -9
3) cd into git.overlays repo
4) git am .../github/000*
5) Reviewed git log then git pushed.

Any advice?
Comment 21 Paul Varner (RETIRED) gentoo-dev 2012-04-24 18:10:21 UTC
When I plan on merging all of the changes I do the following:

$ git checkout master
$ git remote add <remote> <remote url>
$ git fetch <remote>
$ git merge <remote>
$ git push origin master

I find the help at github to be quite useful when trying to figure out the best way to do this stuff.  One of the things I really like about git is as long as I don't do the git push, I can always start over if I mess anything up :)