[Yum-devel] take two: protect-packages plugin

Matthew Miller mattdm at mattdm.org
Thu Jun 21 17:08:57 UTC 2007


On Thu, Jun 21, 2007 at 01:07:01PM -0400, Matthew Miller wrote:
> > >   if protectedlist:
> > >      for f in protectedlist:
> > >        for line in open(f).readlines():            
> > >            line = string.strip(line)
> > >            if (line and line[0] != "#" and line not in opts.override  
> > >                     and line not in protectedpkgs):
> > >               protectedpkgs.append(line)
> >  Do we want to depend on fileinput, it just sucks to see this much code
> > for a "common" operation. getMirrorList() also does the exact same
> > thing, but using regexps.
> I can see the part about reading in lines except blanks and comments being
> common; less so the stripping out of duplicates and even less so 

Sheesh, I'm having a serious problem with losing attention span
mid-paragraph. That should read "... and even less so the part about
removing overrides".

-- 
Matthew Miller           mattdm at mattdm.org          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>



More information about the Yum-devel mailing list