aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-smartpm
AgeCommit message (Collapse)Author
2016-09-14python-smartpm: use md5 as the digest for rpm_sys channelMarkus Lehtonen
Use md5 sum instead of mtime as the "digest" method for rpm_sys channel. The digest is used to determine if the channel has been updated. It was found out that mtime was not a reliable digest. On some systems mtime of the rpm db does not get updated after every transaction if transactions (smart install / remove commands) are fired in quick succession. As a consequence smartpm cache and rpm db get out of sync. [YOCTO #10244] (From OE-Core rev: e7267b4e78461e71a1175f93e2eb5e90272c2b47) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10python-smartpm_git.bb: Add patch for debugging random errorsMariano Lopez
This will add a patch to debug random errors seen in the autobuilders, it won't solve the errors, but will give us a better idea of what is happening. [YOCTO #8383] (From OE-Core rev: c52a7e910a3a52a7455a2409d9ade449bbbd66d4) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26python-smartpm: add support to check signaturesmingli.yu@windriver.com
RPMv5 has removed support for _RPMVSF_NOSIGNATURES, the flag can be replaced with a flags set: "RPMVSF_NODSAHEADER|RPMVSF_NORSAHEADER|RPMVSF_NODSA RPMVSF_NORSA" (From OE-Core rev: 5c0c1b8a64643ad7130b17b5dfce9cecffa6d962) Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-22python-smartpm: Avoid locale issue with bitbake python3Richard Purdie
(From OE-Core rev: fa2ca7660e8f3279736624aa2493b4ca952ae466) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19python-smartpm: Remove unnecessary error reporting improvement patchKlauer, Daniel
The error reporting improvements were merged upstream (smartpm 406541f569) and refactored later (smartpm 20af0aac33), yet a part of the patch was kept here (oe-core 5fc580fc44). Due to the upstream refactoring the patch still applies cleanly, but it isn't actually needed. The added changes are duplicate or dead code. (From OE-Core rev: f1cfa9ab5d79198671275cea2c9864ce0cbcb9f0) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19python-smartpm: Don't ignore error if RPM transaction fails without problemsKlauer, Daniel
SmartPM could misinterpret RPM transaction error as success, if ts.run() (RPM Python API) returns an empty problems list. This could happen for example if the RPM database is partially corrupted such that the transaction does not have any problems like conflicts or missing dependencies, but still can't be committed. The added patch fixes the problem in the upstream sources; one of the existing patches has to be adjusted to still apply. (From OE-Core rev: 1dc5f5d5c844585eec114be9480e0e4d8e60d09c) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19python-smartpm: Fix channel command --remove-all option (again)Klauer, Daniel
SmartPM's --remove-all option was unusable, because the fix from commit 03266e89a6 was lost in commit 5fc580fc44. Thus, add a new patch to fix --remove-all. It seems like the previous fix was lost by mistake: Upstream merged the *old* version of the patch (smartpm 406541f569), and when SmartPM in oe-core was upgraded to the new upstream release, the --remove-all fix from the *new* patch was not carried over. (From OE-Core rev: ba2adda60dd34b6a8feba413e3207dd8e4580294) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20smartpm: remove rpm4 patchJoshua Lock
The RPM4 support we added to SMART doesn't appear to work, remove it as part of the removal of RPM4 from OE-Core. Refresh the smart-add-for-rpm-ignoresize-check.patch which was applied after smart-rpm4-fixes.patch and doesn't apply cleanly once that patch is removed. (From OE-Core rev: e1108fa41742e726aa578d0298fa6397b2663ff3) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01smart:cache.py: getPackages() matches name + archRobert Yang
It only matched name ony in the past, for example: smart install busybox (matched) but: smart install busybox@core2_64 (didn't match) The installation is very slow when no match since it would seach all the packages in the repo, and what we use mostly in oe-core is the second case, so the installation is very slow when install COMPLEMENTARY packages such as the task do_populate_sdk. This patch makes it match both. * Speed up MACHINE = "qemux86-64" - When multilib enabled: $ bitbake core-image-sato -cpopulate_sdk time: 6m5s -> 2m34s (Reduce 57% ) $ bitbake core-image-minimal -cpopulate_sdk time: 2m1s -> 1m26s (Reduce 28% ) $ bitbake core-image-sato-sdk time: 10m15s -> 7m12s (Reduce 29% ) - When multilib NOT enabled: $ bitbake core-image-sato -cpopulate_sdk time: 4m25s -> 2m28s (Reduce 44% ) [YOCTO #8389] (From OE-Core rev: dae4149009be722943cc7deec7f03e87b77ea59b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01smartpm: set noprogress for pycurlKai Kang
Set NOPROGRESS for pycurl just as same as default operation in pycurl module itself. If set NOPROGRESS with 0 for pycurl, it causes dead lock issue of Python GIL when call smart library by python gui just like pygtk. (From OE-Core rev: 0d1f99fe1446edfb8864cbbc5a8b0059391c9bbc) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20python-smartpm: Improve warnings/errors consistencyRichard Purdie
Sadly, smart is not deterministic so the same build can go down multiple different pathways. We'd expect to see the same warnings however depending on the pathway taken, it may or may not warn, particularly with Recommends since they're optional. For example, where a Recommended package is available but has Conflicts, we'd expect to see an warning that we couldn't install it. Some code paths silently hide this (its a LOCKED_CONFLICT). We add printing of warnings for this case. Also, if there are two compatible feeds available (e.g. i586 and core2_32), this changes the code path from direct _install() to _pending() since there are multiple providers. This patch adds warning handling to _pending() so we don't hit hard failures there. This is as seen with the mysterious libspeexdsp failures for x86-lsb on the autobuilder. (From OE-Core rev: ab1eb2432b9a9823335450fd12476e910a95a2aa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09python-smartpm: 1.4.1 -> 1.5Robert Yang
* Remove the following patches since the are already in the source: smart-config-ignore-all-recommends.patch smart-conflict-provider.patch smart-dflags.patch smart-filename-NAME_MAX.patch smart-flag-exclude-packages.patch smart-flag-ignore-recommends.patch smart-metadata-match.patch smart-multilib-fixes.patch smart-rpm-extra-macros.patch smart-rpm-md-parse.patch smart-rpm-root.patch smart-tmpdir.patch smart-yaml-error.patch * Update the following patches, part of the code are already in the source: smart-attempt.patch smart-improve-error-reporting.patch smart-recommends.patch smartpm-rpm5-nodig.patch * Use github and git repo as the SRC_URI. (From OE-Core rev: 5fc580fc444e45d00de0e50d32b6e6e0b2e6b7ea) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11python-smartpm: change "already installed" warnings into info messagesPaul Eggleton
It's possible to trigger "already installed" messages during normal usage if you explicitly install something in the image through IMAGE_INSTALL that has a dependency on some -dev packages and also have dev-pkgs in IMAGE_FEATURES. Since we now check the do_rootfs log for warnings, these are reported as warnings at the build system level. This situation should not trigger warnings, nor is it really cause for concern under any other circumstance if the user asks smart to install something that's already installed, so make it an info message rather than a warning. Fixes [YOCTO #7840]. (From OE-Core rev: ac782fe535855ed87f87c2c9e1e584bf0181378a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29python-smartpm: Fix attemptonly builds when file conflicts occurMark Hatle
[YOCTO #7299] When file conflicts occur, the RPM transaction aborts. Instead of simply accepting the failure, we now identify, capture, and remove the offending package(s) from the transaction and retry. (From OE-Core rev: cd475aea5f5bc4b6a2dd3e576070a117ae079597) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04python-smartpm: report warn rather than error during install with --attemptHongxu Jia
With the following config and build image: ... IMAGE_INSTALL_append = "shadow man-pages" EXTRA_IMAGE_FEATURES += "doc-pkgs" ... There is an error during install with --attempt, and it breaks the build. ... |error: file /usr/share/man/man5/passwd.5 from install of shadow-doc-4.2.1-r0.i586 conflicts with file from package man-pages-3.71-r0.i586 ... For complementary and 'attemptonly' package processing, we should make sure the warn rather than error messages reported. [YOCTO #6769] (From OE-Core rev: beb2e989e24e671fecd37805876dfb2375ee0df6) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24python-smartpm: Add checking for "rpm-ignoresize" optionChong Lu
The do_rootfs takes a very long time when build host has mounted many NFS devices. syscall lstat() was being called on every filesystem mounted on the build host during building. The reason for the lstat() is that rpm is verifying that enough free disk space is available to do the install. However, since the install is into the target rootfs it should not matter how much free space there is in the host mounts. Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip checking for diskspace when install a rpm package. (From OE-Core rev: fc0668a019eca422540ceab3efcd2b2a27dd79e0) Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30python-smartpm: Add patches for rpm4Saul Wold
Add DEPENDS for python-rpm package from either rpm4 or rpm5 Extend the smart-dflags patch to catch an exception if the api does exist (From OE-Core rev: 756e499a95cc928688684cc52bde8e31306e6bbc) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02python-smartpm: fix option typo of command channelKai Kang
When run smart, it fails: root@qemu1:~# smart channel --remove-all error: No action specified for command 'channel' If no default value of arg 'dest' is provided in method add_option() of optparse.OptionParser, it replaces hyphen('-') in new added option with underscore('_') as dest. In function ensure_action() it checks action strings with options from optparse.OptionParser. So it is 'remove_all' which need to be checked rather than 'remove-all'. (From OE-Core rev: 03266e89a67ec1373529fae32b2cedff21414ff5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11python-smartpm: really ignore conflicts during install with --attemptPaul Eggleton
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>
2013-09-17python-smartpm: truncate the filename to meet NAME_MAXRobert Yang
There is a "File name too long" error when len(TMPDIR) = 410, this is because the function getLocalPath() converts the filepath into the filename, so there would be the error when len(filename) > NAME_MAX, truncate the filename to meet NAME_MAX will fix the problem. [YOCTO #5201] (From OE-Core rev: 9f0427edee6bf62d3fe7cdceb07f59a5776c8c4f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-11python-smartpm: Add an attempt install modeMark Hatle
[ YOCTO #3723 ] Add a mode to smart that will allow an installation to continue, instead of failure in the case that one or more items is uninstallable. Uninstallable packages are simply ignored, and no error is generated. (From OE-Core rev: bdf07b1698d228dc7ff555199a269b1ff8ceca19) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22python-smartpm: Add support to disable installing recommendsMark Hatle
In order to attempt to reduce image sizes by skipping recommended packages, a new mode was added to smart that only evaluates required packaged. (From OE-Core rev: 6fd8141bbdcd84c591149d84ad84effc2357de72) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22python-smartpm: Add support for excluding package from the installMark Hatle
Update smart to support a mechanism for excluding specific packages from the install process. An error will be generated if this package is required. (From OE-Core rev: 87660d636c2ebe76cd9dff2a334f135def9a0cf3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29python-smartpm: add ignore-recommends package flagPaul Eggleton
Adds support for a flag that is saved into Smart's configuration against a package that says it should not be installed if it is only recommended by a package being installed rather than required. This will enable us to add BAD_RECOMMENDATIONS support for RPM. (From OE-Core rev: 70517fca31261c1ca4b15bb38f8960b2f95993ba) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29python-smartpm: fix sometimes reporting no provider instead of conflictPaul Eggleton
If a requirement of a package is conflicted, depending on how the solution is reached, Smart's transaction code may eliminate all providers of the requirement and then error out because nothing provides them without saying why. To work around this, store a reason and report that back if we need to, so for example instead of: error: Can't install packagegroup-core-ssh-dropbear-1.0-r1@all: no package provides dropbear we will now get: error: Can't install packagegroup-core-ssh-dropbear-1.0-r1@all: unable to install provider for dropbear: error: dropbear-2013.58-r1.0@armv5te is conflicted by openssh-sshd-6.2p2-r0@armv5te Fixes [YOCTO #4305]. (From OE-Core rev: 1ed09b87fc8780d4a99f6516493fae2e0c92862c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08smart: disable CHANNELSDIRBogdan Marinescu
Make CHANNELSDIR in smart empty, since this causes host contamination issues on some RPM-based hosts on which smart is already installed. [YOCTO #3881] (From OE-Core rev: 94e76a98b6cdafe9547630be159401ac1d8c5edd) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11python-smartpm: show friendly error if YAML output requested without PyYAMLPaul Eggleton
Instead of a python backtrace, tell the user they need to install PyYAML if they wish to use the --yaml output options. Fixes [YOCTO #3768]. (From OE-Core rev: 69caf24112c11609eb351bea09817029bca0ff2e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01python-smartpm: multilib fixesBogdan Marinescu
To fix some multilib issues, change the way the RPM backend decides if two packages can coexist: if they have a different architecture, automatically assume that they can coexist (which is fundamental for multilib). [YOCTO #3681] (From OE-Core rev: 05fd850f09c58dba8f64f3fe1de28ed9f21890a2) (From OE-Core rev: 03c892a02568fa8a5765d9fb569a55f17ea05f96) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19python-smartpm: improve error reportingBogdan Marinescu
Add code to check proper command line arguments for various smart commands. Exit with error if erroneous/additional arguments are given in the command line. (From OE-Core rev: c29d9f8d61d45318d07ed6ccab7a3ec6d1c27037) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: Fix incorrect comparison argumentsMark Hatle
Built-in provides were not being compared properly within smart. This was caused by an incorrect argument to the match function. (From OE-Core rev: 81f8972323a0a89e67f5cc4be247bc8e1b637cc4) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: allow setting arbitrary macros in smart configPaul Eggleton
Add support for an rpm-extra-macros config option which can be used to define some extra macros that need to be set for rootfs construction to work on the host and that don't really warrant their own specific named config options to be created. (From OE-Core rev: 0564f7bbe8e06868e107b70d5abbf3dd6c113bad) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: support nolinktos and noparentdirs rpm optionsPaul Eggleton
Allowing us to turn on these options enables installation of base-files which contains a symlink to /proc/mounts which is auto-detected as a dependency and isn't provided by any other package. (From OE-Core rev: 1f0ad78b8fa739f9a68ed4c7bfae2b6d8586fda2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: don't create /var/tmp on every rpm database openPaul Eggleton
This directory if present in the rootfs interferes with proper installation of base-files and doesn't seem to need to be there for smart/rpm to work in any case. (From OE-Core rev: 54d227e97ff3498fc2149f96f1ca40452ad21a32) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: fix package metadata not being read from rpm-md feedsPaul Eggleton
The XML indexes in rpm-md were being parsed incorrectly leading to the package metadata (e.g. dependencies) not being read. (From OE-Core rev: bb3abe241ae9d7e62e084cde383ebe1c6b95d825) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06python-smartpm: add support for recommendsPaul Eggleton
Implement support within Smart for handling RRECOMMENDS relationships between RPM packages as used by OE. This includes support within the base system for caching and resolving these relationships as well as specific support in the RPM backend for reading the information from packages, and reading the "missingok" flag added to createrepo for rpm-md feeds. (From OE-Core rev: 35e3bc90ec3bae824804bd176b3128efdb5b4e2b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18python-smartpm: Add basic knowledge of RPMSENSE_MISSINGOKMark Hatle
Currently smart does not support recommend dependencies. Add the first set of 'support' for RPMSENSE_MISSINGOK (the flag that makes something a recommend). This initial support ends up ignoring the recommendation, but is written in a way that it will be the basis of eventual support. (From OE-Core rev: 4f1f6d39803c94cf9ff55f0a4616e7a1703bcef6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18python-smartpm: Add smartpm recipeMark Hatle
This is the initial integration, basic functionality such as 'smart query' has been tested. Active use of remote feeds and such has not yet been verified. Thanks to Paul Eggleton for corrections and bug fixes for the initial integration. (From OE-Core rev: 92182ca88aff9cec04b2af5e9babaf33bf61f0af) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>