From bf201ba6405b7f38be665c07ddd526764baf1c02 Mon Sep 17 00:00:00 2001 From: Steve VanDeBogart Date: Tue, 19 Jan 2010 17:14:05 -0800 Subject: [PATCH] Fix the creation of .list files for dpkg with maintainer scripts Remove explicit use of sh to run custom maintainer postinst scripts. Review URL: http://codereview.chromium.org/542135 --- dpkg_no_scripts.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dpkg_no_scripts.sh b/dpkg_no_scripts.sh index e4a57e5697..505417041e 100755 --- a/dpkg_no_scripts.sh +++ b/dpkg_no_scripts.sh @@ -98,7 +98,7 @@ do_configure() { local chromium_postinst="${SRC_ROOT}/package_scripts/${p}.postinst" if [ -f "$chromium_postinst" ]; then echo "Running: $chromium_postinst" - ROOT="$FLAGS_root" SRC_ROOT="$SRC_ROOT" sh -x $chromium_postinst + ROOT="$FLAGS_root" SRC_ROOT="$SRC_ROOT" $chromium_postinst fi done @@ -136,7 +136,8 @@ do_unpack() { for f in $files; do cp "${tmpdir}/${f}" "${dpkg_info}/${package}.${f}" done - touch "${dpkg_info}/${package}.list" # TODO: Proper .list files. + dpkg -c "$p" | sed 's,.* \.\/,/,; s/ -> .*//; s,^/$,/.,; s,/$,,' > \ + "${dpkg_info}/${package}.list" # Mark the package as installed successfully. echo "Status: install ok installed" >> "$dpkg_status"