chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5dbcd0e
)
vmtools debug logging for check_output calls
author
Michael Pöhn
<michael.poehn@fsfe.org>
Wed, 29 Mar 2017 15:36:04 +0000
(17:36 +0200)
committer
Hans-Christoph Steiner
<hans@eds.org>
Tue, 23 May 2017 18:06:06 +0000
(20:06 +0200)
fdroidserver/vmtools.py
patch
|
blob
|
history
diff --git
a/fdroidserver/vmtools.py
b/fdroidserver/vmtools.py
index 5eedbaa7abb6ff3bf89e1b18f9f7a0235b460c29..cb7e28330244bb93eb11c6e554fe3c0e7227c2ac 100644
(file)
--- a/
fdroidserver/vmtools.py
+++ b/
fdroidserver/vmtools.py
@@
-155,9
+155,13
@@
class FDroidBuildVm():
# TODO: remove box files manually
# nesessary when Vagrantfile in ~/.vagrant.d/... is broken.
# TODO: remove box files manually
# nesessary when Vagrantfile in ~/.vagrant.d/... is broken.
- def _check_call(self, cmd):
+ def _check_call(self, cmd
, shell=False
):
logger.debug(' '.join(cmd))
logger.debug(' '.join(cmd))
- return subprocess.check_call(cmd)
+ return subprocess.check_call(cmd, shell=shell)
+
+ def _check_output(self, cmd, shell=False):
+ logger.debug(' '.join(cmd))
+ return subprocess.check_output(cmd, shell=shell)
class LibvirtBuildVm(FDroidBuildVm):
class LibvirtBuildVm(FDroidBuildVm):
@@
-212,10
+216,10
@@
class LibvirtBuildVm(FDroidBuildVm):
vol = storagePool.storageVolLookupByName(self.srvname + '.img')
imagepath = vol.path()
# TODO use a libvirt storage pool to ensure the img file is readable
vol = storagePool.storageVolLookupByName(self.srvname + '.img')
imagepath = vol.path()
# TODO use a libvirt storage pool to ensure the img file is readable
- s
ubprocess.
check_call(['sudo', '/bin/chmod', '-R', 'a+rX', '/var/lib/libvirt/images'])
+ s
elf._
check_call(['sudo', '/bin/chmod', '-R', 'a+rX', '/var/lib/libvirt/images'])
shutil.copy2(imagepath, 'box.img')
shutil.copy2(imagepath, 'box.img')
- s
ubprocess.
check_call(['qemu-img', 'rebase', '-p', '-b', '', 'box.img'])
- img_info_raw = s
ubprocess.check_output('sudo qemu-img info --output=json box.img'
, shell=True)
+ s
elf._
check_call(['qemu-img', 'rebase', '-p', '-b', '', 'box.img'])
+ img_info_raw = s
elf._check_output(['sudo qemu-img info --output=json box.img']
, shell=True)
img_info = json.loads(img_info_raw.decode('utf-8'))
metadata = {"provider": "libvirt",
"format": img_info['format'],
img_info = json.loads(img_info_raw.decode('utf-8'))
metadata = {"provider": "libvirt",
"format": img_info['format'],