diff options
author | Alice Ferrazzi <alicef@gentoo.org> | 2017-07-19 17:54:15 +0900 |
---|---|---|
committer | Alice Ferrazzi <alicef@gentoo.org> | 2017-07-19 17:54:15 +0900 |
commit | 0bf41146839077d25056da53b091e0faf78d3f88 (patch) | |
tree | 7fd8fc0d64cb0b2dc3943b6fdf9afdb1a588c30b /elivepatch_server | |
parent | send_file working with temporary folder (diff) | |
download | elivepatch-0bf41146839077d25056da53b091e0faf78d3f88.tar.gz elivepatch-0bf41146839077d25056da53b091e0faf78d3f88.tar.bz2 elivepatch-0bf41146839077d25056da53b091e0faf78d3f88.zip |
check if the ebuild is present in the overlay
Diffstat (limited to 'elivepatch_server')
-rw-r--r-- | elivepatch_server/resources/livepatch.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/elivepatch_server/resources/livepatch.py b/elivepatch_server/resources/livepatch.py index 1caf108..bc18213 100644 --- a/elivepatch_server/resources/livepatch.py +++ b/elivepatch_server/resources/livepatch.py @@ -114,7 +114,12 @@ class PaTch(object): command(['git','clone','https://github.com/aliceinwire/gentoo-sources_overlay.git']) except: print('git clone failed.') - command(['sudo','ROOT=/tmp/elivepatch-' + uuid_dir,'ebuild','gentoo-sources_overlay/sys-kernel/gentoo-sources/gentoo-sources-' + kernel_version + '.ebuild', 'clean', 'merge']) + + ebuild_path = os.path.join('/tmp', 'elivepatch-' + uuid_dir, 'gentoo-sources_overlay', 'sys-kernel', 'gentoo-sources', 'gentoo-sources-' + kernel_version + '.ebuild') + if os.path.isfile(ebuild_path): + command(['sudo', 'ROOT=/tmp/elivepatch-' + uuid_dir, 'ebuild', ebuild_path, 'clean', 'merge']) + else: + print('ebuild not present') def build_kernel(self, uuid_dir): kernel_source_dir = '/tmp/elivepatch-' + uuid_dir + '/usr/src/linux/' @@ -124,7 +129,6 @@ class PaTch(object): command(['sudo','make', 'modules'], kernel_source_dir) command(['sudo','make', 'modules_install'], kernel_source_dir) - def command(bashCommand, kernel_source_dir=None): """ Popen override function |