pf-tools/pf-tools: 3 new changesets

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Thu Nov 27 16:45:14 UTC 2014


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/3408a5168ef6
changeset: 1339:3408a5168ef6
user:      shad
date:      Thu Nov 27 16:46:52 2014 +0100
description:
skip interactive apt-change display

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/64d6c6ba3c30
changeset: 1340:64d6c6ba3c30
user:      shad
date:      Thu Nov 27 17:43:39 2014 +0100
description:
add missing actions

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/d152734eba9b
changeset: 1341:d152734eba9b
user:      shad
date:      Thu Nov 27 17:44:15 2014 +0100
description:
don't use regex match variable for performances

diffstat:

 doc/updatefile-syntax            |  36 ++++++++++++++++++++++++++++++++++--
 lib/PFTools/Update/Common.pm     |   4 ++--
 lib/PFTools/Update/INSTALLPKG.pm |   8 ++++----
 3 files changed, 40 insertions(+), 8 deletions(-)

diffs (96 lines):

diff -r 0bb05ffb7c3a -r d152734eba9b doc/updatefile-syntax
--- a/doc/updatefile-syntax	Tue Nov 18 17:21:04 2014 +0100
+++ b/doc/updatefile-syntax	Thu Nov 27 17:44:15 2014 +0100
@@ -77,6 +77,40 @@
 						is used with update-config, this(these) command(s) is(are) ignored. You can use
 						backslash char for using multiline command(s) like in bash script
 
+SYNOPSYS : mkdir
+	* mkdir : create a directory
+
+[<dir_path>]
+	! action		::= mkdir
+	? depends		::= space separated list for handling section's depends
+	? owner			::= username or UID for the result dir. Default user is root
+	? group			::= group or GID for the result dir. Default group is root
+	? mode			::= mode for the result dir (use chmod syntax). Default mode is 0755
+	? on_config		::= command(s) which is(are) executed before changing the dir even if noaction parameter
+						is used with update-config command. You can use backslash char for using multiline
+						command(s) like in bash script
+	? before_change	::= command(s) which is(are) executed before changing the dir, if noaction parameter
+						is used with update-config, this(these) command(s) is(are) ignored. You can use
+						backslash char for using multiline command(s) like in bash script
+	? on_noaction	::= command(s) which is(are) executed after changing the dir even if noaction parameter
+						is used with update-config command. You can use backslash char for using multiline
+						command(s) like in bash script
+	? after_change	::= command(s) which is(are) executed after changing the dir, if noaction parameter
+						is used with update-config, this(these) command(s) is(are) ignored. You can use
+						backslash char for using multiline command(s) like in bash script
+
+SYNOPSYS : addmount
+	* addmount : mount a device to a mount point
+
+[<mount_point>]
+	! action		::= addmount
+	? depends		::= space separated list for handling section's depends
+	! source		::= device to be mounted
+	! fstype		::= nfs|ext[2-4]|btrfs|cifs|tmpfs. filesystem type
+	! options		::= options to be applied when mounting the device
+	? mode			::= mode for the result mountpoint (use chmod syntax). Default mode is 0755
+
+
 SYNOPSYS : installpkg
 	* installpkg	: installing a package
 
@@ -153,5 +187,3 @@
 						 - CONFSITE_foo:	resolve to	/module/SITE/foo/CONFIG/
 						 - MOD:				resolve to	/module/MODEL/
 						 - MODSITE_foo:		resolve to	/module/SITE/foo/MODEL/
-
-
diff -r 0bb05ffb7c3a -r d152734eba9b lib/PFTools/Update/Common.pm
--- a/lib/PFTools/Update/Common.pm	Tue Nov 18 17:21:04 2014 +0100
+++ b/lib/PFTools/Update/Common.pm	Thu Nov 27 17:44:15 2014 +0100
@@ -195,7 +195,7 @@
         = defined( $ref_section->{'mode'} ) ? $ref_section->{'mode'}
         : ( -d $dest )                      ? $DEFAULT_DIRMODE
         :                                     $DEFAULT_MODE;
-    $mode =~ s{\A [^0]}{0$&}xms;
+    $mode =~ s{(\A [^0])}{0$1}xms;
 
     if ( !fullchmod( eval($mode), $dest, $options ) ) {
         carp qq{ERROR: Unable to chmod to $mode for $dest};
@@ -299,7 +299,7 @@
     return if !$dir;
 
     # FIXME rewrite this part, it's really unreadable!!
-    $dir =~ s{//}{/}gxms;          # supprimer // sinon ca marche moins bien
+    $dir =~ s{//}{/}gxms;    # supprimer // sinon ca marche moins bien
     $dir =~ s{/[^/]+/* \z}{}xms;
     my $dir2 = $dir;
     while ( $dir2 ne q{} && !-e $dir2 ) {
diff -r 0bb05ffb7c3a -r d152734eba9b lib/PFTools/Update/INSTALLPKG.pm
--- a/lib/PFTools/Update/INSTALLPKG.pm	Tue Nov 18 17:21:04 2014 +0100
+++ b/lib/PFTools/Update/INSTALLPKG.pm	Thu Nov 27 17:44:15 2014 +0100
@@ -45,7 +45,8 @@
 ### Environment vars
 $ENV{'PATH'}            = $ENV{'PATH'} . ':/usr/local/sbin:/usr/local/bin';
 $ENV{'DEBIAN_FRONTEND'} = 'noninteractive';
-$ENV{'DEBIAN_PRIORITY'} = 'critical';
+$ENV{'APT_LISTCHANGES_FRONTEND'} = 'none';
+$ENV{'DEBIAN_PRIORITY'}          = 'critical';
 
 sub action_depends {
     my ( $ref_section, $dest, $options ) = @_;
@@ -142,9 +143,8 @@
             );
         }
         if ( defined( $ref_section->{'delay'} ) && !$options->{'noaction'} ) {
-            $hash_subst->{'HOSTNAME'} =~ m{\d+ \z}xms;
-            if ( $& ne q{} ) {
-                sleep( 120 * $& );
+            if ( $hash_subst->{'HOSTNAME'} =~ m{\d+ \z}xms ) {
+                sleep( 120 * $hash_subst->{'HOSTNAME'} );
             }
         }
         if ( !$options->{'simul'} ) {



More information about the pf-tools-commits mailing list