c&d: version & branch info, changes related to move of lib dirs
authorRalph Amissah <ralph@amissah.com>
Sat, 6 Dec 2014 04:41:05 +0000 (23:41 -0500)
committerRalph Amissah <ralph@amissah.com>
Mon, 8 Dec 2014 05:18:15 +0000 (00:18 -0500)
13 files changed:
bin/sisu
data/doc/sisu/CHANGELOG_v5
data/doc/sisu/CHANGELOG_v6
lib/sisu/current/constants.rb
lib/sisu/current/se_get_init.rb
lib/sisu/current/se_info_env.rb
lib/sisu/current/se_info_system.rb
lib/sisu/current/se_version.rb
lib/sisu/develop/constants.rb
lib/sisu/develop/se_get_init.rb
lib/sisu/develop/se_info_env.rb
lib/sisu/develop/se_info_system.rb
lib/sisu/develop/se_version.rb

index d96f8a7c6c55e262fb5a6afcefda01f8fde140fa..276b8ed885f4f7feb0fff9418bdf2d1845dd736a 100644 (file)
--- a/bin/sisu
+++ b/bin/sisu
@@ -29,7 +29,7 @@ class Orient
   def sisu_called_from_directory
     @@sisu_called_from_directory ||= Dir.pwd
   end
-  def sisu_run_from
+  def sisu_run_from?
     if processing.called_as == processing.file_full_path \
     and File.dirname(processing.file_full_path) != Config::CONFIG['bindir']
       :full_path_to_sisu_bin_in_sisu_dir_tree
@@ -90,7 +90,7 @@ class Orient
     self
   end
   def sisu_lib
-    "sisu/#{select_version_check}"
+    "sisu/#{branch_name?}"
   end
   def sisu_path_lib
     if sisu_path_specified_lib \
@@ -100,11 +100,11 @@ class Orient
     end
   end
   def sisu_version_info_path
-    "#{sisu_path_base_system_data}/version/#{select_version_check}.yml"
+    "#{sisu_path_base_system_data}/version/#{branch_name?}.yml"
   end
-  def select_version_check
-    if sisu_run_from == :full_path_to_sisu_bin_in_sisu_dir_tree \
-    or sisu_run_from == :system_install
+  def branch_name?
+    if sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \
+    or sisu_run_from? == :system_install
       case processing.called_as
       when processing.stable_bin_file_regex      then processing.current
       when processing.unstable_bin_file_regex    then processing.next
@@ -115,7 +115,7 @@ class Orient
         else                                          processing.current
         end
       end
-    elsif sisu_run_from == :gem_install
+    elsif sisu_run_from? == :gem_install
       case processing.file_full_path
       when processing.stable_gem_regex           then processing.current
       when processing.unstable_gem_regex         then processing.next
@@ -124,19 +124,41 @@ class Orient
     else                                              processing.current
     end
   end
+  def branch_version?
+    if sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \
+    or sisu_run_from? == :system_install
+      case processing.called_as
+      when processing.stable_bin_file_regex      then processing.stable
+      when processing.unstable_bin_file_regex    then processing.unstable
+      else
+        case processing.argv_str
+        when processing.stable_modifier_regex    then processing.stable
+        when processing.unstable_modifier_regex  then processing.unstable
+        else                                          processing.stable
+        end
+      end
+    elsif sisu_run_from? == :gem_install
+      case processing.file_full_path
+      when processing.stable_gem_regex           then processing.stable
+      when processing.unstable_gem_regex         then processing.unstable
+      else                                            processing.stable
+      end
+    else                                              processing.stable
+    end
+  end
   def paths_set
-    if sisu_run_from == :system_install \
+    if sisu_run_from? == :system_install \
     and processing.called_as \
     =~ /^#{Config::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/
       :set_path_system
