{"action":"created","issue":{"url":"https://api.github.com/repos/munki/munki/issues/607","repository_url":"https://api.github.com/repos/munki/munki","labels_url":"https://api.github.com/repos/munki/munki/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/munki/munki/issues/607/comments","events_url":"https://api.github.com/repos/munki/munki/issues/607/events","html_url":"https://github.com/munki/munki/issues/607","id":153084584,"number":607,"title":"Uninstalling an item also tries to remove update_for items that other items also list as update_fors","user":{"login":"nmcspadden","id":1202655,"avatar_url":"https://avatars.githubusercontent.com/u/1202655?v=3","gravatar_id":"","url":"https://api.github.com/users/nmcspadden","html_url":"https://github.com/nmcspadden","followers_url":"https://api.github.com/users/nmcspadden/followers","following_url":"https://api.github.com/users/nmcspadden/following{/other_user}","gists_url":"https://api.github.com/users/nmcspadden/gists{/gist_id}","starred_url":"https://api.github.com/users/nmcspadden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmcspadden/subscriptions","organizations_url":"https://api.github.com/users/nmcspadden/orgs","repos_url":"https://api.github.com/users/nmcspadden/repos","events_url":"https://api.github.com/users/nmcspadden/events{/privacy}","received_events_url":"https://api.github.com/users/nmcspadden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-04T18:37:48Z","updated_at":"2016-05-19T17:17:42Z","closed_at":null,"body":"Here's the setup:\r\n\r\nItem A is an optional_install.  It has four things that are update_for Item A: Items 1, 2, 3, 4.\r\n\r\nItem B is an optional_install as well. It has the exact same four update_for items as Item A: 1, 2, 3, 4.\r\n\r\nWe want to remove Item A from everyone's machine.  I move Item A from optional_installs to managed_uninstalls.\r\n\r\nOn a machine with Item A, and Item B installed simultaneously:\r\nWhen I do a managedsoftwareupdate run, it adds Items 1, 2, 3, 4 to the uninstall list, and then complains it can't process them for install because they've already been processed for uninstall.\r\n\r\nThe expected behavior is that only Item A itself is removed, but items 1, 2, 3, and 4 are left untouched.\r\n\r\nHere's the output of `managedsoftwareupdate`, where \"Item A\" = Tableau9, and \"Item B\" = Tableau93.  Items 1-4 are listed below.\r\n```\r\n\r\nChecking for available updates...\r\n    Getting manifest testing...\r\n    Retrieving list of software for this machine...\r\n\t0..20..40..60..80..100\r\n    Using manifest: testing\r\n    **Checking for installs**\r\n    Getting catalog testing...\r\n    Retrieving catalog \"testing\"...\r\n\t0..20..40..60..80..100\r\n    ...snip...\r\n    **Checking for removals**\r\n    Removal of SimbaSQLServerODBC added to ManagedInstaller tasks.\r\n    Removal of Tableau PostgreSQL Libraries added to ManagedInstaller tasks.\r\n    Removal of VerticaODBCDrivers added to ManagedInstaller tasks.\r\n    Removal of Tableau Oracle Libraries added to ManagedInstaller tasks.\r\n    Removal of Tableau9 added to ManagedInstaller tasks.\r\n    **Checking for implicit removals**\r\n    Tableau8 doesn't appear to be installed.\r\n    **Checking for managed updates**\r\n    ...snip...\r\n    **Processing local-only choices**\r\n    **Processing self-serve choices**\r\n    Tableau93 version 9.3.0 (or newer) is already installed.\r\nWARNING: Will not process SimbaSQLServerODBC for install because it has already been processed for uninstall!\r\n    MySQLODBCDrivers version 5.3.3 (or newer) is already installed.\r\nWARNING: Will not process Tableau PostgreSQL Libraries for install because it has already been processed for uninstall!\r\nWARNING: Will not process Tableau Oracle Libraries for install because it has already been processed for uninstall!\r\nWARNING: Will not process VerticaODBCDrivers for install because it has already been processed for uninstall!\r\n    TableauRegistration version 1.0 (or newer) is already installed.\r\n    ...snip...\r\n    No change in InstallInfo.\r\n    The following items will be removed:\r\n        - SimbaSQLServerODBC\r\n        - Tableau PostgreSQL Libraries\r\n        - VerticaODBCDrivers\r\n        - Tableau Oracle Libraries\r\n        - Tableau9\r\n\r\nRun managedsoftwareupdate --installonly to install the downloaded updates.\r\nFinishing...\r\n    Performing postflight tasks...\r\nDone.\r\n```"},"comment":{"url":"https://api.github.com/repos/munki/munki/issues/comments/220392251","html_url":"https://github.com/munki/munki/issues/607#issuecomment-220392251","issue_url":"https://api.github.com/repos/munki/munki/issues/607","id":220392251,"user":{"login":"gregneagle","id":700560,"avatar_url":"https://avatars.githubusercontent.com/u/700560?v=3","gravatar_id":"","url":"https://api.github.com/users/gregneagle","html_url":"https://github.com/gregneagle","followers_url":"https://api.github.com/users/gregneagle/followers","following_url":"https://api.github.com/users/gregneagle/following{/other_user}","gists_url":"https://api.github.com/users/gregneagle/gists{/gist_id}","starred_url":"https://api.github.com/users/gregneagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregneagle/subscriptions","organizations_url":"https://api.github.com/users/gregneagle/orgs","repos_url":"https://api.github.com/users/gregneagle/repos","events_url":"https://api.github.com/users/gregneagle/events{/privacy}","received_events_url":"https://api.github.com/users/gregneagle/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T17:17:42Z","updated_at":"2016-05-19T17:17:42Z","body":"There's a real chicken-and-the-egg problem here and I could use some other thinkers.\r\n\r\nAs I described previously, the issue occurs because when the managed_uninstall is processed, GoogleChrome is not yet in the list of managed_installs.\r\n\r\nSelf-service managed_installs can't be processed until the valid list of available optional_installs is generated.\r\n\r\nThe valid list of available optional_installs can't be generated until after managed_installs and managed_uninstalls are processed, since an item that is in managed_installs or managed_uninstalls should not be listed as available as an optional_install.\r\n\r\nThere is probably some sort of \"multi-pass\" processing of these items that could help us resolve this dependency loop, but I'm having trouble mentally visualizing what that might be."}}