Archives for: January 2007, 25

25 January, 2007

Permalink 18:51 UTC, by Marius Mauch Email , 379 words, 2006 views   English (US)
Categories: Gentoo, Portage

Namespace sanitizing and splitting up the tree

Something that's bugged me for while in portage was the crappy namespace handling we had since whenever we moved the python modules to /usr/lib/portage/pym. Originally there was no real problem as we only had a single module portage.py, so all you needed was a 'import portage', but over time more modules were created, which Nick started to name portage_foo.py due to the lack of a "portage" python package to use as container. Also there were a number of modules without any "portage" part in the name, such as xpak, cvstree, output or the cache package, which could potentially cause a namespace collision with other packages in site-packages or even the standard library, not a very pleasant thought.
But as of today that's history, I finally fixed this annoyance and moved all the portage related code into the new "portage" package (so portage.py is now portage/__init__.py and portage_foo.py is now portage/foo.py). For now the code is mostly a 1:1 translation, but over time it hopefully gets a bit cleaner by removing redundant qualifiers. Also this now allows us to split the big portage.py (or now __init__.py) up further without fearing namespace collisions, I'll probably move the dbapi classes into their own package later this week.
But what does this all mean to you? If you're just a normal user it shouldn't affect you in any way (assuming I didn't screw up anything and Zac updates the ebuild accordingly). If you have some custom scripts or are a developer of a tool using the portage API you should prepare for updating it after portage-2.1.3 is released, though for the time being the old names should just continue to work as I've also added some symlinks to avoid a large-scale API breakage.

On another note I fully agree with Diego on the idea of splitting the tree up. I've never been a big fan of the recent overlay hype, but at this point it's still manageable. Also besides any technical problems a tree split would increase the "repo hunting" problem which we're already starting to see and is IMHO one of the major downsides of most other (rpm-based) distributions, and that's something I'd like to avoid in Gentoo.

Marius Mauch

January 2007
Mon Tue Wed Thu Fri Sat Sun
<< < Current > >>
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 39

powered by
b2evolution