Commit Graph

28084 Commits

Author SHA1 Message Date
Mark Hatle 287efe1494 useradd-staticids: Adjust USERADD_ERROR_DYNAMIC condition and error message
The USERADD_ERROR_DYNAMIC needs to check that both users and groups that are
defined need to be represented as static ids, or an error should occur.

For the user check, we want to make sure the uid is a numeric value.  (The gid
can be name, as the GROUPADD check will validate for a number there -- or
during install useradd will fail if that group is not defined.)

For the group check, we verify that the gid is specified and not left as a name.

Also two statements that can be uncommented for debugging were added so that
future development work on this code would be easier to do.

(From OE-Core rev: f35bbba65e3e41f8dea1f9ff872d3a9fbd84bf6d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:04:38 +00:00
Mark Hatle 39d9414b95 useradd-staticids: Fix groupadd when --user-group is selected
When --user-group is selected (it's on by default as well) we want
to translate that to a groupname and disable the --user-group.  Before
we just disabled --user-group, but didn't always add the group to the
system.

This change ensures that we add the group (as long as we have enough
information to actually add the group), and we disable --user-group
in that case.  If a static groupid is not specified we continue to
use the groupname, but via an explicit groupadd.

(From OE-Core rev: ae83db0fdcf0b807ffdfc901f4d1c463fffee82a)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:04:38 +00:00
Scott Rifenbark a146d50242 ref-manual: Edits to OEROOT variable.
Better wording.  "holds" could be confusing for some.

(From yocto-docs rev: d94a1be421f39637b1d760dad401fdfb54e20b07)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:32 +00:00
Scott Rifenbark 3e54f28497 ref-manual: Added link to SDKPATH variable.
Fixes [YOCTO #5755]

Put a link in the SDK section of the "Closer Look" chapter. The
link goes back to the SDKPATH variable.

(From yocto-docs rev: 7420da33bfa89625b5bbf592416c7f07780f8285)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:32 +00:00
Scott Rifenbark f670e3a134 ref-manual: Edits to ROOT_HOME
Fixes [YOCTO #5762]

Applied some more detail based on Laszlo's review comments.

(From yocto-docs rev: eb8d11504d6c22dfd9620422df3fc31cfcebb00c)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:32 +00:00
Scott Rifenbark f084e33e5d ref-manual: Added ROOT_HOME to glossary.
Fixes [YOCTO #5762]

Initial draft of this variable in the glossary.

Reported-by: Laszlo Papp <lpapp@kde.org>
(From yocto-docs rev: fb603925de6760f620f9f2832ad6cb4aad3acaae)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:31 +00:00
Scott Rifenbark 776c33ef21 ref-manual: Added SDKPATH to glossary.
Fixes [YOCTO #5755]

I added this variable to the glossary chapter.

Reported-by: Laszlo Papp <lpapp@kde.org>
(From yocto-docs rev: 0ad0e2ca351ebc52c92404d71502455cf7c042c9)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:31 +00:00
Scott Rifenbark ec0f9cf85a ref-manual: Updates to BB_NUMBER_THREADS and PARALLEL_MAKE.
Noted that if these variables are not set, they both default
to the number of cores the build system has.

(From yocto-docs rev: 8654aeb91f734628bffda9d5de0cdc9ea27d3f67)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:31 +00:00
Jonas Eriksson beb54ff6f7 ref-manual: Adds x11 to Distro Feature list.
Before this change, x11 was only documented as an IMAGE_FEATURE.
However, it is heavily relied upon as a DISTRO_FEATURE by
pacages that have an optional X dependency determined during
build time.  Examples include libsdl, dbus, alsa, and
pulseaudio.

(From yocto-docs rev: dd243b453b6d69bc439dda816fa5c9c83c5c3cd4)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 12:01:31 +00:00
Darren Hart 5518885e41 linux-yocto: Use PACKAGE_ARCH in build dir
The current linux-yocto build dir (B) includes MACHINE. This has been
appropriate as kernels are typically built machine-specific. We have
recently introduced an intel-common type kernel which can be shared
across multiple machines sharing a common base (intel-core2-32,
intel-corei7-64). In these cases, the kernel is built for a something
more generic than MACHINE, and the current mechanism results in
something like this when building for MACHINE=sys940x (using intel-common):

tmp/work/core2-32-intel-common-poky-linux/linux-yocto-dev/ \
3.13++gitAUTOINC+e5d23e7879_889c6bec6b-r0/linux-sys940x-noemgd-standard-build

Note the descrepancy between core2-32-intel-common and
linux-sys940x-noemgd-standard-build. This becomes counterintuitive at
the very least when switching to another machine and attempting to reuse
this build. This patch swaps MACHINE for PACKAGE_ARCH (which is
typically MACHINE_ARCH for linux-yocto), resulting in the following
build path:

tmp/work/core2-32-intel-common-poky-linux/linux-yocto-dev/ \
3.13++gitAUTOINC+e5d23e7879_889c6bec6b-r0/linux-core2-32-intel-common-standard-build

The impact to existing MACHINEs is a replace of - with _ if MACHINE
contains one or more - charachters.

(From OE-Core rev: 54590cdb940b6145ac92729ebf9bb7e7e537f5e2)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:58:31 +00:00
Bruce Ashfield ab9c3456f5 linux-yocto/3.10: add powermanagement config to 32 bit common-pc
The introduction of LTSI has exposed a missing dependency on cpufreq
being enabled. To fix the build, we enable power management in the
32 bit BSP, which aligns it with 64 bit.

(From OE-Core rev: e859ebf08e73091640bd4d7329bbbe44270c4bf0)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:57 +00:00
Bruce Ashfield 897d13a284 linux-yocto/3.10: integrate LTSI
Updating the SRCREVs of the 3.10 tree to reflect the integration of
of commit 68054859 from:

    git://git.linuxfoundation.org/ltsi-kernegit://git.linuxfoundation.org/ltsi-kernel.git

Build and boot tested on all qemu architectures.

(From OE-Core rev: 41a6b620f6e00d9222989058b3620cadc940ac21)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Koen Kooi afc4431250 package.bbclass: fix strip and split logic
Marks original commit message and variable documentation state that stripping and splitting are independent of eachother, but package.bbclass ANDs the two INHIBIT flags to see which files can be stripped and/or split.

Original behaviour:

INHIBIT_PACKAGE_STRIP: no strip, no debug split
INHIBIT_PACAKGE_DEBUG_SPLIT: no strip, no debug split

Behaviour after this patch:

INHIBIT_PACKAGE_STRIP: no strip, no debug split
INHIBIT_PACKAGE_DEBUG_SPLIT: strip, no split

(From OE-Core rev: 8ea3cc2c45d4e34bb68bd3e0bc359204c772133c)

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Paul Eggleton e9c1191da4 python-smartpm: really ignore conflicts during install with --attempt
The original patch added in OE-Core commit
bdf07b1698d228dc7ff555199a269b1ff8ceca19 was supposed to ignore
conflicts, but it was unable to do so because it wasn't raising errors
in the right place. When the --attempt option is used (as is done in
complementary package installation for RPM), raise errors immediately
on conflicts, catch errors at the right point so that requested packages
and their dependencies can be ignored, and print appropriate warnings
when doing so.

Fixes [YOCTO #5313].

(From OE-Core rev: 210a426584b77ad2331332059af85bb9f4e2081f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Paul Eggleton f9623968f0 conf/bitbake.conf: default HOMEPAGE to blank instead of unknown
The default value for HOMEPAGE of "unknown" has been in place since the
early OE-Classic days, but it doesn't really make sense - "unknown" is
not a valid URL and it just means we have to explicitly check for this
hardcoded string if we're displaying the value in some form of UI, such
as Toaster.

This has required some changes to the packaging classes as they
previously did not expect the value to be blank.

(From OE-Core rev: 244e1d73ef58e92d73c098044c66bd784644b933)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Stefan Stanacar 2882b132cc testimage: fail if no package manifest is found
Sometimes we may forget to actually build the image
we want to test (when testimage task is called manually).
Instead of an ugly traceback we should fail nicely.
The manifest is written after the rootfs so this ensures
the image was actually built.

(From OE-Core rev: 85c8dd4170a88a5d7f3d9ca181e75720302727c5)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Stefan Stanacar 6d0f1d30d4 oeqa/utils: targetbuild: take proxy into account
A previous commit broke downloads
when proxies are involved, let's fix it.

(From OE-Core rev: 97e263b99cbe8184a74f80738fd471cfdef29e0c)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Alexandre Belloni 2bdc00fe74 kernel: use oldnoconfig before yes '' | make oldconfig
When using a defconfig, using yes '' | make oldconfig may not result in
the correct configuration being set. For example:

 $ ARCH=mips make qi_lb60_defconfig
 #
 # configuration written to .config
 #
 $ grep USB_ETH .config
 CONFIG_USB_ETH=y
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

 $ cp arch/mips/configs/qi_lb60_defconfig .config
 $ yes '' | make ARCH=mips oldconfig
[...]
 $ grep USB_ETH .config
 CONFIG_USB_ETH=m
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

Using make olddefconfig solves that but we'll use the oldnoconfig alias
for backward compatibility with older kernels.

 $ cp arch/mips/configs/qi_lb60_defconfig .config
 $ make ARCH=mips oldnoconfig
 scripts/kconfig/conf --olddefconfig Kconfig
 #
 # configuration written to .config
 #
 $ grep USB_ETH .config
 CONFIG_USB_ETH=y
 # CONFIG_USB_ETH_RNDIS is not set
 # CONFIG_USB_ETH_EEM is not set

(From OE-Core rev: 9b75f6a5786ff7b2e6219d78b38f0032f100c660)

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Bruce Ashfield b6bfcaa312 kernel: stop using -exec rm for deleting files
Removing files from the source tree via find, exec and rm is not the
most efficient operation, due to (among other things) the many forked
processes.

If we use -delete, it saves a significant amount of time. But -delete
does not work with -prune (since it forces -depth). To maintain the
lib, tools and scripts source files, we can hide them temporarily,
skip their hidden directories and then finally restore them.

Time for install before this change:

 real    2m48.563s
 user    0m35.220s
 sys     0m33.036s

Time for install after this change:

 real    1m21.301s
 user    0m33.160s
 sys     0m28.388s

We could further speed this up by using inline perl to delete the files,
but that complexity is avoided for now.

(From OE-Core rev: 01932d6bbc71e86fd903097b5339e91f76846388)

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Khem Raj 6bf21ce082 systemd: Fix misc journald memory bugs
These set of patches fix journald exhibiting some issues
under load.

One of the prevelant issues is that when appending to journal
it is not able to allocate memory and starts taking 100% cpu
spewing errors like

systemd-journald[2934]: Failed to write entry (19 items, 452 bytes), ignoring: Cannot allocate memory

Other memory issues crept up with time e.g.vacuuming

(From OE-Core rev: b1bdc1c6fb6914d85f888acde9d806d5560c84d8)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:56:56 +00:00
Richard Purdie 410a3e1574 bitbake: runqueue: Fix setscene hard dependency problems
Commit c54e738e2b5dc0d8e6fd8e93b284ed96e7a83051 added in the idea of hard dependencies
such as the case a setscene has a hard dependency on pseudo-native and that
dependency wasn't available from sstate for some reason.

Unfortunately the implementation was a bit too enthusiastic, causing rebuilds
of things when it wasn't necessary. A test case was:

bitbake quilt-native
bitbake quilt-native -c clean
bitbake <some-image>

and then you'd watch quilt-native get rebuilt for no good reason.

The clue to the problem is in the for loop where it never depends on
the item being iterated over.

The fix is to include the exact list of hard dependencies rather than
guessing. With these changes, the use case above works, the one in
the original commit also works.

This patch also adds in or cleans up various pieces of logging to
allow issues like this to be more easily debugged in future.

(Bitbake rev: 81bd475585ff1b44b390036b1eca0feae7c149eb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:45 +00:00
Laurentiu Palcu b2c7cc7fe5 image.py, package_manager.py, rootfs.py: dump command output on error
Print the entire command output in case of errors.

(From OE-Core rev: 2253c9ac2caa61dee0bd4fea04d4d77b79be7b36)

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 12f47c23df lib/oe/package_manager.py: RpmPM: fix issue with multilib builds
Use python sets instead of lists, to avoid duplicates. When doing a
multilib build, "smart channel --add" fails because it tries to add
'all' channel twice.

(From OE-Core rev: 730d675090eec5c03e444f0448d96a52035d0bef)

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 847591e41a lib/oe/package_manager.py: check that package list is not empty
If we're just attempting to install packages and the package list is
empty, just return.

(From OE-Core rev: 8bf5d80e3502a71fdda688aace0799b47ae19b3b)

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 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 ab8cbf35d6 lib/oe/package_manager.py: OpkgPM, bad recommendation handling change
The following commit:

rootfs_ipk: Ensure that BAD_RECOMMENDATIONS are honoured for all
architectures

changed the way BAD_RECOMMENDATIONS are handled. Make the change in the
new code too.

(From OE-Core rev: 7e518e399da51de3b159bd6804735b2f14c39357)

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 8af55651ae lib/oe/package_manager.py: do not use stamps
Using stamps shortens rootfs/image creation because the package indexes
are not created again if no new package was installed in the deploy dir.
Unfortunately, there are some syncronization issues with
do_package_write_*() and the indexes are not properly created.

Will have to revisit this issue in the near future. For now, lose it.

(From OE-Core rev: 276f2a8a072ce243daa74210934ee63046e9c480)

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 d3a3b87ad9 lib/oe/rootfs.py: OpkgRootfs, fix issue in _get_delayed_postinsts()
Status file path was not created correctly.

(From OE-Core rev: 628c4bce36ca0bc2b316ec78cf58b02a42e7f35f)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu 365b77909d lib/oe/package_manager.py: OpkgPM/DpkgPM fixes
This commit:
 * adds missing mark_packages() function for OpkgPM. This is needed to
 * manually change the packages installation status in the status file;
 * fix OpkgPM remove_packaging_data() issue;
 * fix OpkgPM handle_bad_recommendations() issue;
 * improve OpkgPM/DpkgPM mark_packages() regex pattern;
 * fix DpkgPM list_installed() problem;
 * fix DpkgPM _create_configs() problem: status file should not be
   truncated if it already exists/

(From OE-Core rev: d50a40100763dcbfabec2c147fdfcb46aa909329)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu b76f240df0 lib/oe/image.py: fix image size calculation routine
The IMAGE_ROOTFS_EXTRA_SPACE value was not correctly added to the base
size.

(From OE-Core rev: f3ac2a68ae0ae9bdf2a03c1b6d0f83c9918d58bd)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu ce12c1bf9f lib/oe/package_manager.py: DpkgPM, use lock on deploy dir
Lock deploy directory against concurrent index creation.

(From OE-Core rev: 127d19b84e78b5e650d0e6d7eaf29a8b7d799e5e)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu a150272845 scripts/postinst-intercepts: do not redirect errors to /dev/null
The redirection was necessary with the old bash code because the log
checking routine was searching for error strings in the log and abort
the build in case failures occured. With the new python code,
redirecting the intercept stderr is no longer necessary. This also makes
the intercept hooks easier to debug.

(From OE-Core rev: e2c3c59b26d84cd4052a953adafcd4d456264c26)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu 38ffed4620 lib/oe/rootfs.py: warn the user if intercept hooks fail
The idea of postinstall intercept hooks is to run CPU intensive
postinstalls (like the ones generating font/pixbuf/icon caches) on host,
at rootfs generation time. So, ideally, the user would like to know if
the intercepts fail on host.

With this patch, the user will see warnings on console if intercept
hooks fail to execute.

(From OE-Core rev: 5666ce9720132a76b5ff6e99712e240b8dc8e47a)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Laurentiu Palcu 65a28699c8 lib/oe/package_manager.py: RpmPM fixes
This commit:
 * fixes a crash when handling interecept hook failures which happened when
   MULTILIB_GLOBAL_VARIANTS was not set;
 * convert dashes to underscores and use sets (so that we make sure the
   items are unique) when creating RPM repos;
 * uses a regex pattern to search for packages in the feeds list. The
   old method could match also strings in the middle. For example: 'rpm'
   matched 'kernel-module-lttng-probe-rpm" in qemux86_64 feeds;
 * issue a bb.fatal if smart returns error while installing packages.
   Otherwise we might end up with an incomplete image...
 * fixes the /etc/rpm/platform file creation;

(From OE-Core rev: b98c7e4945f1c36a6e4f98144a3af4f3049450ae)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Hongxu Jia 4a6596d95f lib/oe/package_manager.py: moving global SCRIPTLET_FORMAT and DB_CONFIG_CONTENT to RpmPM
The tweak made the code looks better.

(From OE-Core rev: 8e06be633222635c549d7f067218e8b833e76bda)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Hongxu Jia c8f41d7e48 package_manger.py/rootfs.py: rename save_rpmpostinist with save_rpmpostinst
The tweak made the code looks better.

(From OE-Core rev: 61981755b4738ccc49be0e790de828f4166ef0e8)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:43 +00:00
Hongxu Jia 9d3c187b1a populate_sdk_rpm.bbclass: remove old shell code
The old code no more needed since the job is done in python now.

(From OE-Core rev: 96bf2a93bb75fea23732014106039e14d72cd1c7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia ed89fd28d7 lib/oe/rootfs.py: fix invoking _run_intercepts failed
- The variable D is needed by intercepts scripts;

(From OE-Core rev: 3d37dcdb836b59d8a7f880ce22d06760eb8af232)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia 9c71ee080d lib/oe/package_manager.py: fix invoking rpm save_rpmpostinist failed
- Use self.target_rootfs instead of self.image_rootfs as saved dir;
- Remove redundant comment line;

(From OE-Core rev: 41d6edab676277afbcaa6cf41cd64a5663f09dc7)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia 4df92c634e lib/oe/rootfs.py: fix invoking rpm _handle_intercept_failure failed
(From OE-Core rev: 7858c8ac141a7bf66c65ddc7e4b39ad937a7e084)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia 62c625e3c1 Cleanup rootfs_rpm,package_rpm bbclass files
This commit cleans up the functions that were ported to python.

(From OE-Core rev: a4fe5263a683b73d0318fe3c0c55382c084f25b5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia 4d8982a1c6 image.bbclass/populate_sdk_base.bbclass: shift position of sdk complementary install definition
The sdk complementary install operation was defined in image.bbclass,
but the sdk recipe (such as meta-toolchain.bb) didn't inherit this
bbclass but populate_sdk, and both of image and populate_sdk bbclass
inherited populate_sdk_base bbclass, so move the sdk complementary
install definition to populate_sdk_base bbclass fixed this issue.

(From OE-Core rev: 907458935bab391f5bfba8f581ea9835078548d9)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia ee175b5161 lib/oe/sdk.py: support RpmRootfs
- Implementation RpmSdk class

(From OE-Core rev: 417b27ce5c1ea2fe2057caa898291cce0c043359)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia e28b78a3db license.bbclass: fix license_create_manifest failed
While rpm incremental image generation enabled, invoked
license_create_manifest failed.
...
| ln: failed to create symbolic link 'tmp/work/qemux86_
64-poky-linux/core-image-base/1.0-r0/rootfs/usr/share/
common-licenses/alsa-conf-base/generic_GPLv2':File exists
| WARNING:tmp/work/qemux86_64-poky-linux/core-image-base/
1.0-r0/temp/run.license_create_manifest.26327:1 exit 1 from
|   ln -s ../${lic}/home/jiahongxu/yocto/build-20140120-
yocto-qemux86-64/tmp/work/qemux86_64-poky-linux/core-image
-base/1.0-r0/rootfs/usr/share/common-licenses/${pkg}/${lic}
...

(From OE-Core rev: 39f8658033c886fedefc9038a673f9a5edad7d26)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia 1a1ba04df7 image.bbclass/license.bbclass: ajustment list_installed_packages invoking
Since the list_installed_packages() function has refactored in
python, do the necessary adjustments to license_create_manifes-
t() and write_image_manifest() in license.bbclass and image.bb-
class respectively;

(From OE-Core rev: 4477991633d2971c17afbd0874b1ab2efb7d6eef)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:42 +00:00
Hongxu Jia f5d35ab640 lib/oe/image.py: fix get rootfs_extra_space failed
The value of IMAGE_ROOTFS_EXTRA_SPACE is "0 + 51200",
we should use eval rather than int in python.

(From OE-Core rev: dd3418e2db732ca1bc78fd93efa3f08da88a1183)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:41 +00:00
Hongxu Jia 3bc7a4f814 rootfs.py: strip kernel-abiversion useless readline
It failed to read Kernel version from kernel-abiversion
file, the reason was it didn't strip the readline.
...
 Error: Kernel version 3.10.25-yocto-standard
  does not match kernel-abiversion (3.10.25-yocto-standard)
...

(From OE-Core rev: 17a0a8f44fe344ab1ae49730d9f17705b43987e5)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:41 +00:00
Hongxu Jia a49d9f8fc5 rootfs.py: fix uninstall uneeded pkgs failed
The refactor of shell function rootfs_uninstall_unneeded is incorrect,
it should check and update the installed_pkgs.txt file for the existance
of the packages that were removed.
...
rootfs_uninstall_unneeded () {
    if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
        if [ -z "$(delayed_postinsts)" ]; then
            # All packages were successfully configured.
            # update-rc.d, base-passwd, run-postinsts are no further
            # use, remove them now
            remove_run_postinsts=false
            if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then
                remove_run_postinsts=true
            fi

            # Remove package only if it's installed
            pkgs_to_remove="update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
            for pkg in $pkgs_to_remove; do
                # regexp for pkg, to be used in grep and sed
                pkg_regexp="^`echo $pkg | sed 's/\./\\\./'` "
                if grep -q "$pkg_regexp" ${WORKDIR}/installed_pkgs.txt; then
                rootfs_uninstall_packages $pkg
                sed -i "/$pkg_regexp/d" ${WORKDIR}/installed_pkgs.txt
                fi
            done
...

(From OE-Core rev: 9cdecb3935962653733705ad6313558bfd4fda29)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:41 +00:00
Hongxu Jia 9efc87a056 lib/oe/rootfs.py: Tweak the rootfs removing operation
Move the bb.utils.remove(self.image_rootfs, True) from the base class
constructor, to Opkg/Ipkg constructors after super's constructor is
called.

(From OE-Core rev: 66d86c4bbb9423c9fe0fc89005530be54068d401)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:41 +00:00
Hongxu Jia f02cf46522 lib/oe/rootfs.py: support RpmRootfs
- Implementation RpmRootfs class
- Refactor list_installed_packages in python

(From OE-Core rev: b3eeb0edf3f0296d30d7e62628bde722402bdb9d)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 11:53:41 +00:00