From e206fef8ba35e5061c7da11b1a294d9897de22e9 Mon Sep 17 00:00:00 2001
From: Ralph Amissah <ralph@amissah.com>
Date: Sun, 2 Nov 2014 19:37:45 -0500
Subject: v5 v6: ao, composite documents, on --verbose report loading of .sst
 files, fix

* without fix sisu reports loading of .ssm & .ssi files but not .sst
  (sub-documents are imported correctly and resulting document outputs are
  correct and unaffected, but unless aware of this bug it would seem otherwise
  until the correct operation of sisu was manually verified e.g. by examining
  documents produced); (issue somewhat mitigated by not being the most common
  sisu operation)
* sisu is in development freeze, this fix is provided for Debian Jessie
  (Closes: #767761)
---
 data/doc/sisu/CHANGELOG_v5  | 10 ++++++++++
 data/doc/sisu/CHANGELOG_v6  | 10 ++++++++++
 lib/sisu/v5/ao_composite.rb | 16 +++++++++-------
 lib/sisu/v6/ao_composite.rb | 16 +++++++++-------
 4 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index d805b7c4..54a28ae0 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -40,6 +40,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.7.2.orig.tar.xz
   sisu_5.7.2.orig.tar.xz
   sisu_5.7.2-1.dsc
 
+* ao, composite documents, --verbose report to terminal on loading of *.sst, fix
+  without fix sisu reports loading of .ssm & .ssi files but not .sst
+  (sub-documents are imported correctly and resulting document outputs are
+  correct and unaffected, but unless aware of this bug it would seem otherwise
+  until the correct operation of sisu was manually verified e.g. by examining
+  documents produced); (issue somewhat mitigated by not being the most common
+  sisu operation)
+  sisu is in development freeze, this fix is provided for Debian Jessie
+  (Closes: #767761)
+
 --- SiSU Frozen --- Debian Freeze - ^^ pre Jessie ^^
 
 %% 5.7.1.orig.tar.xz (2014-10-19:41/7)
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index 00c1249d..c42e087c 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -30,6 +30,16 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.3.2.orig.tar.xz
   sisu_6.3.2.orig.tar.xz
   sisu_6.3.2-1.dsc
 
+* ao, composite documents, --verbose report to terminal on loading of *.sst, fix
+  without fix sisu reports loading of .ssm & .ssi files but not .sst
+  (sub-documents are imported correctly and resulting document outputs are
+  correct and unaffected, but unless aware of this bug it would seem otherwise
+  until the correct operation of sisu was manually verified e.g. by examining
+  documents produced); (issue somewhat mitigated by not being the most common
+  sisu operation)
+  sisu is in development freeze, this fix is provided for Debian Jessie
+  (Closes: #767761)
+
 --- SiSU Frozen --- Debian Freeze - ^^ pre Jessie ^^
 
 %% 6.3.1.orig.tar.xz (2014-10-19:41/7)
diff --git a/lib/sisu/v5/ao_composite.rb b/lib/sisu/v5/ao_composite.rb
index a81e3003..c570d05f 100644
--- a/lib/sisu/v5/ao_composite.rb
+++ b/lib/sisu/v5/ao_composite.rb
@@ -133,7 +133,7 @@ module SiSU_Assemble
       begin
         if FileTest.file?(loadfilename)
           insert_array=IO.readlines(loadfilename,'')
-          if loadfilename =~/\S+?\.ss[im]$/
+          if loadfilename =~/\S+?\.ss[itm]$/
             if (@opt.act[:verbose][:set]==:on \
             || @opt.act[:verbose_plus][:set]==:on \
             || @opt.act[:maintenance][:set]==:on)
@@ -143,12 +143,14 @@ module SiSU_Assemble
                 loadfilename,
               ).txt_grey
             end
-            insert_array.each do |para|
-              tuned_file << insert?(para)
-            end
-          elsif loadfilename =~/\S+?\.sst$/
-            insert_array.each do |para|
-              tuned_file << para
+            if loadfilename =~/\S+?\.ss[im]$/
+              insert_array.each do |para|
+                tuned_file << insert?(para)
+              end
+            elsif loadfilename =~/\S+?\.sst$/
+              insert_array.each do |para|
+                tuned_file << para
+              end
             end
           end
         end
diff --git a/lib/sisu/v6/ao_composite.rb b/lib/sisu/v6/ao_composite.rb
index 64c6c11f..1cf7b45d 100644
--- a/lib/sisu/v6/ao_composite.rb
+++ b/lib/sisu/v6/ao_composite.rb
@@ -133,7 +133,7 @@ module SiSU_Assemble
       begin
         if FileTest.file?(loadfilename)
           insert_array=IO.readlines(loadfilename,'')
-          if loadfilename =~/\S+?\.ss[im]$/
+          if loadfilename =~/\S+?\.ss[itm]$/
             if (@opt.act[:verbose][:set]==:on \
             || @opt.act[:verbose_plus][:set]==:on \
             || @opt.act[:maintenance][:set]==:on)
@@ -143,12 +143,14 @@ module SiSU_Assemble
                 loadfilename,
               ).txt_grey
             end
-            insert_array.each do |para|
-              tuned_file << insert?(para)
-            end
-          elsif loadfilename =~/\S+?\.sst$/
-            insert_array.each do |para|
-              tuned_file << para
+            if loadfilename =~/\S+?\.ss[im]$/
+              insert_array.each do |para|
+                tuned_file << insert?(para)
+              end
+            elsif loadfilename =~/\S+?\.sst$/
+              insert_array.each do |para|
+                tuned_file << para
+              end
             end
           end
         end
-- 
cgit v1.2.3