diff options
| author | Ralph Amissah <ralph@amissah.com> | 2012-04-21 01:50:23 -0400 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2012-04-21 01:50:42 -0400 | 
| commit | 5ae11e06f0ca7605a29876a3d840ac8c88f1f40d (patch) | |
| tree | 2c91ed45429986ee0b754b8089ebe32e9c20616f | |
| parent | v3: db bugfix in maintenance mode (variable name reused) (diff) | |
v3: sysenv, default processing dir name change
* distinguish sisu branch, add sisu branch to processing directory name
* if constants, 'DEVELOPER[:maintenance] == :true' then additionally add
  sisu version number to processing directory name
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v3 | 5 | ||||
| -rw-r--r-- | lib/sisu/v3/constants.rb | 3 | ||||
| -rw-r--r-- | lib/sisu/v3/sysenv.rb | 15 | 
3 files changed, 17 insertions, 6 deletions
| diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index e55dd249..d641eb10 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -23,6 +23,11 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.2.4.orig.tar.xz  * v3: db bugfix in maintenance mode (variable name reused) +* v3: sysenv, default processing dir name change +  * distinguish sisu branch, add sisu branch to processing directory name +  * if constants, 'DEVELOPER[:maintenance] == :true' then additionally add +    sisu version number to processing directory name +  %% 3.2.3.orig.tar.xz (2012-04-15:15/7)  http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.2.3  http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.2.3-1 diff --git a/lib/sisu/v3/constants.rb b/lib/sisu/v3/constants.rb index 439dee68..c7a5c539 100644 --- a/lib/sisu/v3/constants.rb +++ b/lib/sisu/v3/constants.rb @@ -242,6 +242,9 @@ DISABLE={      ncx_navpoint_unique_id:  true,    },  } +DEVELOPER={ +  maintenance:               :false, +}  __END__  consider:    〔comment〕 diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index 442795c9..88ee8ccf 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -101,7 +101,7 @@ module SiSU_Env      data=Config::CONFIG['datadir'] + '/doc/sisu'      m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m      @stub_pwd ||=@@pwd[m,1] -    prcss_dir='_sisu_processing_' +    prcss_dir='_sisu_processing_' + '.' + SiSU_version_dir      prcss_dir_tmp_root="/tmp/#{prcss_dir}"      prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"      if @@user @@ -2018,16 +2018,19 @@ WOK            @rc['processing']['dir']          else defaults[:processing_dir]          end +        v=SiSU_Env::InfoVersion.instance.get_version +        v_dev=(DEVELOPER[:maintenance]==:true) \ +        ? "_#{v[:version]}" +        : ''          path=if proposed_path_base \          and FileTest.directory?(proposed_path_base) \          and File.writable?("#{proposed_path_base}/.") -          x=if proposed_dir -            "#{proposed_path_base}/#{proposed_dir}" -          else -            "#{proposed_path_base}/#{defaults[:processing_dir]}" -          end +          x=proposed_dir \ +          ? "#{proposed_path_base}/#{proposed_dir}" +          : "#{proposed_path_base}/#{defaults[:processing_dir]}"          else defaults[:processing_dir_tmp_root]          end +        path = path + v_dev        end        def usr_dir?          case root_dir | 
