Commit Graph

109 Commits

Author SHA1 Message Date
Richard Purdie 75883f84c8 lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk repos don't conflict
(From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8)

(From OE-Core rev: a18942b0b3b848ccfa4bc50c56a565c279da9d74)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-22 10:40:08 +00:00
Alexander Kanavin 529244ee21 run-postinsts: simplify the logic of whether to install it to images
The logic is scattered all over the place, but amounts to
"install, unless the rootfs is read only". Let's express that directly.

(From OE-Core rev: 697804229a172125ce7d3bfc9b343812d6fe3240)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Joshua Lock 3c59b1bf93 meta: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.

Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)

(From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Richard Purdie 7fa6eeba1c classes/lib: Add expand parameter to getVarFlag
This sets the scene for removing the default False for expansion
from getVarFlag. This would later allow True to become the default.

On the most part this is an automatic translation with:

sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g'  -i `grep -ril getVar *`

In this case, the default was False, but True was used since in most
cases here expansion would be expected.

(From OE-Core rev: 42a10788e89b07b14a150ced07113566cf99fcdd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:00 +00:00
Martin Jansa cf218e56af rootfs_*.bbclass: don't add BUILDNAME to do_rootfs vardepsexclude
* rootfs_*.bbclass doesn't use this variable anymore, so we can drop it

(From OE-Core rev: bf91547d887aee2893e26e6073e12c540222b422)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-24 15:50:27 +00:00
Paul Barker e4d165d79a opkg: Merge in opkg-collateral
All non-arch-specific and non-distro-specific configuration is now kept in the
main 'opkg' recipe and package.

(From OE-Core rev: e8879cd1ec8914815c7a78f1d9b296b0e2b30fcf)

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:56 +00:00
Richard Purdie 2501287c69 rootfs_*: Refactor common depends/lockfile task flags
(From OE-Core rev: 96427656ef73bb50753a33ec6ad5e73de711ceb3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
Richard Purdie e6837f785c classes: Combine rootfs_<pkgtype> and populate_sdk_<pkgtype>
There is no real reason to have these separate files any longer. It does
mean in meta-toolchain type recipes some extra variables are defined but
it also means the common code can be grouped and maintained together
which I believe is more beneficial. We therefore merge the classes.

(From OE-Core rev: 2cf42b49003494e1b10775523c9a2547eaf16ea4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:46 +01:00
David Nyström f9c7936045 do_rootfs: Add PACKAGE_FEED_URIS as a vardep
A bit uncertain on where to put this, suggestions welcome.
Needed to automatically rebuild do_rootfs when PACKAGE_FEED_URIS
change.

(From OE-Core rev: c779bf78f2e1f66f3c8a6b02054e39bee4ea88a5)

Signed-off-by: David Nyström <david.c.nystrom@gmail.com>
Signed-off-by: David Nyström <david.nystrom@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07 15:05:08 +00:00
Laurentiu Palcu e091548568 (image|rootfs_ipk).bbclass, rootfs.py: ipk multilib fixes
This commit whitelists some common directories, so the multilib sanity
checks pass and also fixes an issue in lib/oe/rootfs.py when the
compared files do not exist.

(From OE-Core rev: 4615ac771175cd413f461c081f7d3191c49ccc4b)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13 11:41:22 +00:00
Laurentiu Palcu f4fa44cf91 rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkg
When using opkg as the PM backend, one has the option to provide custom
feeds to create the rootfs from.

This commit:
 * fixes this in the refactored code;
 * moves the custom config creation code to python;
 * clean up the package-ipk.bbclass;

(From OE-Core rev: 19c538f57c8fa7c566e88a6dbe13ea4826d4f26c)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:44 +00:00
Laurentiu Palcu f52391a919 Cleanup image,rootfs_ipk,package_ipk bbclass files
This commit cleans up the functions that were ported to python.

(From OE-Core rev: d950ef40a3eae4b54cc62828e66d84a62d78c447)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:39 +00:00
Phil Blundell b37dd451a5 rootfs_ipk: Ensure that BAD_RECOMMENDATIONS are honoured for all architectures
Commit a5362de60c0051f16b88a40bd9cb41915bee0b0f restricted us to writing
only a single entry to the status file for any given package.  This
avoids writing garbage entries (with no Status) when multiple versions
of the same package exist in the feed.  However, in the case where the
same version exists for multiple architectures (for example, has been
built for both cortexa15 and generic armv7a), we do need to write out
status file entries for all of them since we can't trivially determine
which one opkg will decide to install.

Fix this by undoing a5362de60c0051f16b88a40bd9cb41915bee0b0f and writing
out an entry for everything that matches, but ensuring that we force the
Status to the correct value for each one.

(From OE-Core rev: 12d7b44c817bdf6eea425bda607379594057c3fb)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-02 22:37:42 +00:00
Paul Eggleton 960e305d9a classes/image: write image manifest
Write a list of installed packages to a .manifest file next to the
image, so we can find out what went into the image after it has been
constructed without necessarily having to have buildhistory enabled
(although that will provide more detail.) We can make use of this for
example in the testimage class associated code that checks for installed
packages for determining whether or not to run specific tests.

Note: this replaces the previous ipk-specific manifest code with
something that works for ipk, rpm and deb, and instead of a pruned
status file, packages are listed one per line, in the following format:

<packagename> <packagearch> <version>

Tests for all three backends have shown that the performance impact of
this change is negligible (about 1.5s max).

Implements [YOCTO #5410]

(From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-26 23:01:32 +00:00
Jeffrey C Honig 33c97ee94d rootfs_*.bbclass: List which post-install scripts can not be run
When preping a read-only rootfs and finding some post-install
scripts that can not be run, list the names of said scripts to
avoid having to look around the rootfs to find a list.

(From OE-Core rev: 0188120691f433fdccf71b92618115195278c0af)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-22 14:08:33 +00:00
Mark Hatle 28eedee1d4 run-postinst: Ensure that the postinsts are ordered
The postinst files were being generated using purely the name of the package,
this unfortunately meant the run order would be based on the name of the
package and not the order in which it was installed on the filesystem.

If package A requires package Z to be fully installed, this causes a problem.

Note:

rpm - as the rpm based install proceeds the order is defined and captured.
      so the problem is resolved there.

ipk - this unfortunately does not appear to solve the problem for ipk, as
      the status file is not ordered in any appreciable way.  This does not
      cause any regressions however and sets the stage for a proper fix.

deb - this -may- fix the deb install.  Early testing indicates at least some
      ordering to the status file.  But it's unclear if it completely resolves
      the issue.

(From OE-Core rev: b5bafccb89f45d7cdd515b4ba45e0152ca7922de)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:32 +01:00
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