Skip to content

Commit 69af6cc

Browse files
committed
import_srpm: check command rpm2cpio|cpio
`rpm2cpio` might not exist on the system, and `cpio` return the error "premature end of archive" in that case. This doesn't check if `rpm2cpio` returns an error but it's probably ok to lean on `cpio` returning an error. Signed-off-by: Anthony PERARD <[email protected]>
1 parent 47b4417 commit 69af6cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/import_srpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def main():
7676
print(" extracting SRPM...")
7777

7878
os.chdir('SOURCES')
79-
os.system('rpm2cpio "%s" | cpio -idmv' % source_rpm_abs)
79+
call_process(['sh', '-c', 'rpm2cpio "%s" | cpio -idmv' % source_rpm_abs])
8080
os.chdir('..')
8181
os.system('mv SOURCES/*.spec SPECS/')
8282

0 commit comments

Comments
 (0)