pf-tools/pf-tools: 2 new changesets

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Wed Aug 27 16:23:08 UTC 2014


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/3d031789531b
changeset: 1324:3d031789531b
user:      shad
date:      Wed Aug 27 10:44:43 2014 +0200
description:
more homogeneous options and help

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/6637ecc40000
changeset: 1325:6637ecc40000
user:      shad
date:      Wed Aug 27 16:48:38 2014 +0200
description:
replace substring even if the string is '0'

diffstat:

 lib/PFTools/Conf.pm |   3 ++-
 sbin/update-config  |  13 +++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r a50c871ee9a1 -r 6637ecc40000 lib/PFTools/Conf.pm
--- a/lib/PFTools/Conf.pm	Tue Aug 26 15:35:05 2014 +0200
+++ b/lib/PFTools/Conf.pm	Wed Aug 27 16:48:38 2014 +0200
@@ -196,7 +196,8 @@
     return $text if !$text;
     return $text if ref $variables_ref ne 'HASH';
 
-    $text =~ s{ % ([^%]+) % }{ $variables_ref->{$1} || q{} }xmsge;
+    $text
+        =~ s{ % ([^%]+) % }{ ( defined $variables_ref->{$1} ) ? $variables_ref->{$1} : q{} }xmsge;
     return $text;
 }
 
diff -r a50c871ee9a1 -r 6637ecc40000 sbin/update-config
--- a/sbin/update-config	Tue Aug 26 15:35:05 2014 +0200
+++ b/sbin/update-config	Wed Aug 27 16:48:38 2014 +0200
@@ -36,7 +36,7 @@
 my $program = basename $PROGRAM_NAME;
 
 my @options_specs = (
-    'branch=s',   'debug|d',   'diff|u',       'force-reload|f',
+    'branch=s',   'debug|d',   'diff|u',       'forcereload|f',
     'help',       'install|i', 'noaction',     'noupdate',
     'quiet|q',    'simul|s',   'pkg_type|p=s', 'verbose|v',
     'config|c=s', 'store=s',   'host|h=s',     'site=s',
@@ -81,7 +81,7 @@
 
 my ( $PF_CONFIG, $GLOBAL_STRUCT ) = init_tools(
     $options->{'host'},  $options->{'config'},
-    $options->{'store'}, $options->{'force-reload'}
+    $options->{'store'}, $options->{'forcereload'}
 );
 
 if ( !$PF_CONFIG->{'features'}->{'update'} ) {
@@ -115,15 +115,20 @@
 	--site			: site for hostname (optional)
 	-c --config		: path to access to pf-tools.conf file (optional)
 	--store			: path to storable file which contains gloabl configuration
-	-f --force-reload	: forcing the reload of global structure by parsing all configuration files from repository
+	-f --forcereload	: forcing the reload of global structure by parsing all configuration files from repository
 	-d --debug		: print debug info
 	-u --diff		: diff files, versions, mountpoints, links => --simul
+	-q --quiet		: start in quiet mode
 	-i --install		: install mode
 	-s --simul		: simulation mode, fake everything
 	-v --verbose		: be more verbose
 	-p --pkg_type		: specify the package type default is deb (optional)
 	--branch		: update based on a specific VCS branche.
-    
+	--forcecolor		: force the colorization of output (usefull when piping in a 'less -R')
+	--nocolor		: dont colorize the output
+	--noaction		: execute on_noaction directives
+	--noupdate		: execute on_noupdate directives
+
 END_OF_HELP
 
     return;



More information about the pf-tools-commits mailing list