[elbe-devel] [PATCH 2/4] cdroms: Add class SrcMananager

Torben Hohn torben.hohn at linutronix.de
Wed May 13 14:13:57 CEST 2020


On Mon, May 04, 2020 at 08:36:41AM -0400, Olivier Dion wrote:
> On Thu, 02 Apr 2020, Torben Hohn <torben.hohn at linutronix.de> wrote:
> > On Mon, Mar 23, 2020 at 02:53:54PM -0400, Olivier Dion wrote:
> >> The source manager manage a dictionary of package with their version and
> >> components.  It also provide a generator for iterating over a set of
> >> tuples of the form (pkg, version, component).
> >> 
> >> Signed-off-by: Olivier Dion <dion at linutronix.de>
> >> ---
> >>  elbepack/cdroms.py | 22 ++++++++++++++++++++++
> >>  1 file changed, 22 insertions(+)
> >> 
> >> diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
> >> index 669c3c78..827ddf88 100644
> >> --- a/elbepack/cdroms.py
> >> +++ b/elbepack/cdroms.py
> >> @@ -25,6 +25,28 @@ from elbepack.isooptions import get_iso_options
> >>  
> >>  CDROM_SIZE = 640 * 1000 * 1000
> >>  
> >> +class SrcManager(object):
> >> +
> >> +    def __init__(self):
> >> +        self.pkgs = {}
> >> +
> >> +    def __iter__(self):
> >> +        return self.gen()
> >
> > errm... why do you use gen() ?
> > just put the code into the body.
> >
> > i am not sure, whether components allow having different versions in
> > a reprepro repository.
> 
> No you can not.  Only in different components you can have different
> versions.  Is this really a concern?

errm... i meant having 2 components with 2 different versions.
but it works. 

ok. but my comment about gen() remains.
just put the code form gen() into the __iter__() body.
or do i miss something ?


> 
> -- 
> Olivier Dion
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list