diskimage-builder/elements/package-installs
Dan Prince 208da5f605 Update packages earlier
Turns out that updating packages last causes some pretty
non-intuitive behaviour if you are trying to pin a package
to a specific version. Lets just update the base RPMs first...
subsequent installations should install the most updated version
anyways (unless they are pinned).

Also moves the package-installs script from the 00 step to 01 so
we can do the update first.

Co-Authored-By: Ben Nemec <bnemec@redhat.com>

Change-Id: I962046cc6048e852e6582fbc579f88bb73e23fdd
2015-04-13 21:50:10 +00:00
..
bin Fix check for installtype 2015-03-10 21:59:03 -04:00
extra-data.d Standarise tracing for scripts 2015-02-12 10:41:32 +11:00
install.d Update packages earlier 2015-04-13 21:50:10 +00:00
post-install.d Standarise tracing for scripts 2015-02-12 10:41:32 +11:00
pre-install.d Standarise tracing for scripts 2015-02-12 10:41:32 +11:00
element-deps package-installs for pre-install.d/post-install.d 2014-08-14 21:18:19 -04:00
README.rst Create docs site containing element READMEs 2015-02-10 11:45:35 -08:00

================
package-installs
================

The package-installs element allows for a declarative method of installing and
uninstalling packages for an image build. This is done by creating a
package-installs.yaml or package-installs.json file in the element directory.


example package-installs.yaml::

 libxml2:
 grub2:
   phase: pre-install.d
 networkmanager:
   uninstall: True
 os-collect-config:
   installtype: source

example package-installs.json::

    {
    "libxml2": null,
    "grub2": {"phase": "pre-install.d"},
    "networkmanager": {"uninstall": true}
    "os-collect-config": {"installtype": "source"}
    }


Setting phase, uninstall, or installtype properties for a package overrides
the following default values::

    phase: install.d
    uninstall: False
    installtype: * (Install package for all installtypes)

Setting the installtype property causes the package only to be installed if
the specified installtype would be used for the element. See the
diskimage-builder docs for more information on installtypes.


DEPRECATED: Adding a file under your elements pre-install.d, install.d, or
post-install.d directories called package-installs-<element-name> will cause
the list of packages in that file to be installed at the beginning of the
respective phase.  If the package name in the file starts with a "-", then
that package will be removed at the end of the install.d phase.