Age | Commit message (Collapse) | Author | Files |
|
This should make it clear what methods a subclass
needs to redefine.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
After recent changes in poky this test was not working as it should.
This commit fixes and improves the test logic.
Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
For the SimpleRemote target where we need the host ip and
it wasn't set in conf, we tried to determine it automatically.
However ip route output isn't the same for every network, we
need the last field from the first line.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The previous implementation was checking IMAGE_PKGTYPE and created the
index files just for the backend used to create the image. Apparently,
'bitbake package-index' should attempt to create the index files for all
backends specified in PACKAGE_CLASSES.
[YOCTO #5827]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If the output from opkg-query-helper.py is empty, output.split('\n')
would result in a list containing one element which is an empty string
while iterating over each line in the output. An exception is then
thrown by the line:
pkg, pkg_file, pkg_arch = line.split()
with the message:
Exception: ValueError: need more than 0 values to unpack
To avoid this, we add a condition to only split the output if it isn't
empty.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
We shouldn't be running this if it expands to None or "" or False
so update the code accordingly.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The import oe.package_manager line is redundant, let's remove it.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
The _multilib_sanity_test installs multilib packages in a temporary
root fs, and compare with the current image to figure out duplicated
files that come from different packages.
While incremental image generation enabled and the previous image
was existed, there was an Multilib check error:
...
ERROR: Multilib check error: duplicate files tmp/work/qemux86_64-poky-
linux/core-image-minimal/1.0-r0/multilib/lib32/lib/libc.so.6 tmp/work/
qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc.so.6
is not the same
...
The reason is the file in the existing image has been prelinked by
previous image generation and the file in a temporary root fs is not
prelinked, even though both of them came from the same package, the
Multilib check failed.
[YOCTO #1894]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
While incremental image generation enabled and the previous image is
existed, if BAD_RECOMMENDATIONS is changed, the operation on the
existing image is complicated, so remove the old image in this situation.
The same with PACKAGE_EXCLUDE and NO_RECOMMENDATIONS.
[YOCTO #1894]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
The incremental image generation is based on the previous existing
image, adds new packages, upgrades existing packages, and removes unused
packages.
[YOCTO #1894]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
Add the following three functions to OpkgPM class:
- The 'dummy_install' is used to dummy install pkgs, and returns the log
of output;
- The 'backup_packaging_data' is used to back up the current opkg
database;
- The 'recover_packaging_data' is used to recover the opkg database
which backed up by the previous image creation;
Tweak 'remove' function in OpkgPM class, which the options for remove
with dependencies was incorrect.
Tweak 'handle_bad_recommendations' function in OpkgPM class:
- Fix none value check;
- Add the existance check of opkg status file;
[YOCTO #1894]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
The function create_full creates the manifest after the package in
initial manifest has been dummy installed. It lists all *to be
installed* packages. There is no real installation, just a test.
[YOCTO #1894]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
* change the text a bit, because I have trouble parsing two
verbs at the beginning of sentence.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Small error in the package list creation routine. Buildhistory was
supposed to use this but was never called. Hence, it escaped tests...
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
This commit adds a dependency mechanism to image creation, so that we can
split the images creation execution in groups, that can be executed in
parallel, having the dependencies satisfied in the same time. The old
code didn't need this since everything was serialized.
Technically, it adds a dependency graph topological sort class that the
main Image class can use to sort out the dependencies.
Images that have dependencies have to declare them using the NEW
IMAGE_TYPEDEP variable, like in the example below:
For:
IMAGE_FSTYPES = "i1 i2 i3 i4 i5"
IMAGE_TYPEDEP_i4 = "i2"
IMAGE_TYPEDEP_i5 = "i6 i4"
IMAGE_TYPEDEP_i6 = "i7"
IMAGE_TYPEDEP_i7 = "i2"
We'll get the following image groups, sorted out by their dependencies:
[['i1', 'i3', 'i2'], ['i4', 'i7'], ['i6'], ['i5']]
The algorithm can probably be optimized but, given the small size of the
graphs, it'll do.
[YOCTO #5830]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
We override LDCONFIGDEPEND to be empty string for uclibc
however the current check is for it being None as a result
the function is still executed but ldconfig-native is not
built as dependency for rootfs when building with uclibc
Fixes errors like below
File:
'/home/kraj/work/angstrom-repo/sources/openembedded-core/meta/lib/oe/rootfs.py',
lineno: 191, function: _run_ldconfig
0187: def _run_ldconfig(self):
0188: if self.d.getVar('LDCONFIGDEPEND', True) is not None:
0189: bb.note("Executing: ldconfig -r" +
self.image_rootfs + "-c new -v")
0190: self._exec_shell_cmd(['ldconfig', '-r',
self.image_rootfs, '-c',
*** 0191: 'new', '-v'])
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
This reverts commit 3f49597225a58965124503ca5f3cc4011b04b3c0.
This change appears to cause more problems than it fixes since the
compression commands usually work in the deploy dir but the archive ones
have always worked in the rootfs dir (which is clear from the tar command
we use).
|
|
The working directory needs to be changed before the image creation
commands instead of afterwards.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Its perfectly reasonable to call -c package-index with empty package
directories. This ensures the builds don't fail in such cases,
resolving autobuilder failures.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Since the code from anonymous function in rootfs_rpm.bbclass has been
removed, MULTILIB_PREFIX_LIST variable was never set. Hence not all
directories got indexed.
This commit will move the multilib prefix list computation function from
RpmPM class to RpmIndexer, since the indexer needs it too. I was hoping
to avoid this but, unfortunately, I couldn't.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Previous commit added support for sum 'compression' (rather
postprocessing) of jffs2 images. Drop support for sum.jffs2 image type.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Because the package-index.bb needs to create package indexes outside
do_rootfs environment, move the indexing capability out of
PackageManager class to a smaller Indexer class.
This commit:
* simply moves the indexing functions for ipk/deb with no changes;
* rewrites the RPM indexing function so that it can be easily moved out
of the PackageManager class;
* removes some RPM duplicate code, moves it into a method inside
RpmPM class and changes the RpmPM constructor so that the new method
is effective;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
For some odd reason (at least I couldn't find an explanation to this,
yet), if a multilib version of a package is installed after the main one
(that is: in a different smart session), the main package binaries are
not overwritten.
This commit restores the functionality to the original one, before
migrating to python: feed all the packages to smart, apart from attempt
only ones which are installed separately.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
TEST_SUITES = "auto" would run smart tests even for non-rpm images,
which is pointless.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
A previous commit broke downloads
when proxies are involved, let's fix it.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Print the entire command output in case of errors.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
If we're just attempting to install packages and the package list is
empty, just return.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Status file path was not created correctly.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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/
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
The IMAGE_ROOTFS_EXTRA_SPACE value was not correctly added to the base
size.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Lock deploy directory against concurrent index creation.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
DB_CONFIG_CONTENT to RpmPM
The tweak made the code looks better.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
The tweak made the code looks better.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- The variable D is needed by intercepts scripts;
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Use self.target_rootfs instead of self.image_rootfs as saved dir;
- Remove redundant comment line;
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Implementation RpmSdk class
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
The value of IMAGE_ROOTFS_EXTRA_SPACE is "0 + 51200",
we should use eval rather than int in python.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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)
...
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
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
...
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Move the bb.utils.remove(self.image_rootfs, True) from the base class
constructor, to Opkg/Ipkg constructors after super's constructor is
called.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Implementation RpmRootfs class
- Refactor list_installed_packages in python
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Implementation RpmPM class
- Support rpm incremental image generation
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|