> > + # this is going to be merged.. > > + keptpkgs.sort(reverse=True) > > + def save_keptpkgs(upto=None): > > + while keptpkgs and (upto is None or keptpkgs[-1][0] < upto): > > + po = keptpkgs.pop()[1] > > I am kind of confused about the two different pkgs. here, why we > compare against one and write the other
Maybe I should have put a comment there.. Have two lists: kept packages (cached in old metadata, have po), and pkgfiles (these are new, processed by workers). Both lists are sorted. When processing pkgfiles, I have to insert cached packages in right spots, so the result is sorted, too. > > + pkgfiles.sort() > > Would it not be possible to merge the pkgfiles and keptpkgs lists at > this point? pkgfiles are RPM filenames only, keptpkgs are filename+po tuples. Throwing po's would kill the --update switch. _______________________________________________ Yum-devel mailing list [email protected] http://lists.baseurl.org/mailman/listinfo/yum-devel
