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

[PATCH] Standardize to machine readable package manifest



Hello,

 Please accept this patch to the binary_manifest helper to standardize to a machine readable package manifest file for both casper and live-initramfs builds. The rationale for this change is to make it easier for scripts to parse build manifests in a standardized fashion which in turn makes it easier to do things like build manifest comparisons.

Changes this script introduces:

 1. The binary_manifest helper will produce a manifest in the same format with the same filenames for both casper and live-initramfs.
 2. The format of the manifest file will be the output of 'dpkg-query -W' (ie. <package_name>\t<version>\n...).
 3. The manifest file will be stored at binary/casper/filesystem.manifest and binary/live/filesystem.manifest for casper and live-initramfs respectively.
 4. The manifest file will also be copied to binary.manifest.
 5. The binary/${INITFS}/packages.txt and binary.packages file ('dpkg -l' with some explanatory text) will no longer be generated.

Cheers,

--
Cody A.W. Somerville
Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1 781 850 2087
Cell: +1 613 401 5141
Fax: +1 613 687 7368
Email: cody.somerville@canonical.com
=== modified file 'helpers/binary_manifest'
--- helpers/binary_manifest	2010-03-04 12:43:09 +0000
+++ helpers/binary_manifest	2010-05-20 03:31:26 +0000
@@ -45,9 +45,6 @@
 case "${LH_INITRAMFS}" in
 	casper)
 		INITFS="casper"
-
-		# Add filesystem.manifest
-		Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' | sort -u > binary/casper/filesystem.manifest
 		;;
 
 	live-initramfs)
@@ -55,16 +52,10 @@
 		;;
 esac
 
-# Add packages.list
-cat > binary/${INITFS}/packages.txt << EOF
-This file contains the list of all packages installed in this live system.
-
-
-EOF
-
-Chroot chroot "dpkg -l" >> binary/${INITFS}/packages.txt
-
-cp binary/${INITFS}/packages.txt binary.packages
+# Add filesystem.manifest
+Chroot chroot "dpkg-query -W" > binary/"${INITFS}"/filesystem.manifest
+# Copy filesystem.manifest in image to binary.manifest as build output.
+cp binary/"${INITFS}"/filesystem.manifest binary.manifest
 
 # Creating stage file
 Create_stagefile .stage/binary_manifest


Reply to: