Commit Graph

9 Commits

Author SHA1 Message Date
Pino Toscano
6d5447afe8 pkg-map: respect --missing-ok also on missing pkg-map file
When there is no pkg-map file for the specified element, list the passed
packages if --missing-ok is specified.

This mirrors what is being done already later, when a pkg-map file
exists but it does not have the mapping for the requested package.

Change-Id: I50287f8e6a5e4335deb3de2252075b8bfdd53ce5
2015-02-23 19:08:09 +01:00
Gregory Haynes
b10cfa841a Make some pkg-map errors soft
An app using pkg-map (like package-installs) might want to distinguish
between a hard error (invalid pkg-map file) and a soft error (no
mapping found). Currently this is not possible because we only return
with error values of 1.

Also printing error messages to stderror so we can still make use of
stdout data during a soft error.

Change-Id: I8bef56d3a74e8530afb8c58ac50ca3e9f7700639
2014-11-21 12:49:49 -08:00
Ryan Brady
c8037cc73f Fix $DISTRO_NAME usage for centos7 element
In both of the changed files in this patch, the $DISTRO_NAME usage
is checking against "centos".  The valid value for the centos7
element for $DISTRO_NAME is "centos7"[1].

[1] http://git.io/8IvuTw

Change-Id: I0c4a4b2ecf87c7a9283d10071f6feb494a6c716a
2014-10-01 21:42:47 -04:00
Ghe Rivero
fecbb03e54 Allow to specify an empty package list in pkg_map
An empty package list can be provided in a pkg_map file for those
cases were there is no need to install the package.

Change-Id: I0df8c6848ec4ac9e0f90790f14e8eb5399650339
2014-08-18 06:24:55 +00:00
Ian Wienand
5abb4a4f12 Initial centos7 support
Initial support for a centos7 image.

This is separate to rhel7 because the major differences are things
like repo and image locations, which are always going to be different.
We should merge any real changes into the redhat-common layers.

Apart from the added support files in centos7/*, the other change is
mostly modifications to redhat-common's extract-image to handle
different partition layouts of the centos7 image.

Change-Id: I943abe5ff0a803f36eda266a79af0d9220edcae7
2014-07-16 10:43:05 +10:00
Jenkins
012c974430 Merge "Add RHEL7 to Red Hat family in pkg-map" 2014-07-03 00:50:35 +00:00
Ryan Brady
4226bd66ba Add RHEL7 to Red Hat family in pkg-map
The current "redhat" os family omits RHEL7. The rhel7 element has the
corresponding $DISTRO_NAME set in environment.d.  This patch adds rhel7
so a pkg-map json file using "redhat" for the os family will work the
same as rhel, centos and fedora.

Change-Id: If6b4cbba618167669a499e6121f234942ca9367a
2014-06-26 16:29:59 -04:00
Ryan Brady
dcba738541 Remove uneeded code from pkg-map
This patch removes a couple of lines of redundant code.  In Python,
the get method on a dictionary defaults the return value to None,
so the method never raises a key error.

https://docs.python.org/2/library/stdtypes.html#typesmapping

Change-Id: I180877f9be23d373cd63771bb3682d6587ec6fac
2014-06-03 11:37:15 -04:00
Dan Prince
c55539b142 Add pkg-map element.
Adds a new pkg-map element which can be used to install
packages based on an in element 'pkg-map' JSON config
file format.

As part of this change we expose DIB's IMAGE_ELEMENT variable
so that we can have access to the element names which are being
installed in a clean manner.

This change is intended to decouple elements from DIB
and allow new elements to support multiple distributions
(with various package naming schemes) without having to
constantly maintain DIB's various bin/map-packages files.

Change-Id: Ic0a061995e2ae708c95a535cba6237bff58f7d93
2014-05-28 12:21:44 -04:00