SHA256
1
0
forked from pool/quilt
quilt/inspect-lzma-xz.patch

53 lines
1.3 KiB
Diff

From: Jean Delvare <jdelvare@suse.de>
References: bnc#555273
Add support for lzma and xz compressed files to the inspect script.
Based on preliminary work by Philipp Thomas.
---
quilt/scripts/inspect.in | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
Index: quilt/scripts/inspect.in
===================================================================
--- quilt-0.48/quilt/scripts/inspect.in.orig 2009-01-31 03:28:06.000000000 +0100
+++ quilt-0.48/quilt/scripts/inspect.in 2011-11-10 12:22:14.622721864 +0100
@@ -87,7 +87,17 @@ do
echo "md5sum < $file" >&2
set -- $(md5sum < "$file")
echo "$1 $basename"
- case "$(file -b "$file")" in
+
+ case "$file" in
+ *.lzma)
+ filetype="lzma"
+ ;;
+ *)
+ filetype="$(file -b "$file")"
+ ;;
+ esac
+
+ case "$filetype" in
compress*|gzip*)
echo -n "g" >&4
echo "gzip -cd $file | md5sum" >&2
@@ -100,6 +110,18 @@ do
set -- $(bzip2 -cd "$file" | md5sum)
echo "$1 $basename"
;;
+ lzma*)
+ echo -n "l" >&4
+ echo "lzma -cd $file | md5sum" >&2
+ set -- $(lzma -cd "$file" | md5sum)
+ echo "$1 $basename"
+ ;;
+ xz*|XZ*)
+ echo -n "x" >&4
+ echo "xz -cd $file | md5sum" >&2
+ set -- $(xz -cd "$file" | md5sum)
+ echo "$1 $basename"
+ ;;
esac
done > $tmpdir/md5sums
echo >&4