diskimage-builder/diskimage_builder/elements/package-installs/bin
Clark Boylan 788224cfe0 Don't remove packages that are requested to be installed
Recently the source-repositories element was updated [0] to set git as a
build-only dep. This is fine if you don't request to install git
elsewhere as a regular package install [1]. If you mix the two then git
gets uninstalled when you expect it to be installed.

Address this by checking if a package is already requested to be
installed when we find a removal or build-only request. Similarly remove
a package from the uninstall list if we ask for it to be installed
normally. This means that explicit installs override any cleanup
actions.

[0] https://review.opendev.org/#/c/745678/1/diskimage_builder/elements/source-repositories/package-installs.yaml
[1] https://opendev.org/openstack/project-config/src/branch/master/nodepool/elements/infra-package-needs/package-installs.yaml#L22

Change-Id: Idc1aa86f10cddcd4549066d8ea1d6df6fd906bac
2020-08-21 08:30:22 -07:00
..
package-installs Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
package-installs-squash Don't remove packages that are requested to be installed 2020-08-21 08:30:22 -07:00
package-installs-v2 Deprecate dib-python; remove from in-tree elements 2020-08-07 10:38:16 +10:00
package-uninstalls Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00