Summary: | [PATCH] migrate emerge internals into the portage api | ||
---|---|---|---|
Product: | Portage Development | Reporter: | David-John Miller <anoyomouse> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | minor | CC: | richardvoigt |
Priority: | High | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Proposed patch
Proposed solution 2 |
Description
David-John Miller
2006-06-15 14:41:05 UTC
Yes it should be moved out of the emerge.. patches welcome! Ideally, the bulk of the code in emerge would be accessible via the portage api. We just haven't gotten around to cleaning it all up yet. Last year I refactored emerge from the (new dead) 2.1-experimental branch: http://dev.gentoo.org/~zmedico/portage/branches/2.1-experimental/bin/emerge I've been thinking about doing it again for current 2.1 and then migrating pieces into the portage api. Created attachment 89319 [details, diff]
Proposed patch
patch against:
# emerge -V
Portage 2.1 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.16-gentoo-r9 x86_64)
This is my first-attempt, it works as far as i've tested (which isn't much, cause my linux is broken)
Hope more can be stripped from emerge in the future!
Created attachment 89325 [details, diff]
Proposed solution 2
Ok, after much testing breaking and finally getting things to emerge (like pychecker), and finally running pychecker, i've discovered a few fucntions and classes that depgraph relies on!
Emerge needs a bot more refactoring work before this class can be set free, but the basics of pulling it out are here (hopefully)
Also had a bit of a mission finding "syslist" which seems to only be defined in special cases, pulling it out might have broken other features of emerge which i have not been able to test, also myopts and myparams seem to be used throughout the script and are NOT passed to the depgraph object, the few cases have been make to use an internal representation of it (self.myparams and self.myopts), myfavorites is also a problem here, because it's also only created in certain cases!
I think i need to find a few portage Devs to help unravel these objects
|