summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/rpm-createsolvedb.py5
-rwxr-xr-xscripts/swabber-strace-attach3
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/rpm-createsolvedb.py b/scripts/rpm-createsolvedb.py
index 0d5f219..a5b61ba 100755
--- a/scripts/rpm-createsolvedb.py
+++ b/scripts/rpm-createsolvedb.py
@@ -14,6 +14,7 @@
14import sys, os 14import sys, os
15import hashlib 15import hashlib
16import stat 16import stat
17import subprocess
17 18
18if len(sys.argv) < 1: 19if len(sys.argv) < 1:
19 print("Error, rpm command not specified") 20 print("Error, rpm command not specified")
@@ -44,7 +45,7 @@ for path in paths:
44 continue 45 continue
45 46
46 if os.path.exists(path + "/solvedb"): 47 if os.path.exists(path + "/solvedb"):
47 os.system("rm -rf %s" % (path + "/solvedb")) 48 subprocess.call("rm -rf %s" % (path + "/solvedb"), shell=True)
48 os.mkdir(path + "/solvedb") 49 os.mkdir(path + "/solvedb")
49 m = open(path + "/solvedb/manifest", "w") 50 m = open(path + "/solvedb/manifest", "w")
50 m.write("# Dynamically generated solve manifest\n") 51 m.write("# Dynamically generated solve manifest\n")
@@ -56,7 +57,7 @@ for path in paths:
56 --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \ 57 --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
57 --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \ 58 --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \
58 ' + path + '/solvedb/manifest' 59 ' + path + '/solvedb/manifest'
59 os.system(cmd) 60 subprocess.call(cmd, shell=True)
60 61
61 open(path + "/solvedb.checksum", "w").write(checksum) 62 open(path + "/solvedb.checksum", "w").write(checksum)
62 open(path + "/solvedb.done", "w") 63 open(path + "/solvedb.done", "w")
diff --git a/scripts/swabber-strace-attach b/scripts/swabber-strace-attach
index d4f80e4..bb0391a 100755
--- a/scripts/swabber-strace-attach
+++ b/scripts/swabber-strace-attach
@@ -1,6 +1,7 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2import os 2import os
3import sys 3import sys
4import subprocess
4 5
5# Detach from the controlling terminal and parent process by forking twice to daemonize ourselves, 6# Detach from the controlling terminal and parent process by forking twice to daemonize ourselves,
6# then run the command passed as argv[1]. Send log data to argv[2]. 7# then run the command passed as argv[1]. Send log data to argv[2].
@@ -24,7 +25,7 @@ os.dup2(si.fileno(), sys.stdin.fileno())
24os.dup2(so.fileno(), sys.stdout.fileno()) 25os.dup2(so.fileno(), sys.stdout.fileno())
25os.dup2(se.fileno(), sys.stderr.fileno()) 26os.dup2(se.fileno(), sys.stderr.fileno())
26 27
27ret = os.system(sys.argv[1]) 28ret = subprocess.call(sys.argv[1], shell=True)
28 29
29os._exit(ret) 30os._exit(ret)
30 31