summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPaul Barker <paul@paulbarker.me.uk>2014-10-26 19:36:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:31 +0000
commitec853e4eea537fb296746560973424038810c457 (patch)
tree354992260a3956499e436012f5b69dfa0aef4f87 /meta/lib
parent07fdc5a275c5087f610e03b22d18137bdd645933 (diff)
downloadpoky-ec853e4eea537fb296746560973424038810c457.tar.gz
package_manager: Fix BAD_RECOMMENDATIONS for opkg
In package_manager.py, when using opkg as the packager, the command 'opkg <args> info <pkg>' is called to get information about each pkg in BAD_RECOMMENDATIONS in a format that can be written to the status file. The 'Status: ...' line is modified and all other lines are passed through. Changing the verbosity level argument for this command will change what it written into the status file. Crucially, with the default verbosity level, no blank lines are being printed by the opkg command and so no blank lines are being written to the status file to separate each package entry. The package parsing code in opkg expects package entries in the status file to be separated by at least one blank line. If no blank line is seen, the next package entry is interpreted as a continuation of the last package entry, but the new values overwrite the old values. So with the default verbosity level, a blank line follows some package entries and these are parsed. The others are dropped due to the lack of blank lines. As the verbosity increases, more debugging messages add blank lines and more packages are parsed. The solution to ensure that this works correctly regardless of the verbosity level is simply add a blank line after the output of 'opkg info' is written to the status file, ensuring that the next package is separated from the current package. [YOCTO #6816] (From OE-Core rev: 3fa24eee41c26fecd5e4f680082288ec772d2de9) (From OE-Core rev: ae776a39376629bfada9bd5fabc949e9277774ba) Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Chris Carr <chris.carr@ge.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package_manager.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e36d6abee3..05a1a357de 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1410,6 +1410,10 @@ class OpkgPM(PackageManager):
1410 else: 1410 else:
1411 status.write(line + "\n") 1411 status.write(line + "\n")
1412 1412
1413 # Append a blank line after each package entry to ensure that it
1414 # is separated from the following entry
1415 status.write("\n")
1416
1413 ''' 1417 '''
1414 The following function dummy installs pkgs and returns the log of output. 1418 The following function dummy installs pkgs and returns the log of output.
1415 ''' 1419 '''