Open ghost opened 3 years ago
when adding, or init'ing? gnu tar is only used in two places at https://github.com/mechboxes/mech/blob/v0.7.6/mech/utils.py#L422, so it'd have to be that the --wildcards
parameter isn't being passed to it correctly.
when initing - i tried manually downloading the file and using it, nothing helps
there is an issue with debian gnu tar : if you place --wildcards after -tf option, it can not find anything gives error :
tar -tf --wildcards vmware_desktop.box "*.vmx"
tar: --wildcards: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
bit if you reverse it :
tar --wildcards -tf vmware_desktop.box "*.vmx"
centos-7-1-1.x86_64.vmx
I was able to hack it by editing this function:
def tar_cmd(*args, **kwargs):
try:
proc = subprocess.Popen(['tar', '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
except OSError:
return None
if proc.returncode:
return None
stdoutdata, stderrdata = map(b2s, proc.communicate())
tar = ['tar', '--wildcards']
if kwargs.get('wildcards') and re.search(r'\b--wildcards\b', stdoutdata):
tar.append('--wildcards')
if kwargs.get('fast_read') and sys.platform.startswith('darwin'):
tar.append('--fast-read')
tar.extend(args)
return tar
i just added --wildcard
into tar list and seems to work but it is not by a long shot the direct answer
If you figure out an appropriate solution here a PR would be welcome!
using vmware-workstation 16 debian 10(buster) kernel 4.19 mech 0.7.6
whatever box i am trying to use, i am getting same error: