Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7710 - Portage overlay support for categories
Summary: Portage overlay support for categories
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Depends on:
Reported: 2002-09-09 16:38 UTC by Pat Double
Modified: 2011-10-30 22:38 UTC (History)
3 users (show)

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

Patch to add portage overlay support for categories (,624 bytes, patch)
2005-04-25 14:24 UTC, Luc Simard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pat Double 2002-09-09 16:38:08 UTC
I'd like to see an enhancement to the portage overlay feature. It works great  
now if you use the same categories that exist in the official portage tree.  
However, if you create your own category directory, then packages inside it  
won't be found. You must add the category to /usr/portage/profiles/categories,  
which gets wiped out during an rsync. It would be nice if the overlay code  
would append the overlay category file (like /opt/portage/profiles/categories)  
to the list defined in /usr/portage/profiles/categories.
Comment 1 TGL 2003-06-22 18:29:53 UTC
I use a /etc/portage/categories file to list my custom categories, and apply the following one line patch to /usr/lib/python2.2/site-packages/ (somwhere around line 4966):

+ categories+=grabfile("/etc/portage/categories")

I think the only potential issue is if user adds some already defined categories to is own list, then there will be some duplicates. I don't know their potential effect. But it's easy to replace the += to take care of this.
Comment 2 David Bryson (RETIRED) gentoo-dev 2003-09-17 18:04:54 UTC
Why can't one just have ${PORTAGE_OVERLAY}/profiles/categories ?
this seems to me like the easiest solution

the user can then define thier own explicitly, or just cp the categories from the real portage tree for some defaults.
Comment 3 TGL 2003-09-19 17:13:48 UTC
Actually /etc/portage/categories support has been introduced by 
portage-2.0.49_pre18. This bug can be closed.
Comment 4 Luc Simard 2005-04-25 14:24:31 UTC
Created attachment 57219 [details, diff]
Patch to add portage overlay support for categories

I know that this bug is fixed, but here's a patch for those interested to add a
portage overlay support for categories

Take note that this patch has been created for Portage
Comment 5 Benoit Boissinot 2005-09-10 04:05:51 UTC
I had the following traceback with portage 2.0.52-r1:

>>> Updating Portage cache:   17%Traceback (most recent call last):
  File "/usr/bin/emerge", line 2731, in ?
    cleanse_cache(pdb, oldcat, savelist)
  File "/usr/bin/emerge", line 2706, in cleanse_cache
    for pv in pdb.auxdb[porttree_root][cat].keys():
KeyError: 'cross-alpha-unknown-linux-gnu'

I have cross-alpha-unknown-linux-gnu in /etc/portage/categories and in my overlay.
If i remove /etc/portage/categories, the traceback goes away.
Is this intended ? or should i open a new bug ?