sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (d1fc58124ff5edcb14295cd59b968833a5a1349f)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (d1fc58124ff5edcb14295cd59b968833a5a1349f)
- Date: Sat, 10 Jun 2023 16:48:25 +0000
GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:
var/lib/sorcery/modules/libmisc | 1 +
var/lib/sorcery/modules/libsorcery | 14 +++++++++++++-
var/lib/sorcery/modules/libtrack | 2 +-
var/lib/sorcery/modules/libunpack | 3 ++-
4 files changed, 17 insertions(+), 3 deletions(-)
New commits:
commit d1fc58124ff5edcb14295cd59b968833a5a1349f
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
Add lzip support
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index cbc09cd..c4ba9c6 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1736,6 +1736,7 @@ show_file() {
fi ;;
x-bzip2) bzcat "$file" | $PAGER ;;
x-gzip) gzip -cd "$file" | $PAGER ;;
+ x-lzip) lzip -cd "$file" | $PAGER ;;
x-xz|x-lzma) xz -cd "$file" | $PAGER ;;
x-7z-compressed) 7z -d "$file" | $PAGER ;;
# This is needed as long as there is stable grimoire with
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index fc5ef96..6e7e88d 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1144,6 +1144,7 @@ set_compression_type() {
local B_HELP="bzip2 compression (slow, small files)"
local P_HELP="parallel bzip2 compression (slow unless on SMP, small files)"
local X_HELP="xz compression (slow compress, fast decompress, smallest
files)"
+ local L_HELP="lzip compresison (slow compress, fast decompress, smallest
files)"
local G_HELP="gzip compression (fast, larger files)"
local T_HELP="no compression/tar (fastest, largest files)"
@@ -1159,6 +1160,7 @@ set_compression_type() {
"B" "bzip2 compression" "$B_HELP" \
"P" "pbzip2 compression (parallel bzip2)"
"$P_HELP" \
"X" "xz compression" "$X_HELP" \
+ "L" "lzip compression" "$L_HELP" \
"G" "gzip compression" "$G_HELP" \
"T" "no compression/tar" "$T_HELP"')
@@ -1191,6 +1193,16 @@ set_compression_type() {
modify_local_config "COMPRESSBIN" "xz" &&
COMPRESSBIN="xz" &&
modify_local_config "EXTENSION" ".xz" ;;
+ L)
+ if ! spell_ok lzip; then
+ clear_line
+ message "lzip is not installed on this system! Running cast
...\n"
+ sleep 2
+ cast lzip
+ fi &&
+ modify_local_config "COMPRESSBIN" "lzip" &&
+ COMPRESSBIN="lzip" &&
+ modify_local_config "EXTENSION" ".lz" ;;
G)
modify_local_config "COMPRESSBIN" "gzip" &&
COMPRESSBIN="gzip" &&
@@ -1214,7 +1226,7 @@ set_compression_type() {
##
#---------------------------------------------------------------------
filename_indicates_compression() {
- grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm|xz|7z|lzma)$" <<< "$1"
+ grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm|lz|xz|7z|lzma)$" <<< "$1"
}
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 60f1916..02b053a 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -429,7 +429,7 @@ create_cache_archive() {
rm $TMP_DATA $TMP_MDATA
case "$COMPRESSBIN" in
- gzip|bzip2|pbzip2|xz)
+ gzip|bzip2|pbzip2|xz|lzip)
if "$COMPRESSBIN" -c </dev/null &>/dev/null; then
"$COMPRESSBIN" -c "$CACHE" > "$CACHE_COMP" &&
rm "$CACHE"
diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 061a325..b54813e 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -196,6 +196,7 @@ uncompress_core() {
tar) cat "$1" ;;
xz|XZ) xz -cdf "$1" ;;
LZMA) xz -cdf "$1" ;;
+ lzip) lzip -cdf "$1" ;;
7-zip) cat "$1" ;; # 7z supports stdout, but it unpacks at the
same time
*) cat "$1" ;;
esac
@@ -234,7 +235,7 @@ unpack_core() {
debug "libgrimoire" "unpack_core - $*"
case "$2" in
- bzip2|gzip|compress*|tar|XZ|xz|LZMA)
+ bzip2|gzip|compress*|lzip|tar|XZ|xz|LZMA)
untar 2>/dev/null || cat > /dev/null ;;
Zip) cat /dev/stdin >/dev/null #get rid of unused output
unzip -q "$1" ;;
- [SM-Commit] GIT changes to master sorcery by Ismael Luceno (d1fc58124ff5edcb14295cd59b968833a5a1349f), Ismael Luceno, 06/10/2023
Archive powered by MHonArc 2.6.24.