Item already exists in the munki repo

523 views
Skip to first unread message

Jason Hatman

unread,
Sep 5, 2014, 11:03:48 AM9/5/14
to autopkg...@googlegroups.com
I have 2 versions of Office 2011, English and Spanish.  I have two recipeoverrides, MSOffice2011Updates.munki and MSOffice2011UpdatesESM.munki.  I just addess the ESM one and it will not import into Munki.  It says that items already exists.  I'm sure I've overlooked something, but I thought I had changed the applicable names and such appropriately.

bash-3.2$ autopkg run MSOffice2011UpdatesESM.munki -v
Processing MSOffice2011UpdatesESM.munki...
MSOffice2011UpdateInfoProvider
MSOffice2011UpdateInfoProvider: Got update: 'Office 2011 14.4.4 Update'
MSOffice2011UpdateInfoProvider: Update requires previous update version 14.1.0
MSOffice2011UpdateInfoProvider: Additional pkginfo: {'display_name': 'Office 2011 14.4.4 Update', 'description': u'<html><p>Esta actualizaci\xf3n soluciona problemas cr\xedticos. </p>\n\n<p>Para obtener informaci\xf3n detallada sobre esta actualizaci\xf3n, visite el siguiente sitio web:</p>\n\n<p><a href="http://go.microsoft.com/fwlink/?LinkId=510055" target="_blank">http://go.microsoft.com/fwlink/?LinkId=510055</a></p>\n\n<p>Para obtener m\xe1s ayuda u obtener una versi\xf3n descargable de esta actualizaci\xf3n, visite el <a href="http://go.microsoft.com/fwlink/?LinkId=216459" target="_blank">sitio web de Microsoft</a>.</p></html>', 'installs': [{'path': '/Applications/Microsoft Office 2011/Office/MicrosoftComponentPlugin.framework', 'CFBundleVersion': '14.4.4', 'CFBundleShortVersionString': '14.4.4', 'version_comparison_key': 'CFBundleShortVersionString', 'type': 'bundle'}], 'minimum_os_version': '10.5.8', 'requires': [u'Office2011ESM_update-14.1.0'], 'name': u'Office2011ESM_update'}
URLDownloader
URLDownloader: Item at URL is unchanged.
URLDownloader: Using existing /Jenkins_Done/local.munki.MSOffice2011UpdatesESM/downloads/Office2011-1444Update_ES-ES.dmg
EndOfCheckPhase
MunkiPkginfoMerger
MunkiPkginfoMerger: Merged {'display_name': 'Office 2011 14.4.4 Update', 'description': u'<html><p>Esta actualizaci\xf3n soluciona problemas cr\xedticos. </p>\n\n<p>Para obtener informaci\xf3n detallada sobre esta actualizaci\xf3n, visite el siguiente sitio web:</p>\n\n<p><a href="http://go.microsoft.com/fwlink/?LinkId=510055" target="_blank">http://go.microsoft.com/fwlink/?LinkId=510055</a></p>\n\n<p>Para obtener m\xe1s ayuda u obtener una versi\xf3n descargable de esta actualizaci\xf3n, visite el <a href="http://go.microsoft.com/fwlink/?LinkId=216459" target="_blank">sitio web de Microsoft</a>.</p></html>', 'installs': [{'path': '/Applications/Microsoft Office 2011/Office/MicrosoftComponentPlugin.framework', 'CFBundleVersion': '14.4.4', 'CFBundleShortVersionString': '14.4.4', 'version_comparison_key': 'CFBundleShortVersionString', 'type': 'bundle'}], 'minimum_os_version': '10.5.8', 'requires': [u'Office2011ESM_update-14.1.0'], 'name': u'Office2011ESM_update'} into pkginfo
MunkiImporter
MunkiImporter: Item Office2011-1444Update_ES-ES.dmg already exists in the munki repo as pkgs/apps/Microsoft/updates/Office2011-1444Update_EN-US-14.4.4.dmg.
Receipt written to /Jenkins_Done/local.munki.MSOffice2011UpdatesESM/receipts/MSOffice2011UpdatesESM-receipt-20140905-095655.plist

Nothing downloaded, packaged or imported.

MSOffice2011Updates.munki.recipe

MSOffice2011UpdatesESM.munki.recipe

Jason Hatman

unread,
Sep 8, 2014, 9:19:43 AM9/8/14
to autopkg...@googlegroups.com
Here's the verbose (-vvv) output.  If I am reading this right, it's taking the downloaded file from the Jenkins repo and trying to copy it into Munki under a different name. See lines 343-344 from the output below.


u'pkg_path': u'/Jenkins_Done/local.munki.MSOffice2011UpdatesESM/downloads/Office2011-1444Update_ES-ES.dmg',
 'pkg_repo_path': u'/Users/Shared/munki_repo/pkgs/apps/Microsoft/updates/Office2011-1444Update_EN-US-14.4.4.dmg', 

It downloads the Spanish version under the correct name "Office2011-1444Update_ES-ES.dmg".
However, It tries to copy the item into Munki using the name "Office2011-1444Update_EN-US-14.4.4.dmg" which already exists as the English version.

Hannes Juutilainen

unread,
Sep 8, 2014, 10:01:22 AM9/8/14
to autopkg...@googlegroups.com
We're doing the same thing with English and Finnish updates. I've solved this by forcing the munkiimport process in the recipes. This can be done by adding the following in the <key>Input</key> section:

<key>force_munkiimport</key>
<true />


And the recipe beginning looks like:

<key>Input</key>
<dict>
<key>CULTURE_CODE</key>
<string>040B</string>
<key>MUNKI_REPO_SUBDIR</key>
<string>autopkg/office</string>
<key>NAME</key>
<string>Office 2011 Update Finnish</string>
<key>VERSION</key>
<string>latest</string>
<key>force_munkiimport</key>
<true />
<key>pkginfo</key>
----------snip----------
</dict>


--
Hannes Juutilainen




--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hannes Juutilainen

unread,
Sep 8, 2014, 10:03:33 AM9/8/14
to autopkg...@googlegroups.com
And this of course means that munkiimport will import the item everytime. We're automating the English recipe (without the force) and manually running the Finnish one when there's updates.

--
Hannes

Gregory Neagle

unread,
Sep 8, 2014, 11:07:23 AM9/8/14
to autopkg...@googlegroups.com
This:


MunkiImporter: Item Office2011-1444Update_ES-ES.dmg already exists in the munki repo as pkgs/apps/Microsoft/updates/Office2011-1444Update_EN-US-14.4.4.dmg.


Makes me think the checksums are the same for both DMGs, and therefore MunkiImporter is telling you the truth: that the update already exists in the repo. Have you compared them?

-Greg

Gregory Neagle

unread,
Sep 8, 2014, 11:34:16 AM9/8/14
to autopkg...@googlegroups.com
A little investigation, and that's not the case.

The issue is in the MunkiImporter processor, in the find_matching_item_in_repo method: https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/MunkiImporter.py#L206


Then it looks for items that install the same applications (by name and version): https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/MunkiImporter.py#L229

Then it looks for items that leave the exact same set of receipts: https://github.com/autopkg/autopkg/blob/master/Code/autopkglib/MunkiImporter.py#L261

And this is where it matches; both the EN-US and the  ES-ES updater leave the exact same set of receipts. This of course implies there is no real difference between the updates except possibly in pre- or post- install _scripts_.

So it does seem that people affected by this will have to force the input of one or the other update, as Munki can't tell them apart.

-Greg

Reply all
Reply to author
Forward
0 new messages