-    elsif sisu_run_from == :full_path_to_sisu_bin_in_sisu_dir_tree \
+    elsif sisu_run_from? == :full_path_to_sisu_bin_in_sisu_dir_tree \
     and processing.called_as \
     !~ /^#{Config::CONFIG['bindir']}\/sisu[#{version.stable}#{version.unstable}]?$/ \
     && File.expand_path(processing.called_as) \
     =~ /bin\/sisu[#{version.stable}#{version.unstable}]?$/ \
     && FileTest.file?(processing.called_as)
       :set_dir_tree_full_path
-    elsif sisu_run_from==:gem_install
+    elsif sisu_run_from==:gem_install
       :set_gem_path
     else nil
     end
@@ -184,8 +206,9 @@ class Orient
   end
   def sisu_is
     {
-      run_from:              sisu_run_from,
-      version_dir:           select_version_check,
+      run_from:              sisu_run_from?,
+      branch_name:           branch_name?,
+      branch_version:        branch_version?,
       path_base:             sisu_path_base,
       path_base_system_data: sisu_path_base_system_data,
       path_lib:              sisu_path_lib,
index 55fc1e4b3368254f8dbf5824016c339c292dc28e..954cec19d37ba2c3de7eac9b957e2d1e5c519621 100644 (file)
@@ -66,6 +66,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.8.0.orig.tar.xz
       considered (cur|dev) (current|(dev|development|progress|next))
       (stable|unstable), alpha sorting fail (release|(next|develop))]
 
+  * version & branch info, changes related to move of lib dirs
+
 ** SiSU "UnFrozen" - prior to end of Debian Freeze
   (upstream bugfix 5.7.2 intended for Jessie (packaged for Debian as 5.7.1-2)
   was not accepted)
index e0f568d29fa2168b54b1e81c7adf4a0e572b8f5c..e0a9d28ecab0c7ba1b7dfb2eaae0b17eea1f91fc 100644 (file)
@@ -56,6 +56,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.4.0.orig.tar.xz
       considered (cur|dev) (current|(dev|development|progress|next))
       (stable|unstable), alpha sorting fail (release|(next|develop))]
 
+  * version & branch info, changes related to move of lib dirs
+
 ** SiSU "UnFrozen" - prior to end of Debian Freeze
   (upstream bugfix 6.3.2 (5.7.2) intended for Jessie (packaged for Debian as
   5.7.1-2) was not accepted)
index 73534567ef859d817a3e5827dc4570149333ae49..aa0b368e2f97d67a0830dcefeae6b690a98fb493 100644 (file)
@@ -260,8 +260,8 @@ else
   }
 end
 Db={
-  name_prefix:               "SiSU#{SiSU_is[:version_dir]}c_",
-  name_prefix_db:            "sisu_#{SiSU_is[:version_dir]}c_",
+  name_prefix:               "SiSU#{SiSU_is[:branch_version]}c_",
+  name_prefix_db:            "sisu_#{SiSU_is[:branch_version]}c_",
   col_title:                  800,
   col_title_part:             400,
   col_title_edition:           10,
index a6e30edc9d9a564a8d560b67c320ea625aa47036..478bc3a297d9f76e1185c8c957d6257221275da3 100644 (file)
@@ -80,13 +80,13 @@ module SiSU_Get_Init
     end
     def rc_path_options
       [
-        "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}",
+        "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}",
         "#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
-        "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}",
+        "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}",
         "#{$sisu_document_markup_directory_base_fixed_path}/_sisu",
-        "#{@@home}/.sisu/#{SiSU_is[:version_dir]}",
+        "#{@@home}/.sisu/#{SiSU_is[:branch_version]}",
         "#{@@home}/.sisu",
-        "#{@@sisu_etc}/#{SiSU_is[:version_dir]}",
+        "#{@@sisu_etc}/#{SiSU_is[:branch_version]}",
         "#{@@sisu_etc}",
       ]
     end
@@ -167,13 +167,13 @@ module SiSU_Get_Init
       tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
       if @markup_dir_changed_
         @ad_path=[
-          "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
-          "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
-          "#{@@home}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{@@home}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{@@home}/.sisu/skin/yml",
-          "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{@@sisu_etc}/#{SiSU_is[:branch_version]}/skin/yml",
           "#{@@sisu_etc}/skin/yml",
         ]
         @ad_path.each do |v|
index 42288f7e789386152817297eebb3aa0990e23675..8917a1d2b3d31111a35d01bdaacb5ba76b917130 100644 (file)
@@ -2104,7 +2104,8 @@ WOK
       FileUtils::rm_rf(processing_path.processing_path.odf_pth)
       FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
       system(
-        "unzip -q #{path.share}/#{SiSU_is[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}"
+        "unzip -q #{path.share}/#{SiSU_is[:branch_name]}/odf/odt.zip -d #{processing_path.odf_pth}"
+        #"unzip -q #{path.share}/#{SiSU_is[:branch_version]}/odf/odt.zip -d #{processing_path.odf_pth}"
       )
     end
     def sisupod_gen(fns_pod)
index 62fe4d6dbf2b31ec2323400c490d2e68da46001b..6fe0e33ad5a42db9389b912188b4af2065b27d04 100644 (file)
@@ -73,7 +73,7 @@ module SiSU_Info_Sys_Gen
     m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
     @stub_pwd ||=@@pwd[m,1]
     @base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
-    prcss_dir='_sisu_processing_' + '.' + SiSU_is[:version_dir]
+    prcss_dir='_sisu_processing_' + '.' + SiSU_is[:branch_version]
     prcss_dir_tmp_root="/tmp/#{prcss_dir}"
     prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
     if @@user
index 59b2e4ebceac99dfeb2e22473e63db8ff2697780..834c9aed8c208f5433486780359e055d858de98d 100644 (file)
@@ -88,10 +88,13 @@ module SiSU_Info_Version
       @version[:install_method]=if SiSU_is[:run_from]==:gem_install
         spec = Gem::Specification.find_by_name("sisu")
         gem_root = spec.gem_dir
-        (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:version_dir]}/,'')) == gem_root) \
+        (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:branch_name]}/,'')) == gem_root) \
         ? ' (ruby gem install)' : ''
       else ''
       end
