r56109 - in /branches/upstream/libsysadm-install-perl/current: Changes MANIFEST META.yml Makefile.PL README lib/Sysadm/Install.pm t/015caller_level.t t/016printable.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Thu Apr 15 06:29:34 UTC 2010


Author: carnil-guest
Date: Thu Apr 15 06:29:14 2010
New Revision: 56109

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=56109
Log:
[svn-upgrade] Integrating new upstream version, libsysadm-install-perl (0.35)

Added:
    branches/upstream/libsysadm-install-perl/current/t/015caller_level.t
    branches/upstream/libsysadm-install-perl/current/t/016printable.t
Modified:
    branches/upstream/libsysadm-install-perl/current/Changes
    branches/upstream/libsysadm-install-perl/current/MANIFEST
    branches/upstream/libsysadm-install-perl/current/META.yml
    branches/upstream/libsysadm-install-perl/current/Makefile.PL
    branches/upstream/libsysadm-install-perl/current/README
    branches/upstream/libsysadm-install-perl/current/lib/Sysadm/Install.pm

Modified: branches/upstream/libsysadm-install-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/Changes?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/Changes (original)
+++ branches/upstream/libsysadm-install-perl/current/Changes Thu Apr 15 06:29:14 2010
@@ -1,6 +1,12 @@
 ########################################
 Revision history for Sysadm::Install
 ########################################
+
+0.35  (2010/04/13)
+    (ms) [RT 54885] Merged with github fork by Thomas Lenz, fixing 
+         blurt_atomic on Win32.
+    (ms) Fixed local caller_depth increments
+    (ms) Fixed printable() bug masking '-'.
 
 0.34  (2010/02/21)
     (ms) Added github repository link to Makefile.PL

Modified: branches/upstream/libsysadm-install-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/MANIFEST?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/MANIFEST (original)
+++ branches/upstream/libsysadm-install-perl/current/MANIFEST Thu Apr 15 06:29:14 2010
@@ -24,6 +24,8 @@
 t/012tap.t
 t/013download.t
 t/014utf8.t
+t/015caller_level.t
+t/016printable.t
 t/canned/test.tar
 t/canned/testa.tar
 t/canned/utf8.txt

Modified: branches/upstream/libsysadm-install-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/META.yml?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/META.yml (original)
+++ branches/upstream/libsysadm-install-perl/current/META.yml Thu Apr 15 06:29:14 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Sysadm-Install
-version:            0.34
+version:            0.35
 abstract:           Typical installation tasks for system administrators
 author:
     - Mike Schilli <m at perlmeister.com>
@@ -16,7 +16,7 @@
     File::Copy:      0
     File::Path:      0
     File::Temp:      0.16
-    Log::Log4perl:   1
+    Log::Log4perl:   1.28
     LWP::Simple:     0
     Term::ReadKey:   0
 resources:

Modified: branches/upstream/libsysadm-install-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/Makefile.PL?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/Makefile.PL (original)
+++ branches/upstream/libsysadm-install-perl/current/Makefile.PL Thu Apr 15 06:29:14 2010
@@ -40,7 +40,7 @@
     VERSION_FROM      => 'lib/Sysadm/Install.pm', # finds $VERSION
     EXE_FILES         => ['eg/one-liner' ],
     PREREQ_PM         => {
-        Log::Log4perl   => 1.00,
+        Log::Log4perl   => 1.28,
         File::Copy      => 0,
         File::Path      => 0,
         File::Basename  => 0,

Modified: branches/upstream/libsysadm-install-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/README?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/README (original)
+++ branches/upstream/libsysadm-install-perl/current/README Thu Apr 15 06:29:14 2010
@@ -1,5 +1,5 @@
 ######################################################################
-    Sysadm::Install 0.34
+    Sysadm::Install 0.35
 ######################################################################
 
 NAME

Modified: branches/upstream/libsysadm-install-perl/current/lib/Sysadm/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/lib/Sysadm/Install.pm?rev=56109&op=diff
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/lib/Sysadm/Install.pm (original)
+++ branches/upstream/libsysadm-install-perl/current/lib/Sysadm/Install.pm Thu Apr 15 06:29:14 2010
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.34';
+our $VERSION = '0.35';
 
 use File::Copy;
 use File::Path;
@@ -84,6 +84,7 @@
 snip password_read nice_time
 def_or blurt_atomic
 is_utf8_data utf8_available
+printable
 );
 
 our %EXPORTABLE = map { $_ => 1 } @EXPORTABLE;
@@ -188,7 +189,8 @@
 sub cp {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm("cp $_[0] $_[1]") or return 1;
 
@@ -210,7 +212,8 @@
 sub mv {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm("mv $_[0] $_[1]") or return 1;
 
@@ -234,7 +237,8 @@
 ###############################################
     my($url) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     INFO "download $url";
 
@@ -279,7 +283,9 @@
 ###############################################
 sub untar {
 ###############################################
-    local($Log::Log4perl::caller_depth) += 1;
+
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     LOGCROAK("untar called without defined tarfile") unless 
          @_ == 1 and defined $_[0];
@@ -332,7 +338,8 @@
 ###############################################
     my($tar_file, $dir) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     LOGCROAK("not enough arguments") if
       ! defined $tar_file or ! defined $dir;
@@ -386,7 +393,8 @@
 ##################################################
     my ($prompt, $options, $default) = @_;    
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     my $default_int;
     my %files;
@@ -432,7 +440,8 @@
 ##################################################
     my ($prompt, $default) = @_;    
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     if(@_ != 2) {
         LOGCROAK("ask() called with wrong # of args");
@@ -461,7 +470,8 @@
 sub mkd {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "mkd @_" or return 1;
 
@@ -484,7 +494,8 @@
 sub rmf {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "rmf $_[0]" or return 1;
 
@@ -515,7 +526,9 @@
 sub cd {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
+
     INFO "cd $_[0]";
 
     my $opts = { stack_update => 1 };
@@ -545,7 +558,8 @@
 sub cdback {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     LOGCROAK("cd stack empty") unless @DIR_STACK;
 
@@ -570,7 +584,8 @@
 sub make {
 ###############################################
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "make @_" or return 1;
 
@@ -602,7 +617,8 @@
 #######################################
     my($name) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     DEBUG "Sniffing archive '$name'";
 
@@ -678,7 +694,8 @@
        $options = pop @files;
     }
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     for my $file (@files) {
 
@@ -735,7 +752,8 @@
         $options = pop @files;
     }
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     for my $file (@files) {
 
@@ -779,7 +797,8 @@
 
     $options = {} unless defined $options;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     my $from_file = defined($file);
 
@@ -832,7 +851,8 @@
 
     $options = {} unless defined $options;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     $options->{append} = 0 unless defined $options->{append};
 
@@ -887,6 +907,8 @@
 
     blurt($data, $tmpname, $options);
 
+    close $fh;
+
     rename $tmpname, $file or
         LOGDIE "Can't rename $tmpname to $file";
 
@@ -948,7 +970,8 @@
        $options = pop @args;
     }
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "tapping @args" or return 1;
 
@@ -1161,7 +1184,8 @@
     # Lifted from Ben Okopnik's
     # http://www.linuxgazette.com/issue87/misc/tips/cpmod.pl.txt
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "perm_cp @_" or return 1;
 
@@ -1186,7 +1210,8 @@
 ######################################
     my($filename) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     my @stats = (stat $filename)[2,4,5] or
         
@@ -1212,7 +1237,8 @@
 ######################################
     my($filename, $perms) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "perm_set $filename (@$perms)" or return 1;
 
@@ -1239,7 +1265,8 @@
 ######################################
     my(@cmds) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "sysrun: @cmds" or return 1;
 
@@ -1265,7 +1292,8 @@
 
     require Expect;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
         _confirm "Hammer: @cmds" or return 1;
 
@@ -1313,7 +1341,8 @@
 ######################################
     my($argv) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     _confirm "sudo_me" or return 1;
 
@@ -1377,7 +1406,8 @@
 
     $options = {} unless defined $options;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     my $find = bin_find("find");
     LOGCROAK("Cannot find 'find'") unless defined $find;
@@ -1420,7 +1450,8 @@
 
     $options = {} unless defined $options;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     my $cpio = bin_find("cpio");
     LOGCROAK("Cannot find 'cpio'") unless defined $cpio;
@@ -1456,7 +1487,8 @@
 ######################################
     my($in, $out, $bufsize) = @_;
 
-    local($Log::Log4perl::caller_depth) += 1;
+    local $Log::Log4perl::caller_depth =
+          $Log::Log4perl::caller_depth + 1;
 
     $bufsize ||= 4096;
     my $bytes = 0;
@@ -1526,7 +1558,7 @@
 ###########################################
     my($data) = @_;
 
-    $data =~ s/[^ \w.;!?@#$%^&*()+\\|~`'-,><[\]{}="]/./g;
+    $data =~ s/[^ \w.;!?@#$%^&*()+\\|~`',><[\]{}="-]/./g;
     return $data;
 }
 

Added: branches/upstream/libsysadm-install-perl/current/t/015caller_level.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/t/015caller_level.t?rev=56109&op=file
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/t/015caller_level.t (added)
+++ branches/upstream/libsysadm-install-perl/current/t/015caller_level.t Thu Apr 15 06:29:14 2010
@@ -1,0 +1,31 @@
+
+use Test::More tests => 1;
+use Sysadm::Install qw(cd);
+use Log::Log4perl qw(:easy);
+
+my $conf = q(
+  log4perl.category = DEBUG, Buffer
+  log4perl.appender.Buffer = Log::Log4perl::Appender::TestBuffer
+  log4perl.appender.Buffer.layout = Log::Log4perl::Layout::PatternLayout
+  log4perl.appender.Buffer.layout.ConversionPattern = %M %F{1} %L> %m%n
+);
+
+Log::Log4perl->init( \$conf );
+my $buf = Log::Log4perl::Appender::TestBuffer->by_name("Buffer");
+
+cd "..";
+func1();
+
+like $buf->buffer(), qr/main:: .*main:: .*main::func1/s, 
+     "caller_level";
+     
+sub func1 {
+   local $Log::Log4perl::caller_depth = 
+         $Log::Log4perl::caller_depth + 1;
+   cd "..";
+   func2();
+}
+
+sub func2 {
+   cd "..";
+}

Added: branches/upstream/libsysadm-install-perl/current/t/016printable.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsysadm-install-perl/current/t/016printable.t?rev=56109&op=file
==============================================================================
--- branches/upstream/libsysadm-install-perl/current/t/016printable.t (added)
+++ branches/upstream/libsysadm-install-perl/current/t/016printable.t Thu Apr 15 06:29:14 2010
@@ -1,0 +1,15 @@
+#####################################
+# Tests for Sysadm::Install/s utf8 handling
+#####################################
+use Test::More;
+
+use Sysadm::Install qw(:all);
+use File::Spec;
+use File::Path;
+
+#use Log::Log4perl qw(:easy);
+#Log::Log4perl->easy_init($DEBUG);
+
+plan tests => 1;
+
+is(printable('-'), '-', 'printable: -');




More information about the Pkg-perl-cvs-commits mailing list