So, uh, I know Jeff said that this was the wrong thing to do, etc., when
this was last discussed, but the attached patch still speeds up `repomanage
-o` by order of magnitude -- from 99 seconds to 6 seconds on my x86_64 repo,
or 76 seconds to 4 on i386. I notice that createrepo does a similar thing.





-- 
Matthew Miller           [EMAIL PROTECTED]          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>
--- repomanage.orig     2007-07-25 16:36:17.000000000 -0400
+++ repomanage  2007-07-25 16:36:21.000000000 -0400
@@ -70,12 +70,14 @@
         fdno = os.open(package, os.O_RDONLY)
     except OSError, e:
         raise Error, "Error opening file %s" % package
+    
ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
     try:
         hdr = ts.hdrFromFdno(fdno)
     except rpm.error, e:
         raise Error, "Error opening package %s" % package
     if type(hdr) != rpm.hdr:
         raise Error, "Error opening package %s" % package
+    ts.setVSFlags(0)
     os.close(fdno)
     return hdr
     
_______________________________________________
Yum-devel mailing list
Yum-devel@linux.duke.edu
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to