pld-builder.new: PLD_Builder/rpm_builder.py - check for file existence too

glen glen at pld-linux.org
Thu Jan 21 19:03:01 CET 2010


Author: glen                         Date: Thu Jan 21 18:03:01 2010 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
- check for file existence too

---- Files affected:
pld-builder.new/PLD_Builder:
   rpm_builder.py (1.113 -> 1.114) 

---- Diffs:

================================================================
Index: pld-builder.new/PLD_Builder/rpm_builder.py
diff -u pld-builder.new/PLD_Builder/rpm_builder.py:1.113 pld-builder.new/PLD_Builder/rpm_builder.py:1.114
--- pld-builder.new/PLD_Builder/rpm_builder.py:1.113	Thu Jan 21 17:58:34 2010
+++ pld-builder.new/PLD_Builder/rpm_builder.py	Thu Jan 21 19:02:56 2010
@@ -130,7 +130,7 @@
     chroot.run("test ! -c /dev/zero && rm -f /dev/zero && mknod -m 666 /dev/zero c 1 5", 'root')
     # make neccessary files readable for builder user
     # TODO: see if they really aren't readable for builder
-    chroot.run("for db in Packages Name Basenames Providename Pubkey; do db=/var/lib/rpm/$db; chmod a+r $db; done", 'root')
+    chroot.run("for db in Packages Name Basenames Providename Pubkeys; do db=/var/lib/rpm/$db; test -f $db && chmod a+r $db; done", 'root')
     # try to limit network access for builder account
     chroot.run("/bin/setfacl -m u:builder:--- /etc/resolv.conf", 'root')
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/rpm_builder.py?r1=1.113&r2=1.114&f=u



More information about the pld-cvs-commit mailing list