Summary: | Portage overlay support for categories | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Pat Double <gentoo> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | benoit.boissinot, gentoo, vapier |
Priority: | High | ||
Version: | 2.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch to add portage overlay support for categories |
Description
Pat Double
2002-09-09 16:38:08 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/portage.py (somwhere around line 4966): -------------------------------------------------------------------------------- categories=grabfile(settings["PORTDIR"]+"/profiles/categories") else: categories=[] + + categories+=grabfile("/etc/portage/categories") pkgmasklines=grabfile(settings["PORTDIR"]+"/profiles/package.mask") pkgmasklines+=grabfile("/etc/portage/profiles/package.mask") -------------------------------------------------------------------------------- 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. 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. Actually /etc/portage/categories support has been introduced by portage-2.0.49_pre18. This bug can be closed. 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 2.0.51.19.
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 ?
|