Commit Graph

92 Commits

Author SHA1 Message Date
Richard Purdie 93ec1e347c classes: Remove references to _remove in function names since this may become a bitbake keyword
There is a good chance we might want to support a bitbake operator
"_remove" which works in a similar way to _append and _prepend. As
such, we can't use those keywords in function or variable names.

(From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:29:45 +01:00
Paul Eggleton f629afe153 classes/rootfs_rpm: implement BAD_RECOMMENDATIONS for RPM
Add support for the BAD_RECOMMENDATIONS variable that can be used to
prevent specific packages from being installed via an RRECOMMENDS
relationship when using the RPM backend. (Previously this
functionality was only available when using ipk packaging.)

In the process this moves the defaulting of BAD_RECOMMENDATIONS (as
empty) to bitbake.conf since it is no longer specific to the ipk
backend, as well as unifying some of the code that creates the
configuration for smart for use on the host and target.

Fixes [YOCTO #3916].

(From OE-Core rev: 4e85129a7d47baf3e32b815cbc277bff84e085a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:15 +01:00
Laurentiu Palcu b11f818307 rootfs_*.bbclass: add some helper functions
This patch adds the following helper functions:
 * delayed_postinsts - outputs the list of delayed postinstalls;
 * save_postinsts - this will save the delayed postinstalls for ipk/deb
   in /etc/(ipk|deb)_postinsts;
 * rootfs_remove_packages - removes packages from an image;

Additionaly, this patch will remove a piece of code in
rootfs_ipk_do_rootfs which will be moved to image.bbclass and used for
all backends;

[YOCTO #4484]

(From OE-Core rev: 928df79cd3964f775c4c6e4283ef84b8882f9328)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:38:04 +01:00
Paul Eggleton 59e4815387 classes/buildhistory: implement history collection for SDKs
SDKs are constructed in a similar manner to images, and the contents can
be influenced by a number of different factors, thus tracking the
contents of produced SDKs when buildhistory is enabled can help detect
the same kinds of issues as with images.

This required adding POPULATE_SDK_POST_HOST_COMMAND and
SDK_POSTPROCESS_COMMAND variables so that data collection functions can
be injected at the appropriate points in the SDK construction process,
as well as moving the list_installed_packages and
rootfs_list_installed_depends functions from the rootfs_{rpm,ipk,deb} to
the package_{rpm,ipk,deb} classes so they can also be called during
do_populate_sdk as well as do_rootfs.

Implements [YOCTO #3964].

(From OE-Core rev: c3736064483d4840e38cb1b8c13d2dd3a26b36aa)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-23 11:41:13 +00:00
Robert Yang cdd103823e rootfs_xxx.bbclass: fix bitbake -S hashes mismatch error
The bitbake -S <image> has errors, e.g.:

NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated
(/buildarea/lyang1/poky/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 8e44f2296f2d6cdf2ccb0236910ef59b and
46357d5e36713646b47b0fe2233e3c8c

This is caused by the BUILDNAME which is defined in cooker.py:

if not self.configuration.data.getVar("BUILDNAME"):
    self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M'))

The time changes during the first parsing and reparsing, so there is the
error, we already have:

do_rootfs[vardepsexclude] += "BUILDNAME"

but what we need is
rootfs_xxx_do_rootfs[vardepsexclude] +=  "BUILDNAME"

The do_rootfs doesn't depend on BUILDNAME directly, but indirectly, the
depends tree is:

do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME

So add BUILDNAME to rootfs_xxx_do_rootfs[vardepsexclude] would fix the
problem.

[YOCTO #3299]

(From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-12 18:33:27 +00:00
Ross Burton 6bf55c6e67 rootfs_ipkg: fix BAD_RECOMMENDATIONS handling
If multiple versions of the same package are in the package feed then the
generate status file would only contains a "deinstall" status for the last one,
which meant that BAD_RECOMMENDATIONS wouldn't actually work.

Use awk instead of grep and stop reading when we reach a newline, so we only
ever output a single stanza.

(From OE-Core rev: a5362de60c0051f16b88a40bd9cb41915bee0b0f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-19 14:37:51 -08:00
Laurentiu Palcu 5bb362a0ba rootfs_(ipk|deb|rpm).bbclass: check package installation status after ROOTFS_POSTPROCESS_COMMAND
Since the intercept fall-back procedure will change the package
installation status, do the checking after ROOTFS_POSTPROCESS_COMMAND
ends.

(From OE-Core rev: 414c3918baccc2166bba536c956eebaeb49aace3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:29 +00:00
Laurentiu Palcu e52c8b833e package_ipk, rootfs_ipk: remove the "set -x"
Comment the "set -x" lines since these will add a lot of extra, not
always necessary, debug messages in the log.do_rootfs.

[YOCTO #2599]

(From OE-Core rev: 5d8119f3d749073e355351e0e15f2703fad738f2)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:24 +00:00
Martin Jansa 77b1409522 ipk: use OPKGLIBDIR in all places
* it's not recommended to change this value, because it breaks upgrade path on target
  (all old u-a alternatives are forgot in old OPKGLIBDIR value
* but make it consistent, so if someone really want to change that, then
  setting OPKGLIBDIR_distro in distro.conf would be enough
* without this there were at least 4 places to change:
  rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond
              with EXTRA_OECONF option used in opkg recipes
  package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in
               package_install_internal_ipk
  opkg-collateral: value in lists file
  opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install
* validated with buildhistory that without OPKGLIBDIR explicitly set the
  output is the same and that after setting
  OPKGLIBDIR_forcevariable := "${libdir}"
  everything including empty directory from package_ipk is moved to
  libdir

(From OE-Core rev: cf0aa9c4fdae8855803e96b1922d54a2431795d3)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:22 +00:00
Paul Eggleton 8ca0d592c5 classes/rootfs_*: error out if postinstalls exist with read-only rootfs
If there are postinstall scripts to be run on first boot and
IMAGE_FEATURES contains "read-only-rootfs", we know this will fail on
the target device so just error out during do_rootfs. This check was
already implemented for ipk, so add it to the deb and rpm backends. Also
make all backends use bberror rather than just echo to display the
error.

Fixes [YOCTO #3407].

(From OE-Core rev: 510e377f252dece8850487c30482f83df4a89c7e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:05 +00:00
Martin Jansa 5f2515667d rootfs_*.bbclass: exclude BUILDNAME var dependency from do_rootfs
* I have kernel recipe which depends on other recipe to build tiny initramfs
  image, without this change it rebuilds not only that initramfs image
  but also whole kernel when DATE or TIME is changed and OEBasicHash enabled
* also resolves ERROR shown when bitbake -S is used for image:
  ERROR: Bitbake's cached basehash does not match the one we just generated
  (/OE/oe-core/openembedded-core/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
  ERROR: The mismatched hashes were 8c35cdf8a5d09c03941f081dd9f6d8dc and b5d6e2e5952770557c48c5779ddb73fc

(From OE-Core rev: a78d2d21fffd646a0d6e0f02a8355be010a7bd28)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:54:51 +00:00
Richard Purdie 25bc944d30 rootfs_ipk/package_ipk: Simplify opkg commandline option variables
The current maze of IPKG_ARGS variables is hard to understand and worse,
not even used in some places. This simplifies the code and specifies the
options in one place.

(From OE-Core rev: 5e482b278c3775b0acecc621cf2d3b90ee516f26)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Laurentiu Palcu fd401f292e rootfs generation: export two new variables to postinst scriptlets
In order for the postinst scriptlets to be able to run once we need to
export the location of the intercept scripts and also the location of
native sysrootfs. The gdk-pixbuf binaries will need the latter because
in order to generate the loaders.cache it will need to scan some shared
libraries that must be native. Even though the output is a text file.

(From OE-Core rev: 927fabf549bb79cc179d2cb0a953dcd515acf464)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:09 +00:00
Martin Jansa 88a9f6db34 rootfs_ipk, package_ipk: drop --force-overwrite
* it was introduced in 2010 by 8c3a7ebac8
  but doesn't seem needed anymore
* also such do_rootfs failure is good indication that runtime packages
  installed are not sane, ignoring this error in do_rootfs just
  transfers the issue to end user when he does "opkg upgrade" later
  on device
* tested on SHR images with whole feed included and only issue was
  gstreamer/gst-plugins-* locale packages (and there is patch for this
  on oe-core ML)

(From OE-Core rev: 1f7d3a2e9071ff78170c06ebf58c7400a5ee09bf)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:32:46 +00:00
Laurentiu Palcu f931aeb72e rootfs_ipk.bbclass: add missing --force_postinstall option
The force_postinstall option was missing and some packages were
configured on target rather than on host at rootfs time.

(From OE-Core rev: dfadfaa0b38678029ffebe14f15e2dbc148cb1fb)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-28 15:18:46 +00:00
Andrei Gherzan 8255558613 rootfs_ipk.bbclass: Some extra spaces / tabs were removed / formated
(From OE-Core rev: 414822d2caec720319c026324edd59234d0134ff)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-23 12:28:33 +01:00
Andrei Gherzan e7f1ec945b rootfs_ipk.bbclass: Don't duplicate remove_packaging_data_files code
While removing packaging data files in rootfs_ipk_do_rootfs use the
remove_packaging_data_files function. By using this function we ensure
that /var/lib/opkg directory is created. opkg needs this directory to
create lock files.

(From OE-Core rev: 1f3300766b827ed73daaa01572017775305105b2)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-23 12:28:33 +01:00
Richard Purdie 34bd4e1743 opkg: Convert select-higher-version option to prefer-arch-to-version
This converts the option to maintain the existing behaviour unless the option is
specified. We do specify the option during the builds themselves to ensure what
the users expects is built.

(From OE-Core rev: 0cc479699fe885049625d54c712b500c1b719e75)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 17:10:33 +01:00
Phil Blundell e36751cdcd rootfs_ipk: Avoid leaving run-postinsts around if online package management is disabled
If all postinsts have already been run during rootfs construction then
there's no point in having run-postinsts in the installed system.
Clean it up at the same time that update-rc.d and suchlike are being
removed.

(From OE-Core rev: b260cf9fbeb6f029c1ce45e77edd03968caa8288)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 11:30:36 +01:00
Paul Eggleton 20ad566d60 buildhistory: improve performance of image info collection
Reduce the number of calls to the packaging tool, especially in the case
of rpm, using helper utilities to gather the required information more
efficiently where possible.

(From OE-Core rev: d0b8a98c5b46c305afd389fc862b3bf0c6f1eaab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:15 +01:00
Paul Eggleton fa5640d143 Rework installation of dev, dbg, doc, and locale packages
Use a similar mechanism that was previously used to install locales at
rootfs generation time to install other "complementary" packages (e.g.
*-dev packages) - i.e. install all of the explicitly requested packages
and their dependencies, then get a list of the packages that were
installed, and use that list to install the complementary packages. This
has been implemented by using a list of globs which should make it
easier to extend in future.

The previous locale package installation code assumed that the locale
packages did not have any dependencies that were not already installed;
now that we are installing non-locale packages this is no longer
correct. In practice only the rpm backend actually made use of this
assumption, so it needed to be changed to call into the existing package
backend code to do the complementary package installation rather than
calling rpm directly.

This fixes the doc-pkgs IMAGE_FEATURES feature to work correctly, and
also ensures that all dev/dbg packages get installed for
dev-pkgs/dbg-pkgs respectively even if the dependency chains between
those packages was not ensuring that already.

The code has also been adapted to work correctly with the new
SDK-from-image functionality. To that end, an SDKIMAGE_FEATURES variable
has been added to allow specifying what extra image features should go
into the SDK (extra, because by virtue of installing all of the packages
in the image into the target part of the SDK, we already include all of
IMAGE_FEATURES) with a default value of "dev-pkgs dbg-pkgs".

Fixes [YOCTO #2614].

(From OE-Core rev: 72d1048a8381fa4a8c4c0d082047536727b4be47)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:14 +01:00
Mark Hatle b70c9154e4 image.bbclass: Add support to build the SDK in parallel with the image
When building an image recipe, you can now build a companion SDK by
calling the populate_sdk task:
  bitbake -c populate_sdk core-image-minimal

Note: there are still issues w/ the SDK not working completely with
multilibs.

A lock is required between rootfs and populate_sdk activities to prevent
configuration file clashes and similar package management problems in ipk
and deb based systems.  (RPM already had a lock for a different reason.)

(From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:55:00 +01:00
Paul Eggleton 12b4543ac9 classes/rootfs_*: fix splitting package dependency strings
If a + character appears in a version specification within the list of
package dependencies, the version will not be removed from the list in
list_package_depends/recommends leading to garbage appearing in the
dependency graphs generated by buildhistory. To avoid any future
problems due to unusual characters appearing in versions, change the
regex to match almost any character.

Fixes [YOCTO #2451].

(From OE-Core rev: 36d1717e2ad4ca1620ee9f01b524b5ff2f499b26)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-13 20:09:56 +01:00
Martin Jansa debd5d5bb1 rootfs_ipk: don't echo opkg-cl output to log.do_rootfs
* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

(From OE-Core rev: 76c83f107d4a4688a879e30821ab70812052bbdc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-30 17:20:23 +01:00
Martin Jansa c5d91b1170 rootfs_ipk: replace 3 opkg-cl calls with one in get_package_filename
* || true is needed for cases where grep doesn't find anything
* and quotes around info are needed to keep line breaks

(From OE-Core rev: 9a8199e4a0f46ed3e9582143b206144aee28b709)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26 23:29:45 +01:00
Otavio Salvador 826c1a1e44 rootfs_ipk.bbclass: fix status file location in rootfs
This fixes runtime requirement checking and read-only-fs checking.

(From OE-Core rev: c50a46fbd50a148146fb1f077db20cdc8121f20b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 00:45:44 +00:00
Martin Jansa 936aca72c9 rootfs_ipk: remove runtime_script_required usage
* it was introduced in 87780fc09b066525e47d0f50ee5497db54d304cd
* then partially removed in 2feba313c991170747381c7cf821a45c2cd04632
* so remove this use too as runtime_script_required is not initialized anymore and results in
  run.do_rootfs.6328: line 235: [: -eq: unary operator expected

(From OE-Core rev: 6d3eac57bdba8e2582c210a2f82a3a4546f68581)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-01 15:07:44 +00:00
Paul Eggleton 38c2f66ea7 classes/image: implement generic locale package installation
Let each package-specific rootfs implementation provide basic functions
to query the existence of a package and install a list of packages and
then have a generic install function so this logic is in one place.

Note: unlike previous versions of this code in OE-Core this uses the
IMAGE_LINGUAS variable and not IMAGE_LOCALES - note that IMAGE_LINGUAS
was what was used in OE-Classic and it is already used in OE-Core in
order to install locale-base-*. This will mean that if IMAGE_LINGUAS is
left at the default you will now get more packages installed. If you
don't want these language support packages then you should set
IMAGE_LINGUAS explicitly.

This restores locale installation to the same state as OE-Classic, only
we now support all the packaging backends.

(From OE-Core rev: c0fc36f8629a6abb9a7b542df8a2857526547a31)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-03 12:14:26 +00:00
Richard Purdie 1855e94280 opkg: Update svn 625 -> 633 and fix preinst issues
There is a major issue with opkg images at the moment as preinst
functions are not being executed before their dependencies are installed
and this is leading to corruption of images containing avahi/dbus in
particular.

There are various changes in upstream opkg in the last 8 revisions which
make changes in this area but sadly these aren't enough to get things
working for us. I've updated to the latest svn revision with this patch
since it makes sense to pull in those changes first and then supplement
them with the attached patches.

There is a full description of the patches in the patch headers but in
summary they:

a) Ensure preinst functions execute with their dependencies installed.
   This is a pretty invasive change as it changes the package install
   ordering in general.
b) Ensure opkg sets $D, not $PKG_ROOT which we don't use
c) Change opkg to allow execution of postinstall functions which fail
   resulting in execution on the target device as rootfs_ipk.bbclass
   currently does manually.

The remaining changes interface this with the rest of the OE build
infrastructure, adding in the option to tell opkg to run the preinst and
postinst functions, ensure the correct environment is present for the
postinst scripts and removing the now unneeded rootfs_ipk class code
which opkg now does itself.

[YOCTO #1711]

(From OE-Core rev: 2feba313c991170747381c7cf821a45c2cd04632)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16 16:05:37 +00:00
Eric Bénard 64ee1e6e71 rootfs_ipk: implement FEED_DEPLOYDIR_BASE_URI support
this feature was present in OE-classic, is documented in OE-core
but its implementation is actually missing.
The present implementation is directly copied from OE-classic
and tested on an arm926 machine.

(From OE-Core rev: 63b619fd7a3d0ca55a965f0a5b99f6e9c8584ea4)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:26 +00:00
Paul Eggleton 6ba6f4a6f7 classes/buildhistory: add new output history collection class
Create a new build output history reporting class, using testlab.bbclass
from meta-oe as a base. This records information from images produced by
the build process in text files structured suitably for tracking within
a git repository, thus enabling monitoring of changes over time.

Build history collection can be enabled simply by adding the following
to your local.conf:

INHERIT += "buildhistory"

The output after a build can then be found in BUILDHISTORY_DIR (defaults to
TMPDIR/buildhistory). If you set up this directory as a git repository and
set BUILDHISTORY_COMMIT to "1" in local.conf, the build history data will
be committed on every build.

(From OE-Core rev: 14acb530a27a3b088d0bfd56db291f4e72ace8ab)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-05 16:23:53 +00:00
Richard Purdie b187b2775c Revert "classes/buildhistory: add new output history collection class"
This reverts commit 508ff624fea705eb93cf2cc1e0c9c42cb817acf8. RP
accidentally pulled the wrong commit in, it was supposed to be a
*package*history bbclass change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01 23:02:12 +00:00
Paul Eggleton 1dcb2d8eeb classes/buildhistory: add new output history collection class
Create a new build output history reporting class, using testlab.bbclass
from meta-oe and packagehistory.bbclass as a base. This records information
from packages and images output from the build process in text files
structured suitably for tracking within a git repository, thus enabling
monitoring of changes over time.

Build history collection can be enabled simply by adding the following
to your local.conf:

INHERIT += "buildhistory"

The output after a build can then be found in BUILDHISTORY_DIR (defaults to
TMPDIR/buildhistory). If you set up this directory as a git repository and
set BUILDHISTORY_COMMIT to "1" in local.conf, the build history data will
be committed on every build.

(From OE-Core rev: 508ff624fea705eb93cf2cc1e0c9c42cb817acf8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01 16:54:07 +00:00
Richard Purdie 8135963ff2 rootfs_ipk.bbclass: Ensure bad recommendations persist in the status file
Currently bad recommendations are added to the status file with status
"ok". After a single opkg command, whilst it will ignore the recommendation,
the status changes to "installed" even if the recommended package was not
installed. Whilst this is likely a glitch in opkg's logic, the correct
way to persist the information in the status file is to set the status
to "hold" as deinstall packages with that status remain. With this change
the bad recommendations persist accross multiple opkg runs and the system
behaves as expected.

[YOCTO #1758]

(From OE-Core rev: 215ff6b2e9676c8c7dd8acfd696151bcd0f1490f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-14 11:15:45 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Dongxiao Xu 1ef442561d multilib: Drop MULTILIB_IMAGE_INSTALL
There should just be a single IMAGE_INSTALL variable. If the package
backends need this split into different multilib components they should
be responsible for doing this, not the user.

This commit removes the MULTILIB_IMAGE_INSTALL variable.

[YOCTO #1564]

(From OE-Core rev: 7736862a74c92fe1afe42e170822be13117575c2)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08 14:32:55 +00:00
Koen Kooi de0d9ae939 rootfs_ipk bbclass: special-case base-passwd preinst to run first
Preinst are run alphabetically which breaks when e.g. avahi-daemon needs /etc/passwd present.

(From OE-Core rev: d6793165feb26c51b5f19ad1e6d1a4099878e879)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-04 15:43:29 +00:00
Lianhao Lu 27f8868509 debian/_ipk.bbclass: Added multilib support for package_name_hook()
[YOCTO #1486]
1. Added multilib support for package_name_hook() so MLPREFIX is kept in
the final package name.

2. clean the output of log_check_ipk.

(From OE-Core rev: e59c4e34daa688c033dd4ac07a69099610ac5705)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16 18:07:25 +01:00
Lianhao Lu 28543c5780 package(rootfs)_ipk.bbclass: support multilib in opkg backend.
Support install multiple multilib in opkg backend.

The installation is done in 3 phases.

Phase 1: install normal packages to IMAGE_ROOTFS.

Phase 2: install multilib packages under MULTILIB_TEMP_ROOTFS. Packages
belongs to the same multilib arch would be installed to a unique
directory.

Phase 3: check file confliction between IMAGE_ROOTFS and
MULTILIB_TEMP_ROOTFS, install multilib packages to IMAGE_ROOTFS only if
the sanity check passed.

(From OE-Core rev: 9d81c2166be7ed388e5616e01ca2b4059e524c8e)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:25:35 +01:00
Chris Elston 1e433eef8f Add support for BAD_RECOMMENDATIONS to rootfs_ipk
As discussed on IRC on 30/06/11, this patch adds support for
BAD_RECOMMENDATIONS to rootfs_ipk, which is a list of packages NOT to
install if suggested or recommended by a recipe.  Taken from
http://thread.gmane.org/gmane.comp.handhelds.openembedded/30417.

Note that current support for this in oe.dev may also be broken,
depending on the version of opkg in use.

(From OE-Core rev: 2b6900ad73919a0ecb8c5f1de31744ce7afe65f5)

Signed-off-by: Chris Elston <celston@katalix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:08:20 +01:00
Phil Blundell e24428521a rootfs_ipk: delete opkg metadata if package management not required and all packages are configured
If all the postinsts were successfully run in offline mode, and
package-management hasn't been requested as an IMAGE_FEATURE, the opkg
metadata is now redundant and can safely be deleted.

Also, the update-rc.d and base-passwd packages can be removed since
they will serve no further purpose in this situation.

If some packages are still unconfigured at this point then we need to
keep their metadata around so that either opkg or the awk script can
configure the packages at boot time.  In theory it would be possible to
strip out the data for packages that have already been configured, but
right now we just hold on to the whole status file in that situation.

(From OE-Core rev: 87780fc09b066525e47d0f50ee5497db54d304cd)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-02 14:55:55 +01:00
Phil Blundell 5d1fcb16b2 rootfs_ipk: issue a diagnostic if rootfs is declared read-only and not all maintainer scripts could be applied offline
(From OE-Core rev: 5e9becaa6ba8a0302e3bb91bff0d580127433918)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 15:50:57 +01:00
Lianhao Lu b94f9ccd05 rootfs_ipk/package_ipk.bbclass: Move func from rootfs_ipk to package_ipk
package_ipk.bbclass:
Added new function package_install_internal_ipk() to install a list of
ipk packages to a specified root directory, with the specified package
architecutre information.

rootfs_ipk.bbclass:
Used the above new functions to install rootfs.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-02-01 23:59:37 +00:00
Lianhao Lu 5b7e96d852 image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().
Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant
package_xx.bbclass. (Where xx is rpm/ipk/deb).

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-31 16:58:15 +00:00
Richard Purdie 8c3a7ebac8 rootfs_ipk: The most recent opkg errors upon file overwrite. Until we fix package conflicts, disable this for now
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-24 01:12:56 +00:00
Kevin Tian 8ea7fa6d4c opkg: finalize the change to var directory
commit 1d0757f16b changes opkg run state from
/usr/lib/opkg to /var/lib/opkg, which however is incomplete and still many
important information is kept under old directory including postinst methods.
This makes latest boot into a mess.

So finalize this movement to /var here. Fix [BUGID #229]

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-08-26 08:54:55 +01:00
Yu Ke 8658f478b7 rootfs_ipk.bbclass: add keyword "Collected errors" for log error check
Once ipk meet errors, the log will show "Collected errors:\n xxxx ".
so keyword "Collected errors" is more general to catch errors.

Signed-off-by: Yu Ke <ke.yu@intel.com>
2010-07-30 14:50:30 +01:00
Joshua Lock 0d18597ae7 rootfs_ipk: error when dependencies cannot be satisfied
Per bpo#109 dependency failure during rootfs generation did not cause an error
despite that it would cause errors later on in the process. This patch updates
the key phrases searched for in the log checking function.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-22 17:04:39 +01:00
Joshua Lock eb3c93f401 rootfs_ipk.bbclass: ensure the package manager can create lock files
The opkg package manager uses /usr/lib/opkg to store lock files in, modify the
remove_package_data_files() function to create an empty directory once the data
files are removed so that the lock can be created.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-06-10 14:49:50 +01:00
Richard Purdie b772c8cde5 bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.

The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:42 +00:00