+      @version[:branch_name]=SiSU_is[:branch_name]
+      @version[:branch_version]=SiSU_is[:branch_version]
+      @version[:branch_number]=/^v([0-9]+)$/.match(@version[:branch_version])[1]
       @version
     end
     def rbversion
index 072f5085c6f7fbf3e58cd46ac243cfee03b34052..ae086b8873f6d44697d66d2cb445b7503e6fb153 100644 (file)
@@ -260,8 +260,8 @@ else
   }
 end
 Db={
-  name_prefix:               "SiSU#{SiSU_is[:version_dir]}c_",
-  name_prefix_db:            "sisu_#{SiSU_is[:version_dir]}c_",
+  name_prefix:               "SiSU#{SiSU_is[:branch_version]}c_",
+  name_prefix_db:            "sisu_#{SiSU_is[:branch_version]}c_",
   col_title:                  800,
   col_title_part:             400,
   col_title_edition:           10,
@@ -352,7 +352,7 @@ check:
  #˝ " λ Ω  β α π Ѫ Ж Я Ѳ ѳ Ф ✠ ㈣
  Ѳ  ѳ   Ф
  ♩ ♭   ✠   ▭  ▬  ▪
-【】〖〗◢ ◣ ◀ ▶ ◘ ◙
+【】〖〗◢ ◣ ◀ ▶ ◘ ◙ « ▲ »
 《》「」
  ‹ › ∗  ∴ ∷
 '〔lv1〕','〔lv2〕','〔lv3〕','〔lv4〕','〔lv5〕','〔lv6〕','〔lv7〕','〔lv8〕','〔lv9〕'
index 9bdafae39f8b6a4539f8a8b092c8ad1f6156e019..569ea95e7a7fc0dbb21e4d6e67af83fc461785b5 100644 (file)
@@ -81,30 +81,36 @@ module SiSU_Get_Init
     def rc_path_options
       v=SiSU_Env::InfoVersion.instance.get_version
       [
-        $sisu_document_markup_directory_base_fixed_path \
-        + '/.sisu/v' \
-        + v[:branch_number],
         $sisu_document_markup_directory_base_fixed_path \
         + '/.sisu/' \
         + v[:branch_name],
         $sisu_document_markup_directory_base_fixed_path \
-        + '/.sisu',
+        + '/.sisu/' \
+        + v[:branch_version],
         $sisu_document_markup_directory_base_fixed_path \
-        + '/_sisu/v' \
-        + v[:branch_number],
+        + '/.sisu',
         $sisu_document_markup_directory_base_fixed_path \
         + '/_sisu/' \
         + v[:branch_name],
         $sisu_document_markup_directory_base_fixed_path \
+        + '/_sisu/' \
+        + v[:branch_version],
+        $sisu_document_markup_directory_base_fixed_path \
         + '/_sisu',
         @@home \
         + '/.sisu/' \
-        + SiSU_is[:version_dir],
+        + v[:branch_name],
+        @@home \
+        + '/.sisu/' \
+        + v[:branch_version],
         @@home \
         + '/.sisu', \
         @@sisu_etc \
         + '/' \
-        + SiSU_is[:version_dir],
+        + v[:branch_name],
+        @@sisu_etc \
+        + '/' \
+        + v[:branch_version],
         @@sisu_etc,
       ]
     end
@@ -185,13 +191,17 @@ module SiSU_Get_Init
       tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
       if @markup_dir_changed_
         @ad_path=[
-          "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_name]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
-          "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_name]}/skin/yml",
+          "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
-          "#{@@home}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{@@home}/.sisu/#{SiSU_is[:branch_name]}/skin/yml",
+          "#{@@home}/.sisu/#{SiSU_is[:branch_version]}/skin/yml",
           "#{@@home}/.sisu/skin/yml",
-          "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/skin/yml",
+          "#{@@sisu_etc}/#{SiSU_is[:branch_name]}/skin/yml",
+          "#{@@sisu_etc}/#{SiSU_is[:branch_version]}/skin/yml",
           "#{@@sisu_etc}/skin/yml",
         ]
         @ad_path.each do |v|
index 992d978e9f39917b82f7dfbf9ace8ce14afbb9eb..3a2329dd10ee3070ac244be4253ce7815450ca48 100644 (file)
@@ -2100,13 +2100,6 @@ WOK
       ? @rc['default']['papersize'].downcase
       : (defaults[:papersize].downcase)
     end
-    def odf_structure
-      FileUtils::rm_rf(processing_path.processing_path.odf_pth)
-      FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
-      system(
-        "unzip -q #{path.share}/#{SiSU_is[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}"
-      )
-    end
     def sisupod_gen(fns_pod)
       sisupod_gen_v3(fns_pod)
     end
index c616ec4798e709019457549c8cbacb53c4e26f3d..1c5019b2ce02a56d4e2f1077d90a7fd171832baa 100644 (file)
@@ -73,7 +73,7 @@ module SiSU_Info_Sys_Gen
     m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
     @stub_pwd ||=@@pwd[m,1]
     @base_markup_dir_stub=SiSU_Utils::Path.new.base_markup_stub
-    prcss_dir='_sisu_processing_' + '.' + SiSU_is[:version_dir]
+    prcss_dir='_sisu_processing_' + '.' + SiSU_is[:branch_version]
     prcss_dir_tmp_root="/tmp/#{prcss_dir}"
     prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
     if @@user
index b0bb693cb6b1874cc1697ed7db3977e3d49f38d8..04c61c32296ac4833ac522fc463a0638e7fcb31d 100644 (file)
@@ -88,13 +88,13 @@ module SiSU_Info_Version
       version[:install_method]=if SiSU_is[:run_from]==:gem_install
         spec = Gem::Specification.find_by_name("sisu")
         gem_root = spec.gem_dir
-        (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:version_dir]}/,'')) == gem_root) \
+        (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:branch_name]}/,'')) == gem_root) \
         ? ' (ruby gem install)' : ''
       else ''
       end
-      version[:branch_name]=SiSU_is[:version_dir]
-      version[:branch]=version[:branch_name]
-      version[:branch_number]=/^([0-9]+)\./.match(version[:version])[1]
+      version[:branch_name]=SiSU_is[:branch_name]
+      version[:branch_version]=SiSU_is[:branch_version]
+      version[:branch_number]=/^v([0-9]+)$/.match(version[:branch_version])[1]
       version
     end
     def rbversion