Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 71957
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Mamoru KOMACHI (RETIRED) <usata@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Bapt <baptiste.daroussin@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
zsh-completion.patch Patch for the update patch Bapt 2004-11-21 09:25 0000 13.90 KB Details | Diff
_gentoo_packages _gentoo_packages text/plain oberyno 2004-12-10 05:06 0000 4.11 KB Details
_portage-04-12-10.patch _portage patch patch oberyno 2004-12-10 05:08 0000 5.29 KB Details | Diff
zsh-completion-20041227.patch global patch patch Bapt 2004-12-27 03:01 0000 31.36 KB Details | Diff
zsh-completion-20050107.patch equery patch patch oberyno 2005-01-07 02:53 0000 8.81 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 71957 depends on: Show dependency tree
Bug 71957 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-11-21 09:23 0000
_gentoo_packages:
        initial creation function to store installed packages and 
        available packages in the cache.
        to use it :_gentoo_packages installed|available
_portage:
        remove _portage_pkglist has we now uses _gentoo_packages installed
        clean _portage_unmerge => _gentoo_packages installed
        clean _portage_pkglist => _gentoo_packages available
_gcc-config:
        make it work correctly

_gentoolkit:
        modify to use _gentoo_packages
_genlop: 
        modify to use _gentoo_packages

TODO:
        view if other function can be removed/cleaned in _portage,  _gentoolkit,
        _genlop
        Do some cleanup in vars in _gentoolkit
        add _ebuild_cache in _gentoo_packages

------- Comment #1 From Bapt 2004-11-21 09:25:24 0000 -------
Created an attachment (id=44419) [details]
Patch for the update

------- Comment #2 From Mamoru KOMACHI (RETIRED) 2004-11-23 03:41:09 0000 -------
I don't think Gentoo completion cache is 
worth to enable(it's not enabled by default 
anyway), but I'll look into it for those who
may want to use it.

------- Comment #3 From Bapt 2004-11-23 06:37:53 0000 -------
Any way, using the completion or not, I think it's a good idea to use
_gentoo_packages or _gentoo_functions for common function to prevent copying
them each time a new function is created, because, if the function is updated,
we only have to do it ones and not for "each copy".

------- Comment #4 From Mamoru KOMACHI (RETIRED) 2004-11-23 07:43:41 0000 -------
Yes, I think it good thing to separate the function
from each files. However, I would also want to 
add oberyno's patch in bug #71532
(it contains many bug fixes). Could you update
your patch to work with his patch? 

------- Comment #5 From oberyno 2004-11-24 03:52:23 0000 -------
I agree with baptux that having packages completed separately is a good thing.
With _gentoo_packages, a user can use premade completion functions for custom commands, with something like this in their .zshrc:
compdef '_gentoo_packages available' ecd
I'm not sure, but I don't think _portage_pkglist was accessible in such a way before when everything was grouped together.

Also, is "_tags packages && " actually doing anything? As far as I know, we're trying to assign a tag to a list, and it doesn't seem to be working.
For example, putting this in a .zshrc should make all packages blue:
zstyle ':completion:*:emerge:*:packages' list-colors '=*=32'
It works for me with _wanted:
_wanted packages expl 'packages' compadd...

I think we should try to keep completion without cache as fast as possible also. In my first bug, I added cache to =pkg-ver, which was much faster than no cache. My last patch removed the cache in favor of matching $PREFIX which was slightly slower than cache. I think a solution that has cache for those who want it and $PREFIX matching for everyone else would work nicely. Also, is cache needed for installed packages?

------- Comment #6 From Bapt 2004-12-01 09:49:18 0000 -------
Sorry I'm leaving for a while in africa, and won't have internet access so I
can't integrate with  a send it before I come back. 

A good idea is to point each part that can be done by a "super function" like
I've done for _portage_packages and write, like that, it would be easier to
write new functions bug #71532.

For the cache your are probably right, no real speed improvements ;)

------- Comment #7 From oberyno 2004-12-10 05:06:38 0000 -------
Created an attachment (id=45679) [details]
_gentoo_packages

Here's a version that's pretty much straight from my last patch.
I couldn't figure out a decent way to source make.conf outside of the _gentoo
functions, so make.conf is sourced within each function.
Also, all cat/pkg completions have the tag "cat_packages".
Oh, and there's no cache.

------- Comment #8 From oberyno 2004-12-10 05:08:37 0000 -------
Created an attachment (id=45680) [details]
_portage patch

------- Comment #9 From Bapt 2004-12-27 03:01:54 0000 -------
Created an attachment (id=46949) [details]
global patch

I'm back, and made some small works.

Here is a global patch (against zsh-completion-20040730) integrated all the
great work made by oberyno, and added some small changes :

_gentoo_packages:
	Added category to list each available category

_gentoolkit:
	Updated to completly use _gentoo_packages and use the new
	installed_versions

I think this time it could be integrated in portage, works great for me ;)


Merry Christmas ;)

------- Comment #10 From oberyno 2005-01-07 02:53:50 0000 -------
Created an attachment (id=47825) [details]
equery patch

Ok, one final patch atop baptux's global patch.
_gentoo_packages:
 useflag completion
_gentoolkit:
 redid equery to work in a state based manner
added all the recent options (hasuse, depends, --filter for files, ...)
--options can be completed after the main argument, i.e., equery size zsh
-<tab> works
list asks for a pattern as per its description
--help is not treated specially; i.e. equery --help files <tab> brings up
belongs args. I'm not quite sure what to do about that.

------- Comment #11 From Mamoru KOMACHI (RETIRED) 2005-01-18 05:14:12 0000 -------
Sorry for the delay. I submitted my thesis yesterday,
so hopefully I have time to check and include this by
the end of his week :)

------- Comment #12 From oberyno 2005-01-20 03:29:21 0000 -------
No problem. Still a couple bugs though.
The description for --fetch-all-uri is wrong. Oops.
"Fetch all possible files for all packages" would be better.

Also, xorg-x11 should be added to opengl-update.

------- Comment #13 From Bapt 2005-01-20 07:35:09 0000 -------
Ok for me it's your turn to work Mamoru all seems ok for everybody...

Good luck for your thesis ;)

------- Comment #14 From Mamoru KOMACHI (RETIRED) 2005-02-22 07:55:52 0000 -------
Thanks for your great work. I like the _gentoo_portage thing.
Tested on several of my servers for several weeks already :)
Commited to CVS.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug