[Uludag-commits] r15253 - in branches/pisi-db/pisi: . pxml

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
1 Eyl 2007 Cmt 21:54:02 EEST


Author: faik
Date: Sat Sep  1 21:54:02 2007
New Revision: 15253

Modified:
   branches/pisi-db/pisi/index.py
   branches/pisi-db/pisi/pxml/autoxml.py
Log:
First one is the bsddb, second one is the filesystem db.

nodecode option in this commit gives as some extra 3-5 seconds
by not decoding the index xml.

PS: this autoxml is no generic xml objectifier but some wierd
featurefull creature.

faik at iago pisi $ time sudo pisi ur --force
* pardus-2007-test deposu güncelleniyor
pisi-index.xml.bz2.sha1sum     (40.0  B)100%      0.00 B/s [??:??:??] [bitti]
pisi-index.xml.bz2             (411.0 KB)100%     96.74 KB/s [00:00:00] [bitti]
No signature found for http://paketler.pardus.org.tr/pardus-2007-test/pisi-index.xml.bz2
pardus-2007-test paket veritabanı güncelleniyor (100%) [bitti]
* Paket veritabanı güncellendi.
* pardus-2007-src deposu güncelleniyor
pisi-index.xml.bz2.sha1sum     (40.0  B)100%      0.00 B/s [??:??:??] [bitti]
pardus-2007-src deposu için güncelleme yok.
Veritabanı istek üzerine güncelleniyor
pisi-index.xml.bz2             (325.0 KB)100%     90.40 KB/s [00:00:00] [bitti]
No signature found for http://svn.pardus.org.tr/pardus/2007/pisi-index.xml.bz2
pardus-2007-src paket veritabanı güncelleniyor (100%) [bitti]
* Paket veritabanı güncellendi.

real    3m29.758s  <-----------
user    0m54.594s
sys     0m4.565s

faik at iago pisi $ time sudo ./pisi-cli ur --force
* pardus-2007-test deposu güncelleniyor
pisi-index.xml.bz2.sha1sum     (40.0  B)100%      0.00 B/s [??:??:??] [bitti]
pardus-2007-test deposu için güncelleme yok.
Veritabanı istek üzerine güncelleniyor
pisi-index.xml.bz2             (411.0 KB)100%     94.54 KB/s [00:00:00] [bitti]
No signature found for http://paketler.pardus.org.tr/pardus-2007-test/pisi-index.xml.bz2
* Paket veritabanı güncellendi.
* pardus-2007-src deposu güncelleniyor
pisi-index.xml.bz2.sha1sum     (40.0  B)100%      0.00 B/s [??:??:??] [bitti]
pardus-2007-src deposu için güncelleme yok.
Veritabanı istek üzerine güncelleniyor
pisi-index.xml.bz2             (325.0 KB)100%    101.51 KB/s [00:00:00] [bitti]
No signature found for http://svn.pardus.org.tr/pardus/2007/pisi-index.xml.bz2
* Paket veritabanı güncellendi.

real    0m18.420s  <------------
user    0m4.372s
sys     0m0.314s


Modified: branches/pisi-db/pisi/index.py
=================================================================
--- branches/pisi-db/pisi/index.py	(original)
+++ branches/pisi-db/pisi/index.py	Sat Sep  1 21:54:02 2007
@@ -49,7 +49,7 @@
 
     def read_uri(self, uri, tmpdir, force = False):
         self.read(uri, tmpDir=tmpdir, sha1sum=not force,
-                  compress=pisi.file.File.auto, sign=pisi.file.File.detached, copylocal = True)
+                  compress=pisi.file.File.auto, sign=pisi.file.File.detached, copylocal = True, nodecode = True)
 
     # read index for a given repo, force means download even if remote not updated
     def read_uri_of_repo(self, uri, repo = None, force = False):

Modified: branches/pisi-db/pisi/pxml/autoxml.py
=================================================================
--- branches/pisi-db/pisi/pxml/autoxml.py	(original)
+++ branches/pisi-db/pisi/pxml/autoxml.py	Sat Sep  1 21:54:02 2007
@@ -438,10 +438,14 @@
                     errs.append(_("autoxml.parse: String '%s' has errors") % xml)
 
             def read(self, uri, keepDoc = False, tmpDir = '/tmp',
-                     sha1sum = False, compress = None, sign = None, copylocal = False):
+                     sha1sum = False, compress = None, sign = None, copylocal = False, nodecode = False):
                 "read XML file and decode it into a python object"
                 self.readxml(uri, tmpDir, sha1sum=sha1sum, 
                              compress=compress, sign=sign, copylocal=copylocal)
+
+                if nodecode:
+                    return
+
                 errs = []
                 self.decode(self.rootNode(), errs)
                 if errs:


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi