diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-05-07 11:20:20 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-29 13:42:22 +0100 |
commit | b1ab59a8d05d2c3187167b8e610041de923b5562 (patch) | |
tree | bf53d6ea1773e11b3259dc408a8d83ae4ca0ebd8 | |
parent | 3141bc16a53e2fee21b170994d0be5f0e9d40831 (diff) | |
download | poky-b1ab59a8d05d2c3187167b8e610041de923b5562.tar.gz |
package_manager: Fix Argument list too long
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>
-rw-r--r-- | meta/lib/oe/package_manager.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index a8360fe983..3aff9d89c6 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -6,6 +6,7 @@ import shutil | |||
6 | import multiprocessing | 6 | import multiprocessing |
7 | import re | 7 | import re |
8 | import bb | 8 | import bb |
9 | import tempfile | ||
9 | 10 | ||
10 | 11 | ||
11 | # this can be used by all PM backends to create the index files in parallel | 12 | # this can be used by all PM backends to create the index files in parallel |
@@ -411,16 +412,22 @@ class DpkgPkgsList(PkgsList): | |||
411 | output = tmp_output | 412 | output = tmp_output |
412 | elif format == "deps": | 413 | elif format == "deps": |
413 | opkg_query_cmd = bb.utils.which(os.getenv('PATH'), "opkg-query-helper.py") | 414 | opkg_query_cmd = bb.utils.which(os.getenv('PATH'), "opkg-query-helper.py") |
415 | file_out = tempfile.NamedTemporaryFile() | ||
416 | file_out.write(output) | ||
417 | file_out.flush() | ||
414 | 418 | ||
415 | try: | 419 | try: |
416 | output = subprocess.check_output("echo -e '%s' | %s" % | 420 | output = subprocess.check_output("cat %s | %s" % |
417 | (output, opkg_query_cmd), | 421 | (file_out.name, opkg_query_cmd), |
418 | stderr=subprocess.STDOUT, | 422 | stderr=subprocess.STDOUT, |
419 | shell=True) | 423 | shell=True) |
420 | except subprocess.CalledProcessError as e: | 424 | except subprocess.CalledProcessError as e: |
425 | file_out.close() | ||
421 | bb.fatal("Cannot compute packages dependencies. Command '%s' " | 426 | bb.fatal("Cannot compute packages dependencies. Command '%s' " |
422 | "returned %d:\n%s" % (e.cmd, e.returncode, e.output)) | 427 | "returned %d:\n%s" % (e.cmd, e.returncode, e.output)) |
423 | 428 | ||
429 | file_out.close() | ||
430 | |||
424 | return output | 431 | return output |
425 | 432 | ||
426 | 433 | ||