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

Recipe asks for Y/N #1

Open
henningkessler opened this issue Oct 9, 2014 · 5 comments
Open

Recipe asks for Y/N #1

henningkessler opened this issue Oct 9, 2014 · 5 comments

Comments

@henningkessler
Copy link

Hi mosen,

if try to run the FontExplorerXPro.munki recipe with following Override:

<?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>Identifier</key>
    <string>local.munki.FontExplorerXPro</string>
    <key>Input</key>
    <dict>
        <key>MUNKI_REPO_SUBDIR</key>
        <string>apps</string>
        <key>NAME</key>
        <string>FontExplorer X Pro</string>
        <key>CLIENT_LICENSE</key>
        <string>/Volumes/DS4600_RAID/Admin/ClientLicense.fcl</string>
    </dict>
    <key>ParentRecipe</key>
    <string>com.github.mosen.munki.FontExplorerXPro</string>
</dict>
</plist>

I will be asked if I accept the license agreement and the run stops there waiting for input:

[someone@server:/Volumes/DS4600_RAID/Admin]1050$ autopkg run -vv FontExplorerXPro.munki
Processing FontExplorerXPro.munki...
URLDownloader
{'Input': {'filename': u'FontExplorer X Pro.dmg',
           'url': u'http://www.fontexplorerx.com/download/free-trial/Mac'}}
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg
{'Output': {'pathname': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
AppDmgVersioner
{'Input': {'dmg_path': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg'}}
Agree Y/N?

After entering "Y" the run proceeds and I am asked a second time

Agree Y/N? Y
AppDmgVersioner: Mounted disk image /Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg
AppDmgVersioner: BundleID: com.linotype.FontExplorerX
AppDmgVersioner: Version: 4.2.1
{'Output': {'app_name': u'FontExplorer X Pro.app',
            'bundleid': u'com.linotype.FontExplorerX',
            'version': u'4.2.1'}}
Copier
{'Input': {'destination_path': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/FontExplorer X Pro/FontExplorer X Pro.app',
           'overwrite': True,
           'source_path': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg/FontExplorer X Pro.app'}}
Agree Y/N? Y

And if I do subsequent runs it creates multiple packages and multiple packageinfos of the same version:

The following new items were imported:
    Name                     Version          Catalogs                         Pkginfo Path
    ----                     -------          --------                         ------------
    FontExplorer X Pro       4.2.1            testing                          apps/FontExplorer X Pro-4.2.1.plist
The following new items were imported:
    Name                     Version          Catalogs                         Pkginfo Path
    ----                     -------          --------                         ------------
    FontExplorer X Pro       4.2.1            testing                          apps/FontExplorer X Pro-4.2.1__1.plist

Is this the expected behavior or am I doing something terribly wrong?

@gregneagle
Copy link

On Oct 9, 2014, at 11:05 AM, henningkessler [email protected] wrote:

And if I do subsequent runs it creates multiple packages and multiple packageinfos of the same version:

The following new items were imported:
Name Version Catalogs Pkginfo Path


FontExplorer X Pro 4.2.1 testing apps/FontExplorer X Pro-4.2.1.plist

The following new items were imported:
Name Version Catalogs Pkginfo Path


FontExplorer X Pro 4.2.1 testing apps/FontExplorer X Pro-4.2.1__1.plist

Is this the expected behavior or am I doing something terribly wrong?

That, at least, is expected behavior if you don't run makecatalogs between autopkg imports. If the items are not in the catalogs, the MunkiImporter processor won't know they are the repo.

@henningkessler
Copy link
Author

Oh sorry, I should have considered a bit longer before posting this part. Thank you for clarifying this.

@gregneagle
Copy link

On Oct 9, 2014, at 11:05 AM, henningkessler [email protected] wrote:

I will be asked if I accept the license agreement and the run stops there waiting for input:
[someone@server:/Volumes/DS4600_RAID/Admin]1050$ autopkg run -vv FontExplorerXPro.munki
Processing FontExplorerXPro.munki...
URLDownloader
{'Input': {'filename': u'FontExplorer X Pro.dmg',
'url': u'http://www.fontexplorerx.com/download/free-trial/Mac'}}
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg
{'Output': {'pathname': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg'}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
AppDmgVersioner
{'Input': {'dmg_path': u'/Users/someone/Library/AutoPkg/Cache/local.munki.FontExplorerXPro/downloads/FontExplorer X Pro.dmg'}}
Agree Y/N?

After entering "Y" the run proceeds and I am asked a second time
As for this, the DmgMounter processor (of which the AppDmgVersioner processor is a subclass) should handle the license agreement for you:

https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/DmgMounter.py#L109-L110

This is the same code used by Munki when mounting a disk image that has an embedded SLA.

Not sure why it's not working for you.

-Greg

@mosen
Copy link
Contributor

mosen commented Oct 9, 2014

Just a further unrelated note about the recipe - In 4.2.1 I see that I can't copy the license file into the bundle. Warnings about bundle modification. I'm using the server to distribute the client license, but I will investigate licensing the client as standalone, and where that license is installed.

@henningkessler
Copy link
Author

My problem seams to be related to the OS version (10.6.8). I just made another test install on a VM with 10.6.8 and had the same effect...

mosen pushed a commit that referenced this issue May 24, 2015
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

3 participants