[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Change format of packages.txt/binary.packages to be machine readable


 For most binary image types, live helper produces a packages.txt (in the image) and binary.packages (outside of the image) that is just the output of "dpkg -l" ran within the target. Unfortunately, the output from "dpkg -l" isn't the easiest to machine parse which is why I've created a patch to have the output of "dpkg-query -W" which format, by default, is "${Package}\t${Version}\n".


Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
From 093da0d9343bb3e3e0eef366dba140f4f43b0aba Mon Sep 17 00:00:00 2001
From: Cody A.W. Somerville <cody.somerville@canonical.com>
Date: Tue, 21 Apr 2009 13:30:38 -0300
Subject: [PATCH] Change format of packages.txt/binary.packages to be machine readable using dpkg-query -W instead of dpkg -l.

 helpers/lh_binary_manifest |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/helpers/lh_binary_manifest b/helpers/lh_binary_manifest
index 981699a..4170319 100755
--- a/helpers/lh_binary_manifest
+++ b/helpers/lh_binary_manifest
@@ -62,7 +62,7 @@ This file contains the list of all packages installed in this live system.
-Chroot chroot "dpkg -l" >> binary/${INITFS}/packages.txt
+Chroot chroot "dpkg-query -W" >> binary/${INITFS}/packages.txt
 cp binary/${INITFS}/packages.txt binary.packages

Reply to: