Hello community,

here is the log from the commit of package perl-Sysadm-Install for 
openSUSE:Factory checked in at 2016-06-05 14:20:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Sysadm-Install (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Sysadm-Install.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Sysadm-Install"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Sysadm-Install/perl-Sysadm-Install.changes  
2015-06-30 10:18:16.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Sysadm-Install.new/perl-Sysadm-Install.changes 
    2016-06-05 14:20:47.000000000 +0200
@@ -1,0 +2,11 @@
+Tue May 31 11:09:33 UTC 2016 - [email protected]
+
+- updated to 0.47
+   see /usr/share/doc/packages/perl-Sysadm-Install/Changes
+
+  0.47  (2016/05/29)
+      (ms) password_read() now writes the prompt to STDERR (instead of 
STDOUT), and
+           optionally to /dev/tty if specified. This allows for redirecting 
STDOUT 
+           (and even STDERR) to a file without losing the password prompt.
+
+-------------------------------------------------------------------

Old:
----
  Sysadm-Install-0.46.tar.gz

New:
----
  Sysadm-Install-0.47.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Sysadm-Install.spec ++++++
--- /var/tmp/diff_new_pack.XTwoRp/_old  2016-06-05 14:20:48.000000000 +0200
+++ /var/tmp/diff_new_pack.XTwoRp/_new  2016-06-05 14:20:48.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Sysadm-Install
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Sysadm-Install
-Version:        0.46
+Version:        0.47
 Release:        0
 %define cpan_name Sysadm-Install
 Summary:        Typical installation tasks for system administrators
@@ -68,7 +68,7 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor

++++++ Sysadm-Install-0.46.tar.gz -> Sysadm-Install-0.47.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sysadm-Install-0.46/Changes 
new/Sysadm-Install-0.47/Changes
--- old/Sysadm-Install-0.46/Changes     2015-06-24 05:00:19.000000000 +0200
+++ new/Sysadm-Install-0.47/Changes     2016-05-30 09:08:30.000000000 +0200
@@ -2,6 +2,11 @@
 Revision history for Sysadm::Install
 ########################################
 
+0.47  (2016/05/29)
+    (ms) password_read() now writes the prompt to STDERR (instead of STDOUT), 
and
+         optionally to /dev/tty if specified. This allows for redirecting 
STDOUT 
+         (and even STDERR) to a file without losing the password prompt.
+
 0.46  (2015/06/23)
     (ms) ask() and pick() now support getting the user's response on the 
          tty, instead of stdin, so they can be used from within a pipe.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sysadm-Install-0.46/META.json 
new/Sysadm-Install-0.47/META.json
--- old/Sysadm-Install-0.46/META.json   2015-06-24 05:02:18.000000000 +0200
+++ new/Sysadm-Install-0.47/META.json   2016-05-30 09:27:18.000000000 +0200
@@ -4,7 +4,7 @@
       "Mike Schilli <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter 
version 2.142690",
+   "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter 
version 2.133380",
    "license" : [
       "unknown"
    ],
@@ -50,5 +50,5 @@
          "url" : "http://github.com/mschilli/sysadm-install-perl";
       }
    },
-   "version" : "0.46"
+   "version" : "0.47"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sysadm-Install-0.46/META.yml 
new/Sysadm-Install-0.47/META.yml
--- old/Sysadm-Install-0.46/META.yml    2015-06-24 05:02:18.000000000 +0200
+++ new/Sysadm-Install-0.47/META.yml    2016-05-30 09:27:17.000000000 +0200
@@ -3,30 +3,30 @@
 author:
   - 'Mike Schilli <[email protected]>'
 build_requires:
-  ExtUtils::MakeMaker: '0'
+  ExtUtils::MakeMaker: 0
 configure_requires:
-  ExtUtils::MakeMaker: '0'
+  ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 
2.142690'
+generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 
2.133380'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: '1.4'
+  version: 1.4
 name: Sysadm-Install
 no_index:
   directory:
     - t
     - inc
 requires:
-  Cwd: '0'
-  File::Basename: '0'
-  File::Copy: '0'
-  File::Path: '0'
-  File::Temp: '0.16'
-  File::Which: '1.09'
-  LWP::Simple: '0'
-  Log::Log4perl: '1.28'
-  Term::ReadKey: '0'
+  Cwd: 0
+  File::Basename: 0
+  File::Copy: 0
+  File::Path: 0
+  File::Temp: 0.16
+  File::Which: 1.09
+  LWP::Simple: 0
+  Log::Log4perl: 1.28
+  Term::ReadKey: 0
 resources:
   repository: http://github.com/mschilli/sysadm-install-perl
-version: '0.46'
+version: 0.47
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sysadm-Install-0.46/README 
new/Sysadm-Install-0.47/README
--- old/Sysadm-Install-0.46/README      2015-06-24 05:02:18.000000000 +0200
+++ new/Sysadm-Install-0.47/README      2016-05-30 09:27:07.000000000 +0200
@@ -1,5 +1,5 @@
 ######################################################################
-    Sysadm::Install 0.46
+    Sysadm::Install 0.47
 ######################################################################
 
 NAME
@@ -439,7 +439,7 @@
 
     "pipe_copy($in, $out, [$bufsize])"
         Reads from $in and writes to $out, using sysread and syswrite. The
-        buffer size used defaults to 4096, but can be set explicitely.
+        buffer size used defaults to 4096, but can be set explicitly.
 
     "snip($data, $maxlen)"
         Format the data string in $data so that it's only (roughly) $maxlen
@@ -458,7 +458,7 @@
         If $data contains unprintable character's they are replaced by "."
         (the dot).
 
-    "password_read($prompt)"
+    "password_read($prompt, $opts)"
         Reads in a password to be typed in by the user in noecho mode. A
         call to password_read("password: ") results in
 
@@ -467,6 +467,9 @@
         This function will switch the terminal back into normal mode after
         the user hits the 'Return' key.
 
+        If the optional $opts hash has "{ tty => 1 }" set, then the prompt
+        will be redirected to the console instead of STDOUT.
+
     "nice_time($time)"
         Format the time in a human-readable way, less wasteful than the
         'scalar localtime' formatting.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sysadm-Install-0.46/lib/Sysadm/Install.pm 
new/Sysadm-Install-0.47/lib/Sysadm/Install.pm
--- old/Sysadm-Install-0.46/lib/Sysadm/Install.pm       2015-06-24 
04:58:31.000000000 +0200
+++ new/Sysadm-Install-0.47/lib/Sysadm/Install.pm       2016-05-30 
09:18:44.000000000 +0200
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.46';
+our $VERSION = '0.47';
 
 use File::Copy;
 use File::Path;
@@ -465,21 +465,44 @@
 }
 
 ##################################################
+sub user_prompt {
+##################################################
+    my ($prompt, $opts) = @_;    
+
+    $opts = {} if !defined $opts;
+
+    my $fh = *STDERR;
+    if( $opts->{ tty } ) {
+        open $fh, ">>", '/dev/tty' or 
+            die "Cannot open /dev/tty ($!)";
+    }
+
+    print $fh $prompt
+        or die "Couldn't write to $fh: ($!)";
+
+    if( $opts->{ tty } ) {
+        close $fh;
+    }
+
+    return 1;
+}
+
+##################################################
 sub user_input {
 ##################################################
     my ($prompt, $opts) = @_;    
 
     $opts = {} if !defined $opts;
 
+    user_prompt( $prompt );
+
     my $fh = *STDIN;
+
     if( $opts->{ tty } ) {
         open $fh, "<", '/dev/tty' or 
             die "Cannot open /dev/tty ($!)";
     }
 
-    print STDERR $prompt
-        or die "Couldn't write STDERR: ($!)";
-
     my $input = <$fh>;
     chomp $input if defined $input;
 
@@ -1587,7 +1610,7 @@
 =item C<pipe_copy($in, $out, [$bufsize])>
 
 Reads from $in and writes to $out, using sysread and syswrite. The
-buffer size used defaults to 4096, but can be set explicitely.
+buffer size used defaults to 4096, but can be set explicitly.
 
 =cut
 
@@ -1678,7 +1701,7 @@
 
 =pod
 
-=item C<password_read($prompt)>
+=item C<password_read($prompt, $opts)>
 
 Reads in a password to be typed in by the user in noecho mode.
 A call to password_read("password: ") results in
@@ -1688,23 +1711,24 @@
 This function will switch the terminal back into normal mode
 after the user hits the 'Return' key.
 
+If the optional C<$opts> hash has C<{ tty =E<gt> 1 }> set, then 
+the prompt will be redirected to the console instead of STDOUT.
+
 =cut
 
 ###########################################
 sub password_read {
 ###########################################
-    my($prompt) = @_;
+    my($prompt, $opts) = @_;
 
     use Term::ReadKey;
     ReadMode 'noecho';
     $| = 1;
-    print "$prompt"
-        or die "Couldn't write STDOUT: ($!)";
+    user_prompt($prompt, $opts);
     my $pw = ReadLine 0;
     chomp $pw;
     ReadMode 'restore';
-    print "\n"
-        or die "Couldn't write STDOUT: ($!)";
+    user_prompt("\n", $opts);
 
     return $pw;
 }


Reply via email to