[Collab-qa-commits] r980 - udd/src

neronus-guest at alioth.debian.org neronus-guest at alioth.debian.org
Sat Aug 2 18:45:18 UTC 2008


Author: neronus-guest
Date: 2008-08-02 18:45:17 +0000 (Sat, 02 Aug 2008)
New Revision: 980

Modified:
   udd/src/test.yaml
   udd/src/udd-update.py
Log:
Added possibility to create timestamp files for updates


Modified: udd/src/test.yaml
===================================================================
--- udd/src/test.yaml	2008-08-02 18:32:43 UTC (rev 979)
+++ udd/src/test.yaml	2008-08-02 18:45:17 UTC (rev 980)
@@ -12,6 +12,7 @@
     bugs: exec DEBBUGS_CONFIG_FILE=/org/udd.debian.net/mirrors/bugs.debian.org/etc/config perl ./udd/bugs_gatherer.pl 
     #src-pkg: python sources_gatherer.py
   debug: 1
+  update-timestamp-folder: ./timestamps/
 
   archs:
    [alpha, amd64, arm, armeb, armel, hppa, hurd-i386,
@@ -141,9 +142,9 @@
 bugs:
   type: bugs
   archived: false
-  update-command: /org/udd.debian.org/mirrors/sync-bugs.debian.org
+  update-command: /org/udd.debian.net/mirrors/sync-bugs.debian.org
 
 bugs-archive:
   type: bugs
   archived: true
-  update-command: /org/udd.debian.org/mirrors/sync-bugs.debian.org
+  update-command: /org/udd.debian.net/mirrors/sync-bugs.debian.org

Modified: udd/src/udd-update.py
===================================================================
--- udd/src/udd-update.py	2008-08-02 18:32:43 UTC (rev 979)
+++ udd/src/udd-update.py	2008-08-02 18:45:17 UTC (rev 980)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-# Last-Modified: <Sat Jul 12 16:44:23 2008>
+# Last-Modified: <Sat Aug  2 18:46:52 2008>
 
 """
 This script executes the update statements for selected sources
@@ -7,6 +7,8 @@
 
 import sys
 from os import system
+from time import asctime
+import os.path
 import udd.aux
 
 def print_help():
@@ -26,5 +28,8 @@
   for src in sys.argv[2:]:
     src_cfg = config[src]
     if "update-command" in src_cfg:
-      system(src_cfg['update-command'])
+      if system(src_cfg['update-command']) == 0 and 'update-timestamp-folder' in config['general']:
+	f = open(os.path.join(config['general']['update-timestamp-folder'], src), "w")
+	f.write(asctime())
+	f.close()
 




More information about the Collab-qa-commits mailing list