summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
Commit message (Collapse)AuthorAgeFilesLines
* lib/oe/package_manager: support exclusion from complementary glob process by ↵Paul Eggleton2015-03-031-0/+3
| | | | | | | | | | | | | | | | | | regex Sometimes you do not want certain packages to be installed when installing complementary packages, e.g. when using dev-pkgs in IMAGE_FEATURES you may not want to install all packages from a particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY variable to allow specifying regexes to match packages to exclude. (From OE-Core master rev: d4fe8f639d87d5ff35e50d07d41d0c1e9f12c4e3) (From OE-Core rev: 5e92eb11cdf1dd06a3e2ca015f1aebaace321acd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: change the logic in _uninstall_unneededChen Qi2014-06-171-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if we have 'package-management' and 'read-only-rootfs' both in IMAGE_FEATRUES, we would meet the following error at system start-up. rm: can't remove '/etc/rcS.d/S99run-postinsts': Read-only file system However, what's really expected is that when there's no postinstall script at system start-up, the /etc/rcS.d/S99run-postinsts should not even be there. Whether or not to remove the init script symlinks to run-postinsts should not depend on whether we have 'package-management' in IMAGE_FEATURES; rather, it should only depend on whether we have any postinstall script left to run at system start-up. This patch changes the _uninstall_unneeded function based on the logic stated above. [YOCTO #6257] (From OE-Core rev: d51b1ced88958d31a1596e37db871257fe013446) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classextend: Fix crosssdk remapping for multilibRichard Purdie2014-06-101-0/+2
| | | | | | | | | | | | Multilib builds only require one crosssdk toolchain. We therefore shouldn't be remapping crosssdk names. This resolves build failures looking for weird multilib crosssdk toolchains. (From OE-Core rev: aa8b93e2db06866529d20939452f81fb9e18aaab) (From OE-Core rev: d5a9290649fb493b6ac8b585d82ee9f02d138147) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Fix NoneType Object on do_populate_sdkRicardo Ribalda Delgado2014-05-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | PACKAGE_EXCLUDE can be not defined or empty, leading to a build error. File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 1649, function: _create_configs 1645: "Pin-Priority: %d\n\n" % (arch, priority)) 1646: 1647: priority += 5 1648: *** 1649: for pkg in self.d.getVar('PACKAGE_EXCLUDE', True).split(): 1650: prefs_file.write( 1651: "Package: %s\n" 1652: "Pin: release *\n" 1653: "Pin-Priority: -1\n\n" % pkg) Exception: AttributeError: 'NoneType' object has no attribute 'split' ERROR: Function failed: do_populate_sdk ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/bobcat_64-poky-linux/meta-toolchain/1.0-r7/temp/log.do_populate_sdk.21363 NOTE: recipe meta-toolchain-1.0-r7: task do_populate_sdk: Failed (From OE-Core rev: 26314886c3712f980ccc589b014a8f1802193b56) (From OE-Core rev: f1f97c61281158432a98279a2f7b4931173f406e) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Fix Argument list too longRicardo Ribalda Delgado2014-05-291-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Function buildhistory_list_installed_image fails with error "Argument list too long". This patch uses a temporal file to pass the package list to opkg-query-helper.py File: '/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/meta/lib/oe/package_manager.py', lineno: 421, function: list 0417: try: 0418: output = subprocess.check_output("echo -e '%s' | %s" % 0419: (output, opkg_query_cmd), 0420: stderr=subprocess.STDOUT, *** 0421: shell=True) 0422: except subprocess.CalledProcessError as e: 0423: bb.fatal("Cannot compute packages dependencies. Command '%s' " 0424: "returned %d:\n%s" % (e.cmd, e.returncode, e.output)) 0425: Exception: OSError: [Errno 7] Argument list too long ERROR: Function failed: buildhistory_list_installed_image ERROR: Logfile of failure stored in: /var/lib/jenkins/jobs/qt5022-cesium/workspace/build/tmp/work/qt5022-poky-linux/qimage-dev/1.0-r0/temp/log.do_rootfs.16747 NOTE: recipe qimage-dev-1.0-r0: task do_rootfs: Failed ERROR: Task 7 (/var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 4999 tasks of which 30 didn't need to be rerun and 1 failed. NOTE: Writing buildhistory Auto packing the repository for optimum performance. Summary: 1 task failed: /var/lib/jenkins/jobs/qt5022-cesium/workspace/repo/yocto/../qtec/meta-qt5022/recipes-core/images/qimage-dev.bb, do_rootfs Summary: There were 74 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. (From OE-Core rev: 36cba6e00d76462e4ae314dd2af0b47472835538) (From OE-Core rev: 9e984913318ea8c7199300ed2336902aaf2cd8a5) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make menuconfig work for recent xfce environmentAndreas Müller2014-05-291-11/+1
| | | | | | | | | | | | | | xfce terminal was renamed 'Terminal' -> 'xfce4-teminal' mainline end of 2012, so the distros supporting 'Terminal' will dissapear. The distros not mentionied in __init__ do (e.g fedora 19 - tested) fail - or will fail sooner or later. (From OE-Core rev: d07f3812ec371da6f18fa1dd920cdde470bd89ad) (From OE-Core rev: 9f29399dcb9eea02efbda14cc3d5bcf2e91323f6) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sdk: Ensure target directory exists before creating the linkRichard Purdie2014-05-221-0/+1
| | | | | | (From OE-Core rev: 03a11d3cecc977b23bdf7b8510bf80dbe408b135) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: introduce USE_DEVFS checkMatthieu Crapet2014-04-041-1/+2
| | | | | | | | | | | | Since commit a83144bac8d67704ff66f5dc0fc56f5b63979694 (2014-02-11), USE_DEVFS is not considered anymore. For compatibility, let's restore USE_DEVFS semantic. Also add USE_DEVFS to documentation.conf. (From OE-Core rev: d12a5e38a02abe3feb3db8ae5ffd9a5005124294) Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatesig: Anchor inherits class testsRichard Purdie2014-03-301-3/+3
| | | | | | | | | | | | There was a nasty sstate hash corruption issue occurring where the fact the testimage bbclass was inherited meant that the checksum changed due to testimage.bbclass being confused with image.bbclass. This patch anchors the bbclass names to avoid this confusion. (From OE-Core rev: 943a75a4f3b6877e4092dae14b59b7afef8cad3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.py: check file exists before deletingLaurentiu Palcu2014-03-301-1/+2
| | | | | | | | | | | | When RM_OLD_IMAGE = "1", we delete old images but we didn't check they actually exist... [YOCTO #6029] (From OE-Core rev: 8910d3cc94899ab4d509e681b438ae96218fa777) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: add new cleanup methodLaurentiu Palcu2014-03-301-0/+25
| | | | | | | | | | | | | | This commit adds a new _cleanup() internal method that will be called at the end of rootfs creation, so that each backend can delete various files that were probably generated during rootfs postprocess execution, etc. [YOCTO #6049] (From OE-Core rev: 6151d69875f3f4f097b6e2fdef2a0f3ab391e2fd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: leave the __db.00* files in placeLaurentiu Palcu2014-03-301-7/+1
| | | | | | | | | | | | | | | | | | | | Do not delete the __db.00* files in the PackageManager class. Leave this operation up to the client classes. One side effect of this deletion was the following message appearing in the output of the next rpm command executed: rpmdb: BDB1540 configured environment flags incompatible with existing environment We might also gain some time here by not deleting/creating those files very often. [YOCTO #6049] (From OE-Core rev: 12e300f0af2a27c15d80298d3fbb27b092c35154) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* apt/package_mamager: Ensure WORKDIR is used for lists directoryRichard Purdie2014-03-271-0/+2
| | | | | | | | | | | | The native sysroot should not be used as a store for the lists files since multiple images running at once would conflict over this. Instead redirect this to WORKDIR. This means some extra directories need to be created. Also create apt.conf.d to silence some warnings. (From OE-Core rev: dc4abfc8f99c08e0c1ac9d098ce17838d0eda028) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Fix apt-ftparchive index creation problemsRichard Purdie2014-03-271-7/+6
| | | | | | | | | | a) There were missing parameters to the release and package commands (".") b) The commands need to be executed as one block since they build upon each other (From OE-Core rev: a3965b76ed4361455c89c982761263be03e1a8e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Ensure we don't process directories twiceRichard Purdie2014-03-271-1/+3
| | | | | | | | | | Processing directories twice is both pointless and introduces a race condition. When building the list, ensure duplicates (like "all" and "noarch") are handled correctly. (From OE-Core rev: 4c487543422ae471a01a573bab44e3f6a6d2497a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py, sdk.py: adjust/create the wrappers for creating installed ↵Laurentiu Palcu2014-03-212-15/+22
| | | | | | | | | | | | | | | | packages list Since we created a new PkgsList object that will deal with listing the installed packages in a rootfs, use the new class both for images and SDKs in the wrapper functions. The old list_installed_packages() wrapper listed only the packages inside an image rootfs. It didn't deal with target/host SDK rootfs's. (From OE-Core rev: 8fc18e67504db5b6df3fdd239c6187a71af52656) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: create separate class for installed packages listingLaurentiu Palcu2014-03-211-165/+211
| | | | | | | | | | | | | | | | | This commit creates a new class that has the only purpose to generate various listings of installed packages in the rootfs. Basically, the methods involved in listing the installed packages, that were part of each backend PM class implementation, were moved to this new class. This change avoids instantiating a new PM object just to get the list of installed packages in a certain rootfs. (From OE-Core rev: a7290ed13378826723d1edc7e828eab848eaad10) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Use apt-ftparchive for deb packagesRicardo Ribalda Delgado2014-03-191-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use apt-ftparchive to create a Release file compatible with SecureApt. apt-ftparchive is also a more efficient replacement of dpkg-scanpackages: root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat _64# time PSEUDO_UNLOAD=1 apt-ftparchive packages . >/tmp/kkk real 0m26.873s user 0m20.968s sys 0m1.212s root@neopili:~/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/bobcat _64# time PSEUDO_UNLOAD=1 dpkg-scanpackages . >/tmp/kkk dpkg-scanpackages: info: Wrote 6022 entries to output Packages file. real 0m59.721s user 0m16.668s sys 0m11.164s apt-ftparchive is not compatible with libpseudo. The calls to ftw() returns the path in absolute format instead of relative. This produces wrong Packages and Release files. ie: MD5Sum: d20227a958f6870137ce0e41b7b84307 1453 /home/ricardo/curro/qtec/qt5022/build-qt5022-cesium/build/tmp/deploy/deb/all/Release This is why it is called with PSEUDO_UNLOAD. (From OE-Core rev: c9899a7605f15f7f1ae30c4624d53c7da825b00a) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe: turn oe into a namespace packageChristopher Larson2014-03-171-0/+2
| | | | | | | | | | | This will let folks extend the oe package with modules from other layers. Given openembedded consists of more than just oe-core, I think this makes sense, and adds some useful flexibility. (From OE-Core rev: 8dfd28925fc47d8a4a1f10ec65df665c8326edc4) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* do_rootfs: Added PACKAGE_FEED_URIS functionalityDavid Nyström2014-03-072-13/+92
| | | | | | | | | | | | | | | | | | | | | Adding a common interface to add predefined package manager channels to prebuilt rootfs:es. Adding PACKAGE_FEED_URIS = "http://myre.po/repo/, will assume repo directories named (rpm,ipk,deb) as subdirectories and statically add them to the rootfs, using the same PKG_ARCHs as the build which produced the images. Tested with RPM, IPK and DEB. deb feed functionality seem broken, is anyone using this ? (From OE-Core rev: 9b8811045546ad67b4695d980f09636d5506e50c) 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>
* package.py: use subprocess.Popen for rpmdeps callMartin Jansa2014-03-071-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * I've noticed errors like this in log.do_package: DEBUG: Executing python function package_do_filedeps sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected DEBUG: Python function package_do_filedeps finished which are actually caused by some filenames included in package containing '()' characters Maybe we should change meta/classes/package.bbclass to fail when some filedeprunner call fails like this and fix filedeprunner to escape '()' and other possibly dangerous chars it's called like this: processed = list(pool.imap(oe.package.filedeprunner, pkglist)) * don't use shell=True * show the command when it fails and let do_package task to fail (From OE-Core rev: 148c04c1bf39ca0d21288fdce61c51dc8e1c3226) 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>
* package_manager.py: make list_installed() list pkg dependencies tooLaurentiu Palcu2014-03-071-0/+31
| | | | | | | | | | list_installed("deps") will now return the package dependencies. (From OE-Core rev: b16cd9eaa8190dc678af9d98a9bc4fb690809c5f) 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>
* lib/oe: drop custom implementation of oe.path.relativeRoss Burton2014-03-071-17/+1
| | | | | | | | | | | | | | As we now require Python 2.7 and os.path.relpath() was added in 2.6 we can now drop the reimplementation in oe.path. oe.path.relative is simple now a wrapper that changes the order of the arguments and it's use discouraged. (From OE-Core rev: 1a03cd16401d2926bba902ffc5df30911b5c9394) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.py, rootfs.py, package_manager.py: redirect stderr to stdout when ↵Laurentiu Palcu2014-03-073-25/+27
| | | | | | | | | | | | | | | | | | | calling check_output() If a command executed with subprocess.check_output() fails, the subprocess.CalledProcessError.output contains only STDOUT and the user needs to check the log.do_rootfs to see any other details. This commit forwards stderr to stdout so that, in case of failure, the entire error output will be displayed in terminal. [YOCTO #5902] (From OE-Core rev: 4661f1441429952f30e19cebd93dc42ce31fd868) 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>
* Rename PACKAGE_GROUP variable to FEATURE_PACKAGESPaul Eggleton2014-03-071-9/+16
| | | | | | | | | | | | | Since tasks were renamed to packagegroups some time ago, this variable name implies that its usage is necessarily related to them which is not the case. Rename the variable to more closely represent what it does (whilst still providing backwards-compatibility with a warning for PACKAGE_GROUP). (From OE-Core rev: d703e07ea5056624101e1bc48f10d25b602635e9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: RpmPM: don't add smart channel if already addedLaurentiu Palcu2014-03-051-2/+4
| | | | | | | | | | | Make sure the channel was not already added, before attempting to add. [YOCTO #5890] (From OE-Core rev: 0574f5390fb8958db5864f41a7bd8037ac046ac5) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds"Laurentiu Palcu2014-03-051-6/+7
| | | | | | | | | | | | | | | Converting a list to a set does not keep the order of the items, as they were added, which might result in the wrong packages being installed in the final image... This reverts commit 12f47c23df8c109676f66d580d666a3147f3b046. [YOCTO #5890] (From OE-Core rev: 495cce9c9e63484c740aa669facb995b0ef74f85) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: create index files for all backends in PACKAGE_CLASSESLaurentiu Palcu2014-02-251-9/+15
| | | | | | | | | | | | | | 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] (From OE-Core rev: 0521d48a1612bfc735e2c86acc9b685c1dc389ef) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: correctly handle empty opkg-query-helper.py outputJonathan Liu2014-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: ee7b75c895e77ab20f728423c8efc2ced92265e8) 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>
* lib/oe/rootfs: Fix LDCONFIGDEPEND checkRichard Purdie2014-02-251-1/+1
| | | | | | | | | We shouldn't be running this if it expands to None or "" or False so update the code accordingly. (From OE-Core rev: 255079780729f0dd9df6f35302169e0c8480eced) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manifest.py: remove redundant import lineHongxu Jia2014-02-211-1/+0
| | | | | | | | | The import oe.package_manager line is redundant, let's remove it. (From OE-Core rev: ade1f3ce34489bba5a7ab23793c1d82559150583) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: tweak _multilib_sanity_test for ipk incremental image generationHongxu Jia2014-02-211-2/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 8d813f614cdfda31c85bbaf133f2822f90a4a78a) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: support BAD_RECOMMENDATIONS for ipk incremental image generationHongxu Jia2014-02-211-1/+28
| | | | | | | | | | | | | | 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] (From OE-Core rev: 0566de3fa424af3bdfadcd0a08ce4c214abda083) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: support ipk incremental image generationHongxu Jia2014-02-211-3/+47
| | | | | | | | | | | | The incremental image generation is based on the previous existing image, adds new packages, upgrades existing packages, and removes unused packages. [YOCTO #1894] (From OE-Core rev: adf587e55c0f9bc74f0bef415273c937401baebb) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: support ipk incremental image generationHongxu Jia2014-02-211-6/+75
| | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 5df18065e267a7e55a990ac3728414bb6e28a723) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* manifest.py: add create_full for OpkgManifest classHongxu Jia2014-02-211-1/+56
| | | | | | | | | | | | 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] (From OE-Core rev: 494adecd878496c2edc663ba09a456a9735d8252) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Fix $i -> %s in bb.noteMartin Jansa2014-02-201-1/+1
| | | | | | | | | | | * change the text a bit, because I have trouble parsing two verbs at the beginning of sentence. (From OE-Core rev: 9837d194682f46e3a0363765bd6b317180a4cda0) 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>
* package_manager.py: fix installed package list creation for Opkg/DpkgLaurentiu Palcu2014-02-201-2/+4
| | | | | | | | | | | Small error in the package list creation routine. Buildhistory was supposed to use this but was never called. Hence, it escaped tests... (From OE-Core rev: eaa1994ad22730cec8e8c57736915da6b45a416e) 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>
* lib/oe/image.py: add image dependency mechanismLaurentiu Palcu2014-02-201-91/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: db9dd4b4ef9120baccbccae77d9c31f54a6eb9a1) 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>
* rootfs.py: Check for LDCONFIGDEPEND being empty stringKhem Raj2014-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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']) (From OE-Core rev: 315a71e00928fea6715087b1ce66f8a8a91d5fe0) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "lib/oe/image.py: fix working directory"Richard Purdie2014-02-181-1/+1
| | | | | | | | | | | 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). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/image.py: fix working directoryJonathan Liu2014-02-171-1/+1
| | | | | | | | | | The working directory needs to be changed before the image creation commands instead of afterwards. (From OE-Core rev: 9d9bca8785911e8ae06d507bbfb99d6a811f072e) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager: Make empty package directories non-fatalRichard Purdie2014-02-161-3/+6
| | | | | | | | | | 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. (From OE-Core rev: 11e2aaf2d751277e3e99ac2acbbeff2b7227be94) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: move multilib prefix list computation function to RpmIndexerLaurentiu Palcu2014-02-141-52/+53
| | | | | | | | | | | | | | | 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. (From OE-Core rev: d3ba249aa1bf68aaeed226e934a4f4d5b7a19286) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: sum.jffs2 is replaced by jffs2.sumDmitry Eremin-Solenikov2014-02-141-3/+0
| | | | | | | | | | Previous commit added support for sum 'compression' (rather postprocessing) of jffs2 images. Drop support for sum.jffs2 image type. (From OE-Core rev: 295c6c1452c8789a8b1d0090ff09a5cd7cf16507) Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py, rootfs.py, sdk.py: add Indexer classLaurentiu Palcu2014-02-143-224/+221
| | | | | | | | | | | | | | | | | | | 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; (From OE-Core rev: d339d6f48f81330e94162f333aad76f3c65d6bfd) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/rootfs.py: fix RPM multilib issueLaurentiu Palcu2014-02-131-4/+11
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 1fa94697163f16cdbb1499b57f1bc018546974ee) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (image|rootfs_ipk).bbclass, rootfs.py: ipk multilib fixesLaurentiu Palcu2014-02-131-1/+3
| | | | | | | | | | | 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>
* image.py, package_manager.py, rootfs.py: dump command output on errorLaurentiu Palcu2014-02-113-43/+44
| | | | | | | | | 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>
* lib/oe/package_manager.py: RpmPM: fix issue with multilib buildsLaurentiu Palcu2014-02-111-7/+6
| | | | | | | | | | | 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>