Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: "m h" <sesquile@...>
Subject: Re: Refactoring of emerge code
Date: Sat, 29 Apr 2006 17:15:15 -0700
Upon further testing, I'm updating a line in the patch

On 4/28/06, m h <sesquile@...> wrote:
> Folks-
>
> I'm submitting a patch of a refactoring of the emerge code in
> 2.1_pre9-r5.  This patch adds no features per se.  But I believe it
> makes the code much more readable.  This only addresses the
> /usr/lib/portage/bin/emerge file.
>
> It does the following:
>
> * attempts to remove all global variables (with the exception of the
> spinner animation)
> * breaks up the heinous 900 lines of code at the bottom of the file into:
>  * a __main__ section that calls out to
>  * do_SOMETHING where something is (depclean, search, info, config, etc)
> * removes any code that was dangling at the leftmost side of my editor
> and puts it under the __main__ section
> * removes an olddbapi variable that isn't used
>
> I've tested it with the sync, remove, search, update and it appears to
> work.  Any feedback is welcome.
>
> I hope that this gets in for a few reasons.  I'm helping out with
> doing some work on the PREFIX branch, having the code unstructured
> makes it really hard to follow (hopefully it can get into trunk so I
> don't need to patch prefix, everytime it's updated).  One of my
> coworkers just started adding some functionality to emerge (he'll send
> his patches in soon), but this is really his first week using python,
> and I don't want this to leave a bad taste in his mouth.... ;)
>
> -matt
>
>
>
Attachment:
emerge_refactor.diff (Binary data)
Replies:
Re: Re: Refactoring of emerge code
-- Alec Warner
References:
Refactoring of emerge code
-- m h
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Refactoring of emerge code
Next by thread:
Re: Re: Refactoring of emerge code
Previous by date:
Re: portage management node
Next by date:
Re: Re: Refactoring of emerge code


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.