Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to upload non-flat packages to JSS #20

Closed
MScottBlake opened this issue Dec 5, 2014 · 3 comments
Closed

Failing to upload non-flat packages to JSS #20

MScottBlake opened this issue Dec 5, 2014 · 3 comments

Comments

@MScottBlake
Copy link
Contributor

Using the silverlight.jss.recipe found at sheagcraig/jss-recipes, I receive the following error.

Traceback (most recent call last):
  File "/usr/local/bin/autopkg", line 1334, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/autopkg", line 1328, in main
    exit(subcommands[verb]['function'](argv))
  File "/usr/local/bin/autopkg", line 1152, in run_recipes
    autopackager.process(recipe)
  File "/Library/AutoPkg/autopkglib/__init__.py", line 466, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 295, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 601, in main
    self.package = self.handle_package()
  File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 328, in handle_package
    self._copy(self.env["pkg_path"], id_=package.id)
  File "/Library/AutoPkg/autopkglib/JSSImporter.py", line 342, in _copy
    self.j.distribution_points.copy(source_item, id_=id_)
  File "/Library/Python/2.7/site-packages/python_jss-0.5.2-py2.7.egg/jss/distribution_points.py", line 196, in copy
    repo.copy_pkg(filename, id_)
  File "/Library/Python/2.7/site-packages/python_jss-0.5.2-py2.7.egg/jss/distribution_points.py", line 533, in copy_pkg
    self._copy(filename, id_=id_, file_type=PKG_FILE_TYPE)
  File "/Library/Python/2.7/site-packages/python_jss-0.5.2-py2.7.egg/jss/distribution_points.py", line 554, in _copy
    resource = open(filename, 'rb')
IOError: [Errno 21] Is a directory: u'/Users/msblake/Library/AutoPkg/Cache/com.github.autopkg.jss.Silverlight/Silverlight-5.1.30514.0.pkg'

If you add this pkg to Casper Admin manually, the pkg file is zipped before upload. I believe that is what will need to happen for non-flat packages.

@sheagcraig
Copy link
Collaborator

That makes total sense. I'll need to experiment with our test server and JDS and run some packet sniffs, but that should be pretty easy to fix.

It's kind of a shame that we can't count on just flat packages.

If you're hurting for this to work, I imagine that you could add in a PkgRootCreator, PkgCreator process with a postinstall script to make a package of the package! (Meta!)

@MScottBlake
Copy link
Contributor Author

In the meantime, as I'm doing with others that don't have jss recipes, I'm just using the .pkg.recipe, uploading manually, and letting Casper Admin zip it for me. I haven't had the chance to get into writing recipes yet.

I totally agree that it's a shame we have to work around some of these things. It's such a simple thing for these companies to change.

@sheagcraig
Copy link
Collaborator

Fixed for 0.5.3 (but really JSSImporter 0.3.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants