diff options
-rw-r--r-- | bin/sisu | 47 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v5 | 2 | ||||
-rw-r--r-- | data/doc/sisu/CHANGELOG_v6 | 2 | ||||
-rw-r--r-- | lib/sisu/current/constants.rb | 4 | ||||
-rw-r--r-- | lib/sisu/current/se_get_init.rb | 16 | ||||
-rw-r--r-- | lib/sisu/current/se_info_env.rb | 3 | ||||
-rw-r--r-- | lib/sisu/current/se_info_system.rb | 2 | ||||
-rw-r--r-- | lib/sisu/current/se_version.rb | 5 | ||||
-rw-r--r-- | lib/sisu/develop/constants.rb | 6 | ||||
-rw-r--r-- | lib/sisu/develop/se_get_init.rb | 34 | ||||
-rw-r--r-- | lib/sisu/develop/se_info_env.rb | 7 | ||||
-rw-r--r-- | lib/sisu/develop/se_info_system.rb | 2 | ||||
-rw-r--r-- | lib/sisu/develop/se_version.rb | 8 |
13 files changed, 86 insertions, 52 deletions
@@ -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, diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index 55fc1e4b..954cec19 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -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) diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index e0f568d2..e0a9d28e 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -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) diff --git a/lib/sisu/current/constants.rb b/lib/sisu/current/constants.rb index 73534567..aa0b368e 100644 --- a/lib/sisu/current/constants.rb +++ b/lib/sisu/current/constants.rb @@ -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, diff --git a/lib/sisu/current/se_get_init.rb b/lib/sisu/current/se_get_init.rb index a6e30edc..478bc3a2 100644 --- a/lib/sisu/current/se_get_init.rb +++ b/lib/sisu/current/se_get_init.rb @@ -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| diff --git a/lib/sisu/current/se_info_env.rb b/lib/sisu/current/se_info_env.rb index 42288f7e..8917a1d2 100644 --- a/lib/sisu/current/se_info_env.rb +++ b/lib/sisu/current/se_info_env.rb @@ -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) diff --git a/lib/sisu/current/se_info_system.rb b/lib/sisu/current/se_info_system.rb index 62fe4d6d..6fe0e33a 100644 --- a/lib/sisu/current/se_info_system.rb +++ b/lib/sisu/current/se_info_system.rb @@ -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 diff --git a/lib/sisu/current/se_version.rb b/lib/sisu/current/se_version.rb index 59b2e4eb..834c9aed 100644 --- a/lib/sisu/current/se_version.rb +++ b/lib/sisu/current/se_version.rb @@ -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 diff --git a/lib/sisu/develop/constants.rb b/lib/sisu/develop/constants.rb index 072f5085..ae086b88 100644 --- a/lib/sisu/develop/constants.rb +++ b/lib/sisu/develop/constants.rb @@ -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〕' diff --git a/lib/sisu/develop/se_get_init.rb b/lib/sisu/develop/se_get_init.rb index 9bdafae3..569ea95e 100644 --- a/lib/sisu/develop/se_get_init.rb +++ b/lib/sisu/develop/se_get_init.rb @@ -82,29 +82,35 @@ module SiSU_Get_Init 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| diff --git a/lib/sisu/develop/se_info_env.rb b/lib/sisu/develop/se_info_env.rb index 992d978e..3a2329dd 100644 --- a/lib/sisu/develop/se_info_env.rb +++ b/lib/sisu/develop/se_info_env.rb @@ -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 diff --git a/lib/sisu/develop/se_info_system.rb b/lib/sisu/develop/se_info_system.rb index c616ec47..1c5019b2 100644 --- a/lib/sisu/develop/se_info_system.rb +++ b/lib/sisu/develop/se_info_system.rb @@ -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 diff --git a/lib/sisu/develop/se_version.rb b/lib/sisu/develop/se_version.rb index b0bb693c..04c61c32 100644 --- a/lib/sisu/develop/se_version.rb +++ b/lib/sisu/develop/se_version.rb @@ -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 |