Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] the refactoring of emerge, continued... (was PATCH: refactor emerge spinner (#102073))
Date: Fri, 12 Aug 2005 20:50:42
Message-Id: 42FD0D42.3020500@gmail.com
In Reply to: Re: [gentoo-portage-dev] the refactoring of emerge, continued... (was PATCH: refactor emerge spinner (#102073)) by Alec Warner
1 Alec Warner wrote:
2 >
3 > I have emerge rewritten ( somewhere ) for HEAD once all of Brian's
4 > config/domain/crazy stuff goes in, unless someone wants to unlease
5 > modular emerge now, in which case I can pull the code out of the cobwebs
6 > of my ${HOME} and work on it again.
7 >
8 > Basically the code allowed you to have a folder for modules that emerge
9 > would detect at run-time, and load the proper ones depending on user
10 > specification. The bonus to this was that some tools would be merged
11 > into emerge instead of being seperate, which many users got upset about.
12 > "emerge --rebuild" = revdep-rebuild -X for example. The main problem
13 > with this is basically the same as above; emerge serves about 12
14 > different functions with crappy code everywhere, I managed to replicate
15 > about half the functionality by just copying and pasting important code
16 > everywhere, but most of it still needs to be completely rewritten (
17 > *stabs depgraph* ). I was going to wait for the new API to be done ( no
18 > use rewriting emerge twice, IMHO ), but if you want it done now it
19 > wouldn't be a big deal.
20
21 Hmm, interesting. I can see how building other tools into the emerge interface would be useful if it allows more code to be shared somehow (and less duplication). Are there other reasons for combining other tools into the same interface?
22
23 My main concern about "rewritten" code is that, depending on the nature of the code being rewritten, it may be likely to introduce unwanted changes or regressions. Of course, thats why I put so much emphasis on careful refactoring/reorganizing of existing code that is known to work in the desired way.
24
25 I don't see a reason to keep messy code around for long periods of time when it can be so quickly reorganized. Why wait? Messy code only makes more difficult the job of maintaining and improving the code.
26
27 Zac
28 --
29 gentoo-portage-dev@g.o mailing list

Replies