[29950]
trunk/dports/sysutils/zeroinstall-injector-devel/files/patch-distro
.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 16 08:43:10 PDT 2007
Revision: 29950
http://trac.macosforge.org/projects/macports/changeset/29950
Author: afb at macports.org
Date: 2007-10-16 08:43:10 -0700 (Tue, 16 Oct 2007)
Log Message:
-----------
use echo instead of list (much faster), ignore the status size since it's a directory
Modified Paths:
--------------
trunk/dports/sysutils/zeroinstall-injector-devel/files/patch-distro.py
Modified: trunk/dports/sysutils/zeroinstall-injector-devel/files/patch-distro.py
===================================================================
--- trunk/dports/sysutils/zeroinstall-injector-devel/files/patch-distro.py 2007-10-16 15:30:44 UTC (rev 29949)
+++ trunk/dports/sysutils/zeroinstall-injector-devel/files/patch-distro.py 2007-10-16 15:43:10 UTC (rev 29950)
@@ -1,8 +1,6 @@
-Index: zeroinstall/injector/distro.py
-===================================================================
--- zeroinstall/injector/distro.py (revision 2053)
+++ zeroinstall/injector/distro.py (arbetskopia)
-@@ -228,12 +228,112 @@
+@@ -228,12 +228,108 @@
impl = factory('package:rpm:%s:%s' % (package, version))
impl.version = model.parse_version(version)
@@ -39,9 +37,6 @@
+ if name == 'mtime' and (int(value) !=
+ int(self.status_details.st_mtime)):
+ raise Exception("Modification time of mp status file has changed")
-+ if name == 'size' and (int(value) !=
-+ self.status_details.st_size):
-+ raise Exception("Size of mp status file has changed")
+ else:
+ raise Exception('Invalid cache format (bad header)')
+
@@ -52,7 +47,7 @@
+
+ def __parse_port_line(self, line):
+
-+ package, version, category = line.strip().split()
++ package, version = line.strip().split()
+ if version.startswith('@'):
+ version = version.lstrip('@')
+ if '_' in version:
@@ -67,7 +62,7 @@
+ def generate_cache(self):
+ cache = []
+
-+ for line in os.popen("port list installed"):
++ for line in os.popen("port echo installed"):
+ package, version = self.__parse_port_line(line)
+ if package and version:
+ cache.append('%s\t%s' % (package, version))
@@ -81,7 +76,6 @@
+ try:
+ stream = os.fdopen(fd, 'wb')
+ stream.write('mtime: %d\n' % int(self.status_details.st_mtime))
-+ stream.write('size: %d\n' % self.status_details.st_size)
+ stream.write('\n')
+ for line in cache:
+ stream.write(line + '\n')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071016/d24c0816/attachment.html
More information about the macports-changes
mailing list