Hello community,

here is the log from the commit of package insserv-compat for openSUSE:Factory 
checked in at 2015-12-13 09:33:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/insserv-compat (Old)
 and      /work/SRC/openSUSE:Factory/.insserv-compat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "insserv-compat"

Changes:
--------
--- /work/SRC/openSUSE:Factory/insserv-compat/insserv-compat.changes    
2015-07-05 17:50:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.insserv-compat.new/insserv-compat.changes       
2015-12-13 09:33:38.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Dec  1 13:52:22 UTC 2015 - [email protected]
+
+- fix directory argument parsing (bnc#944903)
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ insserv.pl ++++++
--- /var/tmp/diff_new_pack.tsvscH/_old  2015-12-13 09:33:39.000000000 +0100
+++ /var/tmp/diff_new_pack.tsvscH/_new  2015-12-13 09:33:39.000000000 +0100
@@ -65,6 +65,7 @@
 =cut
 
 use strict;
+use File::Basename qw/basename dirname/;
 use Getopt::Long;
 Getopt::Long::Configure("no_ignore_case");
 
@@ -237,19 +238,26 @@
        ) or usage(1);
 }
 
+$init_d = $options{'path'} if $options{'path'};
+
 if (@ARGV) {
-       if (-d $ARGV[0]) {
-               $init_d = shift @ARGV;
+       my $p = $ARGV[0] =~ /\// ? $ARGV[0] : "$init_d/$ARGV[0]";
+       if (!-e $p) {
+               warn "$p doesn't exist";
                usage(1) if @ARGV;
                cleanup();
        }
+       if (-d _) {
+               $init_d = shift @ARGV;
+       } else {
+               $init_d = dirname($p);
+               $ARGV[0] = basename($p);
+       }
 }
 
 usage(1) if ($options{'remove'} && !@ARGV);
 usage(0) if ($options{'help'});
 
-$init_d = $options{'path'} if $options{'path'};
-
 if (@ARGV) {
        for my $name (@ARGV) {
                if ($name =~ s/^(\/.*)\/(.+)/$2/) {


Reply via email to