AutoPkg 0.3.0 - does it work?

chris_kemp
Contributor III

I finally decided to try AutoPkg today - downloaded the installer, added the default repo, but so far every pkg. I've tried (which would be Adobe AIR, Firefox, and VLC) have all failed.

Adobe AIR fails to mount the dmg it downloads, even though it is valid & can be manually mounted.
VLC and Firefox both fail with these (numerous) errors:

Traceback (most recent call last):
  File "/usr/local/bin/autopkg", line 1343, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/autopkg", line 1337, in main
    exit(subcommands[verb]['function'](argv))
  File "/usr/local/bin/autopkg", line 1162, in run_recipes
    autopackager.process(recipe)
  File "/Library/AutoPkg/autopkglib/__init__.py", line 392, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 229, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/AppDmgVersioner.py", line 77, in main
    mount_point = self.mount(self.env["dmg_path"])
  File "/Library/AutoPkg/autopkglib/DmgMounter.py", line 85, in mount
    if self.DMGhasSLA(pathname):
  File "/Library/AutoPkg/autopkglib/DmgMounter.py", line 64, in DMGhasSLA
    print >> sys.stderr, (
NameError: global name 'sys' is not defined

So...does this thing actually work for any of you? Should I try an older version, or compile it from the source for better results?

19 REPLIES 19

hcodfrie
Contributor

Hey Chris,

I use autopkg and can say yhat it works.
Take a look @ this blog maybe it will help you out .
http://osofrio.wordpress.com/2013/10/30/autopkg-your-new-best-friend/

agirardi
New Contributor II

@stevewood has a great writeup there.

I have been able to use AutoPKG with good success as well. Really excellent stuff.

RobertHammen
Valued Contributor II

Yes. Check @stevewood's writeup above. Post back here if you can't get it working. It's an awesome tool that I hope can only get even more tightly integrated with Casper in the future (beyond the work that Allister Banks has done).

chris_kemp
Contributor III

I followed all those steps - I added the additional repos and declared a different CACHE_DIR as noted, but otherwise everything is the same as when I installed it. Still getting the mounting error for AdobeAIR, as well as for Silverlight.

chris_kemp
Contributor III

...aaaand, Firefox still fails as noted above.

Not looking much like an awesome tool to me. Great if it works, yes, but so far - zilch.

RobertHammen
Valued Contributor II

If you look in your cache dir, do you see the AIR/Silverlight DMG's? What happens if you double-click to mount them manually? Restarted the machine? Tried under a different user account? Something is awry...

CasperSally
Valued Contributor II

yea something wonky going on for you, I'm afraid. I wish I had a suggestion. Worked 'out of the box' for me.

hcodfrie
Contributor

Did you install CLI ?

Not applicable

Also, what kind of user account are you opening autopkg under? Network, mobile, or local? Admin or not? Have you tried installing the latest Xcode and Developer Tools?

agirardi
New Contributor II

Also check out @RobertHammen session at PSU Mac Admins conference. I know I plan to.

stevewood
Honored Contributor II
Honored Contributor II

@chris.kemp Can you post the command line call you are using to pull down those items? Perhaps we can see something in that.

gregneagle
Valued Contributor

Chris:

Your machine is refusing to allow hdiutil to get imageinfo from the disk images, and when trying to print the error message informing you of that, it's hitting a bug in the DmgMounter processor.

I'll fix the bug today, but that won't magically fix your underlying issue.

calumhunter
Valued Contributor

are you running autopkg with sudo?

gregneagle
Valued Contributor

You should not normally run autopkg with sudo.

chris_kemp
Contributor III

So many questions...

I'm running this on my workstation with a local account. I did not have the latest Xcode when I started, but I updated & tried again - even reinstalled autopkg - but the problems stayed the same. I have admin rights. I'm running things exactly as described in both the wiki page and the cited blog post (I used the -v flag for the verbose output to try and see what was happening). I tried using sudo only once after things failed, but sudo simply does not find autopkg at all (which makes sense, as I didn't use sudo to install it in the first place).

The downloaded .dmgs mount fine both if I click on them in Finder OR if I call them from the command line, i.e. open Firefox.dmg - even if I mount the .dmg manually, the script tries and fails, and does not acknowledge that the file is already mounted.

@gregneagle][/url][/url][/url - can you elaborate a bit? Are you referring to the error about not mounting the .dmg or the undefined sys error?

gregneagle
Valued Contributor

Chris:

Now that you've posted to autopkg-discuss, we should discuss it there; too hard to do it both places at once.

Your ultimate issue is that for some reason hdiutil is not being able to mount or get information about the disk images downloaded by AutoPkg.

The original traceback (Python errors) you saw were just masking that issue; instead of reporting the issue, AutoPkg was crashing.

Let's continue the discussion/analysis on autopkg-discuss, where several smart people who are familiar with the internals will see it.

chris_kemp
Contributor III

OK - wasn't sure that post made it, to be honest. It didn't show up in the list after I'd posted. Weird...but anyway, sure. We'll take it up there.

chris_kemp
Contributor III

Hmm...turns out that @gregneagle 's script fix took care of the problem. Once I copied his script in place, everything worked. I put the old script back - broken again (the 'sys' not defined error). Put his script in place again - fixed.

Thanks Greg!

donmontalvo
Esteemed Contributor III