summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/rootfs.py
AgeCommit message (Collapse)Author
2019-02-08OpkgPM: use --add-ignore-recommends to process BAD_RECOMMENDATIONSAlejandro del Castillo
Currently, BAD_RECOMMENDATIONS on the opkg backed relies on editing the opkg status file (it sets BAD_RECOMMENDATIONS pkg want state to deinstalled and pinned). This is brittle, and not consistent across the different solver backends. Use new --add-ignore-recommends flag instead. Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-06lib/oe/rootfs: prelink only when image-prelink is inheritedAndrej Valek
Use prelink only when image-prelink class is inherited. Inheriting this class adds prelink-native as dependency to do_rootfs, which makes prelink binary and configuration available. |Exception: FileNotFoundError: [Errno 2] No such file or directory: |'/home/.../1.0-r0/recipe-sysroot-native/etc/prelink.conf' | | if not os.path.exists(prelink_cfg): | shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'),prelink_cfg) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14meta: Fix Deprecated warnings from regexsRichard Purdie
Fix handling of escape characters in regexs and hence fix python Deprecation warnings which will be problematic in python 3.8. Note that some show up as: """ meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence \.   """ where the problem isn't on 1293 in package.bbclass but in some _prepend to a package.bbclass function in a different file like mesa.inc, often from do_package_split() calls. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15oe: Fix opkg status list parse - Missing postinstRaul Martins
While parsing opkg package status, last package status was not properly handled, resulting in final image without postinst and pkg depends Signed-off-by: Raul Martins <raul.martins@alta-rt.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18rootfs: possibility to add packages to debug rootfsAndrej Valek
Static libraries are not included in rootfs, it means, that sources are not going into debug rootfs. This option enables to install additional packages even if the standard package is not installed. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25rootfs.py: Install -src packages when PACKAGE_DEBUG_SPLIT_STYLE is ↵Joshua Watt
"debug-with-srcpkg" When the source packages are created, they need to be included in the debug image created when IMAGE_GEN_DEBUGFS = "1" for it to be usable for debugging. [YOCTO #12930] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25rootfs: always update the opkg indexIoan-Adrian Ratiu
The previous logic assumed that if $BUILD_IMAGES_FROM_FEEDS=1 then a complete set of ipk feeds from which to build the image is already present under $IPK_FEED_URIS at do_rootfs runtime. $IPK_FEED_URIS usually contains "file://${DEPLOY_DIR_IPK}" which renders the above assumption bad because some recipes in the current build can contain code like do_install[nostamp] = "1" which will cause rebuilds bumping $PR and invalidating the index. Even when the index is manually re-created before an image build ("bitbake package-index"), the nostamp will cause failures because the dependency gets rebuilt before do_rootfs in the "bitbake <image>" call. So make the opkg rootfs index logic the same as for rpm/deb, to always update the index in $DEPLOY_DIR_IPK to fix the above nostamp failure. Feeds outside $DEPLOY_DIR_IPK added to $IPK_FEED_URIS continue to work as usual, for eg. by using a http:// URI. Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15package_manager/sdk: Use filtered copies of the deploy ipk/deb directoriesRichard Purdie
Similar to rpm, use copies of the ipk/deb directories for rootfs construction. This means the image creation code can no longer "see" recipes wich aren't in its dependency chain which is good for a variety of reasons including determinism, incompatible recipe (e.g. systemd/sysvinit) package conflicts and locking performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18rootfs.py: for dpkg/opkg, don't install postinsts if package management is ↵Stefan Agner
present If package management is present opkg/dpkg will bring the original copy of the postinsts scripts with the metadata and will be able to handle postinsts just fine. In fact, it is preferred to let package management handle the postinsts scripts in this case since it will keep the package managers database up-to-date too. The run-postinsts scripts will make sure the package manager gets invoked instead of the scripts directly. Note: Before commit 5aae19959a44 ("rootfs.py: Change logic to unistall packages") rootfs.py did not install /etc/$pm-postinsts too. It is not clear whether that change was intentionally or just a bug. This commit fixes/reverts that aspect of the commit. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-22rootfs: only use dnf to cleanup if package management is enabledRoss Burton
If package management has been disabled then we've already removed all the state, and running 'dnf clean all' again will simply recreate a lot of the files. (From OE-Core rev: 4524068ad2248b37fb08a24828d018e2f7e6a761) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: move intercept running logic from rootfs class to ↵Alexander Kanavin
PackageManager class This allows running the intercepts when creating SDKs, which previously wasn't possible, as SDK code does not use the rootfs class, and calls into PackageManager methods directly. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-05package_manager.py: move postinst_intercept dir initialization from RootFS ↵Alexander Kanavin
to PackageManager class This will allow handling postinst_intercepts when populating SDKs (which use PackageManager class directly, and do not utilize RootFS class). Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29rootfs.py: change the notice about deferring scripts to first boot from ↵Alexander Kanavin
warning to a note Now that the first boot deferral needs to be requested explicitly, it's not really something to be concerned about. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing ↵Alexander Kanavin
postinst_intercept hooks That hook is empty, and doesn't need to be executed; it merely indicates that packages that have used it are requesting to defer their postinst scripts to first boot unconditionally. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-29meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate ↵Alexander Kanavin
function Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-06rootfs.py: remove update-alternatives correctlyMikko Ylinen
With "read-only-rootfs" in IMAGE_FEATURES, packages in ROOTFS_RO_UNNEEDED are removed when building the rootfs. The list of packages to remove is passed to the package manager and the list is sorted so that update-alternatives provider is the last entry. This is with the assumption that the last entry on the list/command line is removed last. However, it turns out rpm does not care about "last on the command line" and update-alternatives provider is removed before other the packages get to run their %preun scripts for update-alternatives. This leaves broken alternative symlinks in rootfs. The fix is to first remove all but update-alternatives provider and after that update-alternatives provider in its own remove() call. Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-22meta/lib/oe/rootfs.py: clean up dnf cache after creating an imageAlexander Kanavin
It contains cached metadata for a transient repository that is used only when creating images on the host, and so is of no use on target images. Dnf will recreate the cache on target when needed. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11rootfs: improve postinst intercept loggingRoss Burton
Ensure we capture stderr, always write the output to the log, and don't be so emotional in the warning message. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-23rootfs.py: Respect OPKGLIBDIR variableMartin Jansa
* when OPKGLIBDIR doesn't have the default /var/lib value it will silently fail to copy package database from normal rootfs to debugfs rootfs and then when trying to install *-dbg complimentary packages it won't install anything, because installed_pkgs.txt file generated from debugfs is empty Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13rootfs_rpm.bbclass: migrate image creation to dnfAlexander Kanavin
To properly look at this patch, you probably need a side-by-side diff viewing tool. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13package_manager.py: improve the API for insert_feed_uris()Alexander Kanavin
No need to store the configuration as class members, just pass it directly into the method. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-02-28kernel, license, sstate, rootfs.py: Remove deploy directory READMEMike Crowe
It isn't clear that the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file in the deploy directory warrants the complexity it brings elsewhere. Let's just remove it entirely. In particular, if two do_image_complete tasks run in parallel they risk both trying to put their image into ${DEPLOY_DIR_IMAGE} at the same time. Both will contain a README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt file. In theory this should be safe because "cp -alf" will just cause one to overwrite the other. Unfortunately, coreutils cp also has a race[1] which means that if one copy creates the file at just the wrong point the other will fail with: cp: cannot create hard link ‘..../tmp-glibc/deploy/images/pantera/README_-_DO_NOT_DELETE_FILES_IN_THIS_D.txt’ to +‘..../tmp-glibc/work/rage_against-oe-linux-gnueabi/my-own-image/1.0-r0/deploy-my-own-image-complete/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt’: File exists [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25680 Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23classes/oeqa: Replace subprocess.check_call() with check_output()Richard Purdie
If you use subprocess.check_output() the traceback will contain the output when the command fails which is very useful for debugging. There is no good reason not to use this everywhere. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16lib/oe/rootfs: reliably handle alternative symlinksAndré Draszik
When removing unneeded packages from a (read-only) rootfs during rootfs creation, alternative symlinks from those packages may or may not be removed. The reason is as follows: update-alternatives(-native) is used during package installation as part of the image creation. It uses a database which contains entries for all the alternative symlinks possible, and the -native version uses the target's database by means of $OPKG_OFFLINE_ROOT, i.e. the rootfs we're in the process of creating. Once the rootfs has been created, OE removes certain packages because we have a read-only rootfs - in particular ROOTFS_RO_UNNEEDED which includes VIRTUAL-RUNTIME_update-alternatives, i.e. the update-alternatives. Recently, a change was made in OE, where uninstallation of update-alternatives from the rootfs causes removal of its database, too, to save space (700KiB (uncompressed) in a busybox system) b24a63d71b517af701dfedbc7f7b541d25af708f http://git.openembedded.org/openembedded-core/commit/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb?id=b24a63d71b517af701dfedbc7f7b541d25af708f Following from that, if update-alternatives is removed from the target file system, update-alternatives-native has no database anymore, meaning it can't manage any of the alternative symlinks anymore. Because the order of packages to uninstall is non-deterministic, and update-alternatives could well be removed before any packages that use the mechanism provided, sometimes the extra symlinks are removed, sometimes not. By sorting the list of packages to be removed such that update-alternatives is removed last, we can ensure that that tings work reliably. (Certainly opkg seems to uninstall packages in the order given on the command line.) [YOCTO #10916] Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-16rootfs: don't put /usr/lib/ssl and /etc into debugfsRoss Burton
The /etc and /usr/lib/ssl directories were only put into the opkg-generated debugfs because of a bug in opkg which means that a conffile has to exist if we're running 'opkg status'. This is now fixed, so the workaround can be reverted. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14classes/image: suppress log_check mechanism for warnings/errors logged ↵Paul Eggleton
through BitBake If you printed a warning through bb.warn() / bbwarn or an error through bb.error() / bberror, this was also being picked up by our log_check mechanism that was designed to pick up warnings and errors printed by other programs used during do_rootfs. This meant you saw not only the warning or error itself, you saw it a second time through log_check, which is a bit ugly. Use the just-added BB_TASK_LOGGER to access the logger and add a handler that we can use to find out if any warning or error we find in the logs is one we should ignore as it has already been printed. Fixes [YOCTO #8223]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-14lib/oe/rootfs: fix log_check warnings being printed twice with RPM packagingPaul Eggleton
We were calling _log_check() in the RPM-specific rootfs class as well as in the base class; this is unnecessary and resulted in any errors/warnings generated during the actual package installation time triggering two warnings instead of one. Drop the call from RpmRootfs._create() to fix this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-04image: Deploy images to IMGDEPLOYDIREd Bartosh
Changed deployment directory from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR to make sstate machinery to do final deployment and generate manifest. Renamed variable deploy_dir to deploy_dir_image in selftest code to avoid confusion with DEPLOYDIR variable. Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable as it's now used as a new deployment destination. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-25rootfs.py: allow removal of unneeded packagesStephano Cetola
Current functionality allows for the removal of certain packages based on the read-only image feature. This patch extends this functionality by adding the FORCE_RO_REMOVE variable, which will remove these packages regardless of any image features. [ YOCTO #9491 ] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-07classes/image: implement progress support for do_rootfsPaul Eggleton
Use the new task progress functionality to report progress during do_rootfs. This is a little coarse and ideally we would have some progress within the installation section, but it's better than nothing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20lib/oe/rootfs: Fix DEBUGFS generation, without opensslAnders Darander
In commit 20ea6d274bb0a9a5addb111f32793de49b907865, debugfs generation for images using opkg, which included openssl was fixed. However, that broke the generation of the opkg-based images, that lacks openssl. The error is a python stack trace, showing that shutil.copytree tries to copy a non-existing directory. This relates to [YOCTO #9040]. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Unify _log_check_warn() and _log_check_error()Peter Kjellerstedt
Use a common _log_check_common() function (based on the old _log_check_warn() function) to implement the logic for both _log_check_warn() and _log_check_error(). The main benefit of this is that now all error messages will be reported again, not just the first one found. Additionally the output will now look the same for both error and warning messages. This removes the context for the error messages. However, since there was no indication in the output that some of the lines were context, they were more confusing than helping. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Reduce spam from _log_check_warn()Peter Kjellerstedt
For each warning found in the log, _log_check_warn() would output a line stating that it had found a warning, then the actual warning and finally an empty line. This is quite excessive when there are many warnings in the log. With this change the output is instead a line stating how many warnings were found, followed by the warnings. This makes the output much more compact and actually much more readable. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Exclude lines in _log_check_warn() as wellPeter Kjellerstedt
This will make _log_check_warn() exclude the same lines as _log_check_error() does. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Use one way to exclude lines in _log_check_error()Peter Kjellerstedt
Before there were three different ways to exclude a line from being searched for error messages in _log_check_error(). Now there is only one: an array of regular expressions. This should make it easy to add more excludes if nedded. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Simplify the regular expression used in _log_check_warn()Peter Kjellerstedt
In commit 0387d095 lines with "NOTE:" in them were excluded from the log check for warnings. However, those lines were only there in the first place since the regular expression that is used to find warning messages explicitly included those lines... Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19rootfs.py: Remove _log_check_error() from the RpmRootfs classPeter Kjellerstedt
The fact that this function was overridden in the RpmRootfs class seems to have led to a number of misstakes when changes have been made to the base function in the Rootfs class. E.g., this change will properly solve ticket 7789, which was supposedly solved in 38871dc0, but that change had no effect in practice as the log_check_regex that was modified for RpmRootfs class was not used by the RpmRootfs version of _log_check_error()... The only thing _log_check_error() in RpmRootfs did that the base function in Rootfs did not do was to skip lines in the log that begin with a + sign. This has now been moved to the base function instead. [YOCTO #7789] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19Revert "rootfs.py: add more info to the warning message"Peter Kjellerstedt
The reverted commit added a warning with the log line that triggered the log check for error messages before the warning that states that an error has been found in the log. However, the error line is output by the call to bb.fatal() that follows immediately after the original warning, which makes it redundant. Additionaly, having two warnings contradicts the intent of commit 8dfdd329 where the log warnings were tidied up. This reverts commit f9cf31525fc885e1a0f65bd55654631257f87078. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09lib/oe/rootfs: Fix DEBUGFS generation for opkg & openssl-cnfAnders Darander
When enabling extra DEBUGFS image generation with opkg, the following error is seen when openssl-cnf is included in the image. Collected errors: * file_md5sum_alloc: Failed to open file /mnt/cs-builds/anders/oe-build/build-ccu/tmp/work/ccu-oe-linux-gnueabi/ccu-image/1.0-r0/rootfs/usr/lib/ssl/openssl.cnf: No such file or directory. Lots of similar issues was fixed by an earlier commit in oe-core, 5084ed9401250ed269a49d27b303806ab173c5d5, but openssl-cnf is outside of that fix. Followup to [YOCTO #9490] Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-29lib/oe/rootfs: Fix DEBUGFS generation when using opkgRichard Purdie
When enabling extra DEBUGFS image generation with opkg, errors are seen like: ERROR: core-image-minimal-1.0-r0 do_rootfs: Cannot get the installed packages list. Command '/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/bin/opkg -f /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/opkg.conf -o /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version status' returned 0 and stderr: Collected errors: * file_md5sum_alloc: Failed to open file /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/syslog-startup.conf.busybox: No such file or directory. * file_md5sum_alloc: Failed to open file /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/fstab: No such file or directory. basically for all CONFFILES in the image. This is due to the file rearranging the rootfs generation code does. If we preserve the /etc directory, the avoids the problem. We need to tell copyfile to preserve symlinks since some are present in /etc. [YOCTO #9490] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14rootfs.py: apply ROOTFS_POSTINSTALL_COMMAND to all package formatsBill Randle
Previously, ROOTFS_POSTINSTALL_COMMAND was run only after the opkg rootfs install post processing phase. This patch makes it generic so it is run fter any package manager specific rootfs post processing, but before _run_intercepts(). [YOCTO #9248] Signed-off-by: Bill Randle <william.c.randle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-31image.bbclass: Make unneeded packages for a read-only rootfs configurablePeter Kjellerstedt
Previously the list of packages that are considered unneeded for a read-only rootfs was hardcoded. This made it impossible to, e.g., have shadow installed on a system with a read-only rootfs, but where /etc is mounted writable. This also lists ${VIRTUAL-RUNTIME_update-alternatives} rather than update-alternatives (as was previously the case) since this should actually remove the intended package. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31lib/oe/package_manager: remove package feed listsStefan Agner
Remove opkg package feed lists after generating the rootfs. The lists have been generated by the local feed but are no longer necessary after image generation. This still leaves the package management fully usable (and hence is different from omitting package-management from IMAGE_FEATURES). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20lib/oe/rootfs: Use list_pkgs() instead of list()Mariano Lopez
This patch changes the use list_pkgs() instead of list() from class RpmPkgsList. The change is in two functions, image_list_installed_packages from rootfs.py and sdk_list_installed_packages from sdk.py. With this change the functions calling the functions listed above, must format the output as they required. The formatting can be done using format_pkg_list() from oe.utils. The classes calling the afected functions are changed too with this patch, to keep the same functionality using the new data structure. [YOCTO #7427] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-11DpkgRootfs: Fix logcheck_error false-positive when use multilibAníbal Limón
Rootfs with dpkg was failing due to false-positive in logcheck_error because current logic of DpkgPM handles missing dependencies failure using apt-get -f install [1][2]. This support was broken due to addition of logcheck and don't take into account dpkgpm cases, in order to fix add an attr for specify expected errors regex'es by package manager. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/lib/oe/rootfs.py#n659 [2] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/lib/oe/package_manager.py#n2038 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-12rootfs.py: Change logic to unistall packagesMariano Lopez
In the current state some of the base utils (update-rc.d, base-passwd, shadow, and update-alternatives) are unistalled when there is no package manager in the image. Checking for previous commits, the unistall of these utils were to be done in a read-only filesystem. It is a valid option to have these utils without a package manager, and also make sense to remove them when building a read-only filesystem. This changes the check logic from having a package mananger to if is a read-only filesystem to remove the utils. Another change implemented with this patch is that delayed post installs now doesn't depend if there is a package manager. Also it is a valid option to have post install scripts without package manger. [YOCTO #8235] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24rootfs.py: Stop using installed_pkgs.txtMariano Lopez
The method _uninstall_unneeded uses the file installed_pkgs.txt, this file is left after the build and can cause confusion. This changes allow to get the installed packages using functions of rootfs instead of the installed_pkgs.txt file. With this change now is possible to remove the file without breaking anything. [YOCTO #8444] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>