timsutton / aamporter

Utility to batch download Adobe Creative Suite/Cloud updates and optionally import them into a Munki repository.
MIT License
86 stars 14 forks source link

Unknown error with munkiimport and aamporter #28

Closed joncohen closed 8 years ago

joncohen commented 8 years ago

I have a new Munki Repo. The repo has the same name as my old one and I confirmed that munkiimport works with non-aamporter imports.

This item is similar to an existing item in the repo:
            Item name: Pages
         Display name: Pages
          Description: Pages for Mac is a powerful word processor that gives you everything you need to create documents that look beautiful. And read beautifully. It lets you work seamlessly between Mac and iOS devices. And even work effortlessly with people who use Microsoft Word.
              Version: 5.6.1
  Installer item path: apps/apple/iWork/Pages-5.6.1.dmg

Use existing item as a template? [y/n] y
Copying category: Office and Productivity
Copying developer: Apple, Inc
           Item name: Pages
        Display name: Pages
         Description: Pages for Mac is a powerful word processor that gives you everything you need to create documents that look beautiful. And read beautifully. It lets you work seamlessly between Mac and iOS devices. And even work effortlessly with people who use Microsoft Word.
             Version: 5.6.2
            Category: Office and Productivity
           Developer: Apple, Inc
  Unattended install: False
Unattended uninstall: False
            Catalogs: beta

Import this item? [y/n] Y
Copying Pages.dmg to /Volumes/munki_repo/pkgs/apps/apple/iWork/Pages-5.6.2.dmg...
Saving pkginfo to /Volumes/munki_repo/pkgsinfo/apps/apple/iWork/Pages-5.6.2...
Rebuild catalogs? [y/n] y
Rebuilding catalogs at /Volumes/munki_repo...

This is the error when I try to execute ./aamporter.py --munkiimport -p AdobeCCIllustrator.ccp.plist

$ ./aamporter.py --munkiimport -p AdobeCCIllustrator.ccp.plist 
Traceback (most recent call last):
  File "./aamporter.py", line 782, in <module>
    main()
  File "./aamporter.py", line 548, in main
    if not munkiimport.repoAvailable():
AttributeError: 'module' object has no attribute 'repoAvailable'

The line in question is:

# munki sanity checks
    if opts.munkiimport:
        if not os.path.exists('/usr/local/munki'):
            errorExit("No Munki installation could be found. Get it at http://code.google.com/p/munki")
        sys.path.insert(0, MUNKI_DIR)
        munkiimport_prefs = os.path.expanduser('~/Library/Preferences/com.googlecode.munki.munkiimport.plist')
        if pref('munki_tool') == 'munkiimport':
...
if not munkiimport.repoAvailable():
                errorExit("The Munki repo cannot be located. This tool is not interactive; first ensure the repo is mounted.")

I suspect that this is related in some way to my repo changing, I just can't figure out where. Aamporter is running from the same cache that my old repo was on. I didn't know if that was related to my present problem. I lost my repo due to a storage system failure and my Munki backup was about a month behind my main repo.

Here is my product plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>channels</key>
    <array>
        <string>AdobeColorCommonSetCMYK-5.0</string>
        <string>AdobeColorCommonSetRGB-5.0</string>
        <string>AdobeColorEUExtraSettingsCC-5.0</string>
        <string>AdobeColorEURecommendedSettingsCC-5.0</string>
        <string>AdobeColorJAExtraSettingsCC-5.0</string>
        <string>AdobeColorJARecommendedSettingsCC-5.0</string>
        <string>AdobeColorNAExtraSettingsCC-5.0</string>
        <string>AdobeColorNARecommendedSettingsCC-5.0</string>
        <string>AdobeIllustrator19-cs_CZ</string>
        <string>AdobeIllustrator19-da_DK</string>
        <string>AdobeIllustrator19-de_DE</string>
        <string>AdobeIllustrator19-en_AE</string>
        <string>AdobeIllustrator19-en_GB</string>
        <string>AdobeIllustrator19-en_IL</string>
        <string>AdobeIllustrator19-en_US</string>
        <string>AdobeIllustrator19-es_ES</string>
        <string>AdobeIllustrator19-es_MX</string>
        <string>AdobeIllustrator19-fr_CA</string>
        <string>AdobeIllustrator19-fr_FR</string>
        <string>AdobeIllustrator19-fr_MA</string>
        <string>AdobeIllustrator19-hu_HU</string>
        <string>AdobeIllustrator19-it_IT</string>
        <string>AdobeIllustrator19-ja_JP</string>
        <string>AdobeIllustrator19-ko_KR</string>
        <string>AdobeIllustrator19-mul</string>
        <string>AdobeIllustrator19-nl_NL</string>
        <string>AdobeIllustrator19-pl_PL</string>
        <string>AdobeIllustrator19-pt_BR</string>
        <string>AdobeIllustrator19-ru_RU</string>
        <string>AdobeIllustrator19-sv_SE</string>
        <string>AdobeIllustrator19-tr_TR</string>
        <string>AdobeIllustrator19-uk_UA</string>
        <string>AdobeIllustrator19-zh_CN</string>
        <string>AdobeIllustrator19-zh_TW</string>
    </array>
</dict>
</plist>

Any insight would be appreciated.

clburlison commented 8 years ago

Please pull the latest version of aamporter from the repo. A change with munki was made that broke the out dated version that you are using.

Cheers, Clayton

clburlison commented 8 years ago

The commit that resolved this was e8df2a0534ba730358af2080f0277f34538d831f

joncohen commented 8 years ago

I should have thought of that. Thank you.

timsutton commented 8 years ago

Thanks for chiming in @clburlison!