Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Thomas Orgis (1350617ffaaba3376d9483bbd9ba26c65d669583)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Thomas Orgis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Thomas Orgis (1350617ffaaba3376d9483bbd9ba26c65d669583)
  • Date: Wed, 18 Mar 2020 17:30:27 +0000

GIT changes to master sorcery by Thomas Orgis <sobukus AT sourcemage.org>:

var/lib/sorcery/modules/libmisc | 11 +++++++++++
1 file changed, 11 insertions(+)

New commits:
commit 1350617ffaaba3376d9483bbd9ba26c65d669583
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

libmisc: fix bzip2/gzip paging for old file in stable grimoire

The file-5.23 in stable returns just 'binary' for compile logs
compressed with bzip2. This means that devel sorcery on stable
systems breaks crucial comands like `gaze compile`. So I added
this fallback that guesses bz2 and gz based on file name again,
to be removed once we are really sure sorcery always has fresh
file at hand. Or someone makes the code smarter to check file
version (as well as availability of the 'safe' locale C.UTF-8
that I'll need to tackle next … it's not available on old
installs).

diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 0cacbe9..8329349 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1711,6 +1711,17 @@ show_file() {
x-gzip) gzip -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
+ # file 5.23 which returns binary for bzip2 files
+ # (and others, I presume). At least for bzip2 files that
+ # sorcery created!
+ binary) case "$file" in
+ *.bz2) bzcat "$file" | $PAGER ;;
+ *.gz) gzip -cd "$file" | $PAGER ;;
+ *) message "Unknown binary file type."
+ return 1 ;;
+ esac
+ ;;
*) message "Unknown file type."
return 1 ;;
esac



  • [SM-Commit] GIT changes to master sorcery by Thomas Orgis (1350617ffaaba3376d9483bbd9ba26c65d669583), Thomas Orgis, 03/18/2020

Archive powered by MHonArc 2.6.24.

Top of Page