Check for cpio when extracting output from rpm2cpio.
This commit is contained in:
parent
5ad18595bd
commit
084c4ffd3d
|
@ -19,7 +19,11 @@ from patoolib import util
|
|||
|
||||
def extract_rpm (archive, encoding, cmd, **kwargs):
|
||||
"""Extract a DEB archive."""
|
||||
cmdlist = [cmd, os.path.abspath(archive), "|", 'cpio', '--extract',
|
||||
# also check cpio
|
||||
cpio = util.find_program("cpio")
|
||||
if not cpio:
|
||||
raise util.PatoolError("cpio(1) is required for rpm2cpio extraction; please install it")
|
||||
cmdlist = [cmd, os.path.abspath(archive), "|", cpio, '--extract',
|
||||
'--make-directories', '--preserve-modification-time',
|
||||
'--no-absolute-filenames', '--force-local', '--nonmatching',
|
||||
'"*\.\.*"']
|
||||
|
|
Loading…
Reference in New Issue