{"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":3,"created_at":"2016-05-04T18:37:48Z","updated_at":"2016-05-25T22:50:39Z","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/221731207","html_url":"https://github.com/munki/munki/issues/607#issuecomment-221731207","issue_url":"https://api.github.com/repos/munki/munki/issues/607","id":221731207,"user":{"login":"aysiu","id":13055957,"avatar_url":"https://avatars.githubusercontent.com/u/13055957?v=3","gravatar_id":"","url":"https://api.github.com/users/aysiu","html_url":"https://github.com/aysiu","followers_url":"https://api.github.com/users/aysiu/followers","following_url":"https://api.github.com/users/aysiu/following{/other_user}","gists_url":"https://api.github.com/users/aysiu/gists{/gist_id}","starred_url":"https://api.github.com/users/aysiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aysiu/subscriptions","organizations_url":"https://api.github.com/users/aysiu/orgs","repos_url":"https://api.github.com/users/aysiu/repos","events_url":"https://api.github.com/users/aysiu/events{/privacy}","received_events_url":"https://api.github.com/users/aysiu/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T22:50:39Z","updated_at":"2016-05-25T22:50:39Z","body":"> There's a real chicken-and-the-egg problem here and I could use some other thinkers.\r\n\r\nThis may take too much re-engineering to be worth considering for implementation, but I'd imagine one way to solve this would be to queue up changes instead of attempting to do them right away—similarly to how Synaptic Package Manager works on Debian-based (or even some RPM-based) Linux distros. You mark such-and-such for install, and apt determines dependencies and marks them installation. Or you mark such-and-such for removal, and apt determines reverse dependencies and marks them for removal. In the end, after all the changes (removal/installation) have been marked, you click Apply Changes, and then whatever needs to be done is done.\r\n\r\nWith that kind of approach, Munki would see Firefox is set for removal and would thus queue up Adobe Flash for removal. Then when Munki got to the optional installs, it would see Chrome is queued for installation and then cancel the queue to remove Flash... and then at the very end (after step #9), Munki would actually do all the queued removals/installations. The SelfServeManifest file itself could be the \"queue\" that Munki processes at the end.\r\n\r\nPerhaps I'm not understanding the issue well enough. Or perhaps that'd work fine but require too much of an overhaul."}}
{"actor":{"display_login":"aysiu"}}