Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] [PATCH] libsummon: repo archive no longer should be compressed by bzip2 only, any compressor known to tar works

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Paul Vinogradov <vin.public AT gmail.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] [PATCH] libsummon: repo archive no longer should be compressed by bzip2 only, any compressor known to tar works
  • Date: Thu, 20 Mar 2014 22:59:53 -0400

Hi all,

Could someone with sorcery git access apply this patch? I'd appreciate that.

--
Sincerely yours, Paul Vinogradov
From 32961d8b16a0350759d4b9c090e8c3f67ddca840 Mon Sep 17 00:00:00 2001
From: Pol Vinogradov <vin.public AT gmail.com>
Date: Thu, 20 Mar 2014 20:48:06 -0400
Subject: [PATCH] libsummon: repo archive no longer should be compressed by
 bzip2 only, any compressor known to tar works

Signed-off-by: Pol Vinogradov <vin.public AT gmail.com>
---
 ChangeLog                         | 4 ++++
 var/lib/sorcery/modules/libsummon | 8 +++-----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 96d9be6..0374ab1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-20 Pol Vinogradov <vin.public AT gmail.com>
+	* libsummon: repo archive no longer should be compressed by bzip2 only,
+	  any compressor known to tar works
+
 2013-04-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
 	* ensure sorcery tools are always first in PATH, to prevent conflicts
 	  (delve is also in xapian-core), patch by Sukneet Basuta #506
diff --git a/var/lib/sorcery/modules/libsummon b/var/lib/sorcery/modules/libsummon
index 57cbc8a..ce30d94 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -181,8 +181,6 @@ function real_download_src() {
 ## Download the resource, handles file and tree discrepencies, if a tree is
 ## downloaded it is repackaged as the specified file for later use.
 ##
-## Only tar.bz2 files are acceptable caches for repackaged trees
-##
 #-------------------------------------------------------------------------
 function download_src_args() {
   $STD_DEBUG
@@ -233,7 +231,7 @@ function download_src_args() {
 
     # incorrect guess, set new_target appropriatly
     if [[ "$guess_type" == file ]] ; then
-      new_target="${target/.tar.bz2/}"
+      new_target="${target%%.tar.*}"
     fi
 
     if ! test -d $summon_target; then
@@ -246,7 +244,7 @@ function download_src_args() {
       mv -f $summon_target $new_target
     fi &&
     message "${MESSAGE_COLOR}Repackaging ${SPELL_COLOR}$target${DEFAULT_COLOR}"
-    tar --remove-files -cjf $target $new_target &&
+    tar --remove-files -caf $target $new_target &&
     rm -rf $new_target
   elif [[ "$summon_type" == file ]] ; then
     # there is no penalty for guessing tree when the result is a file
@@ -409,7 +407,7 @@ function unpack_for_update() {
   local prefix=$(url_get_prefix $url_list)
   if ! list_find "$hints" file &&
      list_find "$hints" tree || list_find "$tree_prefixes" "$prefix" ; then
-    _new_target="${target/.tar.bz2/}"
+    _new_target="${target%%.tar.*}"
     eval "$guess_type_ref=\"tree\""
     eval "$new_target_ref=\"\$_new_target\""
 
-- 
1.9.0

Attachment: signature.asc
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page