jafeha / parabird

Simple script written in python to build an os independent truecrypt encrypted usb-stick containing a portable thunderbird, enigmail, torbirdy and vidalia.
GNU General Public License v3.0
10 stars 7 forks source link

extracting tb for osx: no such file or directory #18

Closed jafeha closed 11 years ago

jafeha commented 11 years ago

i've got an error extracting the freshly from the dmg created img file:

  File "./parabird_build.py", line 254, in <module>
    subprocess.check_call(["mount -t hfsplus -o loop", tempdir+"/"+parser.get('thunderbird_mac', 'uncompressedfile'), tempdir+"/dmg/"])
  File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

this problem comes from these calls here:

subprocess.check_call(["dmg2img", tempdir+"/"+parser.get('thunderbird_mac', 'file')])
subprocess.check_call(["mount -t hfsplus -o loop", tempdir+"/"+parser.get('thunderbird_mac', 'uncompressedfile'), tempdir+"/dmg/"])
shutil.copytree(tempdir+"/dmg/", parser.get('thunderbird_mac', 'path'))

i'll comment 'em out for pushing the newest version now. i do not understand why this error occurs, i must have messed with the syntax.

jafeha commented 11 years ago

shouldn't this be fixed with 51fa89f ? i can't test it right now, but i'm pretty sure this issue should be solved.

jojoo- commented 11 years ago

uups. i broke this. fucking regression, we need tests.

this will fix it.

subprocess.check_call(["mount", "-t",  "hfsplus", "-o",
    "loop", os.path.join(tempdir, parser.get('thunderbird_mac',
    'uncompressedfile')), os.path.join(tempdir,"/dmg/")])

note that i broke the line up in 3 pieces to conform with pep8

jafeha commented 11 years ago

i got an mainLogger error as not being defined in extract_files.py when starting to extract files. can u confirm this with the most recent push i commited (i've split the functions into utils and extract_files)? i'll fix this subprocess call later today.

jojoo- commented 11 years ago

thats the problem with the extract_files.py. the logger isnt defined in there. it should work because of from utils import *, gut lets discuss this via jabber or even more interactive

jojoo- commented 11 years ago

i made some stuff in https://github.com/jojoo-/parabird/commit/d664d2942ecb3288ba6dad7a15ba55990dde1479 but cant sent a pull request as you didn't merge the first one

jojoo- commented 11 years ago

we need to find a way to encapsulate the logging stuff as a function, but i don't know how. maybe a setup_logger function that is only called once in the parabirdy_build?

then, if we need to debug, we would have to call it beforehand, but that does'nt seem like a problem

jafeha commented 11 years ago

Merged. U can send another pull req.

jafeha commented 11 years ago

fixed for a while now.