nickcharlton / ansible-role-xcode

An Ansible Role for Xcode.
5 stars 8 forks source link

Extracting the Xcode xip: Failed to extract final part of archive. #3

Open quacktacular opened 6 years ago

quacktacular commented 6 years ago

Trying to use this role to do remote Xcode installs for CI slaves.

It looks great! Except part way through extracting the xip I get this: fatal: [my-ci.tld]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to extract final part of archive."}

The Xcode app is ususally ~309MB at this point. Any idea what might be going on? Look like something in library/extract_xip.py but I can't quite figure out what. Archive Utility is able to extract without trouble.

I noticed @nikr made a pull request to fix the error display--did you have any luck?

nikr commented 6 years ago

What version of Xcode are you trying to extract?

I've noticed that this and other implementations based on parse_pbzx doesn't work for Xcode 9 .xip files for some reason. I suspect that the format has changed, or they are using another feature that extract_xip.py doesn't support.

quacktacular commented 6 years ago

Ah yes I am trying to use Xcode 9! That's too bad.

nikr commented 6 years ago

At the risk of this becoming a bit off topic - I ended up manually extracting and recompressing the XCode.xip to a .xar and just extracting that on my target machines. Then the rest of this playbook works fine (with those modifications).

nickcharlton commented 6 years ago

Yeah, this is, unfortunately, the case.

I've not been able to figure out a better solution to this. I'm going to leave this open in the hope that one day we'll come across something.

sydneybrokeit commented 6 years ago

I published a different xcode role that works very similarly, but gets around the .xip extraction issue.

https://galaxy.ansible.com/hmschreck/xcode.