diff options
authorPaul Barker <>2014-10-26 19:36:22 (GMT)
committerRichard Purdie <>2016-01-19 21:32:01 (GMT)
commit3d7df7b5b5c4d9293709a12396adbc38b9bf58db (patch)
parent0b1be9dc67d059ec0754d86715e76d47e4ba0300 (diff)
package_manager: Fix BAD_RECOMMENDATIONS for opkg
In, 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: d0326ff5abde814da8647debfd559fcb9aede3a4) Signed-off-by: Paul Barker <> Cc: Chris Carr <> Signed-off-by: Ross Burton <> Signed-off-by: Richard Purdie <>
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/ b/meta/lib/oe/
index 1c33b0f..8e871a5 100644
--- a/meta/lib/oe/
+++ b/meta/lib/oe/
@@ -1381,6 +1381,10 @@ class OpkgPM(PackageManager):
1381 else: 1381 else:
1382 status.write(line + "\n") 1382 status.write(line + "\n")
1383 1383
1384 # Append a blank line after each package entry to ensure that it
1385 # is separated from the following entry
1386 status.write("\n")
1384 ''' 1388 '''
1385 The following function dummy installs pkgs and returns the log of output. 1389 The following function dummy installs pkgs and returns the log of output.
1386 ''' 1390 '''