Hello community,

here is the log from the commit of package perl-PAR-Packer for openSUSE:Factory 
checked in at 2013-11-14 08:43:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-PAR-Packer (Old)
 and      /work/SRC/openSUSE:Factory/.perl-PAR-Packer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-PAR-Packer"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-PAR-Packer/perl-PAR-Packer-test.changes     
2012-05-30 10:58:56.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-PAR-Packer.new/perl-PAR-Packer-test.changes    
    2013-11-14 08:43:08.000000000 +0100
@@ -1,0 +2,20 @@
+Wed Nov 13 15:17:28 CET 2013 - [email protected]
+
+- Update to 1.015:
+  RT #82916: Terminating during unpack results in corrupted cache, 
+             failure on next start
+  - apply (slightly modified) patch from [email protected], thanks!
+
+  RT #88297 (-M crashes pp if option contains backslashes)
+  - _add_file(): do _not_ use $zip->memberNamed(...) to refer to the
+                 just added Archive::Zip::Member; instead use the
+                 return value of $zip->addFile or $zip->addString 
+
+  minor changes
+  - use File::Spec::Functions, get rid of ugly File::Spec->... calls 
+  - set $pre_res using catfile() instead of hardcoding a backslash;
+    this might help on Cygwin
+  - fix -Mblib option for run_with_inc.pl: we want the blib in the top 
+    level directory
+
+-------------------------------------------------------------------
perl-PAR-Packer.changes: same change

Old:
----
  PAR-Packer-1.014.tar.gz

New:
----
  PAR-Packer-1.015.tar.gz

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

Other differences:
------------------
++++++ perl-PAR-Packer-test.spec ++++++
--- /var/tmp/diff_new_pack.t3vZCs/_old  2013-11-14 08:43:09.000000000 +0100
+++ /var/tmp/diff_new_pack.t3vZCs/_new  2013-11-14 08:43:09.000000000 +0100
@@ -22,7 +22,7 @@
 Summary:        Test PAR Packager
 License:        GPL-1.0+ or Artistic-1.0
 Group:          Development/Libraries/Perl
-Version:        1.014
+Version:        1.015
 Release:        0
 Url:            http://search.cpan.org/dist/PAR-Packer/
 Source:         %{cpan_name}-%{version}.tar.gz

++++++ perl-PAR-Packer.spec ++++++
--- /var/tmp/diff_new_pack.t3vZCs/_old  2013-11-14 08:43:09.000000000 +0100
+++ /var/tmp/diff_new_pack.t3vZCs/_new  2013-11-14 08:43:09.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-PAR-Packer
-Version:        1.014
+Version:        1.015
 Release:        0
 %define cpan_name PAR-Packer
 Summary:        PAR Packager

++++++ PAR-Packer-1.014.tar.gz -> PAR-Packer-1.015.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/ChangeLog 
new/PAR-Packer-1.015/ChangeLog
--- old/PAR-Packer-1.014/ChangeLog      2012-12-21 16:46:04.000000000 +0100
+++ new/PAR-Packer-1.015/ChangeLog      2013-10-09 13:28:16.000000000 +0200
@@ -1,3 +1,30 @@
+[Changes for 1.015 - Oct 9, 2013]
+
+* featurectomy: remove --icon and --info options from pp and PAR::Packer
+  - they don't work on some versions of Windows (result in corrupted 
executables)
+  - these options are just passed on to Win32::Exe, so you may simply
+    post-process the executable, e.g. using exe_update.pl from Win32::Exe
+
+* bug fixes:
+
+  RT #82916: Terminating during unpack results in corrupted cache, failure on 
next start
+  - apply (slightly modified) patch from [email protected], thanks!
+
+  RT #88297 (-M crashes pp if option contains backslashes)
+  - _add_file(): do _not_ use $zip->memberNamed(...) to refer to the just 
added 
+    Archive::Zip::Member; instead use the return value of $zip->addFile or
+    $zip->addString 
+
+  don't modify embedded files after initial extraction
+  - fixes bug (on Windows) reported by Ken Tuchman <[email protected]>
+  
+  minor changes
+  - use File::Spec::Functions, get rid of ugly File::Spec->... calls 
+  - set $pre_res using catfile() instead of hardcoding a backslash;
+    this might help on Cygwin
+  - fix -Mblib option for run_with_inc.pl: we want the blib in the top level 
directory
+
+------------------------------------------------------------------------
 [Changes for 1.014 - Dec 21, 2012]
 
 * tkpp 1.3 : --addfile option in GUI updated : 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/MANIFEST 
new/PAR-Packer-1.015/MANIFEST
--- old/PAR-Packer-1.014/MANIFEST       2012-10-05 19:14:38.000000000 +0200
+++ new/PAR-Packer-1.015/MANIFEST       2013-10-09 13:38:28.000000000 +0200
@@ -40,7 +40,6 @@
 Makefile.PL
 MANIFEST                       This list of files
 MANIFEST.SKIP
-META.json
 META.yml
 myldr/boot.c
 myldr/Dynamic.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/META.json 
new/PAR-Packer-1.015/META.json
--- old/PAR-Packer-1.014/META.json      2012-12-21 16:47:14.000000000 +0100
+++ new/PAR-Packer-1.015/META.json      1970-01-01 01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-{
-   "abstract" : "PAR Packager",
-   "author" : [
-      "Audrey Tang <[email protected]>"
-   ],
-   "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter 
version 2.120921",
-   "license" : [
-      "perl_5"
-   ],
-   "meta-spec" : {
-      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
-   },
-   "name" : "PAR-Packer",
-   "no_index" : {
-      "directory" : [
-         "t",
-         "inc"
-      ]
-   },
-   "prereqs" : {
-      "build" : {
-         "requires" : {
-            "ExtUtils::Embed" : "0",
-            "ExtUtils::MakeMaker" : "6.59"
-         }
-      },
-      "configure" : {
-         "requires" : {
-            "ExtUtils::MakeMaker" : "0"
-         }
-      },
-      "runtime" : {
-         "requires" : {
-            "Archive::Zip" : "1",
-            "Compress::Zlib" : "1.3",
-            "File::Temp" : "0.05",
-            "Getopt::ArgvFile" : "1.07",
-            "IO::Compress::Gzip" : "0",
-            "Module::ScanDeps" : "1.09",
-            "PAR" : "1.005",
-            "PAR::Dist" : "0.22",
-            "perl" : "5.008001"
-         }
-      }
-   },
-   "release_status" : "stable",
-   "version" : "1.014"
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/META.yml 
new/PAR-Packer-1.015/META.yml
--- old/PAR-Packer-1.014/META.yml       2012-12-21 16:47:14.000000000 +0100
+++ new/PAR-Packer-1.015/META.yml       2013-10-09 13:36:56.000000000 +0200
@@ -3,12 +3,13 @@
 author:
   - 'Audrey Tang <[email protected]>'
 build_requires:
-  ExtUtils::Embed: 0
   ExtUtils::MakeMaker: 6.59
 configure_requires:
-  ExtUtils::MakeMaker: 0
-dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter 
version 2.120921'
+  ExtUtils::Embed: 0
+  ExtUtils::MakeMaker: 6.59
+distribution_type: module
+dynamic_config: 1
+generated_by: 'Module::Install version 1.06'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -16,8 +17,41 @@
 name: PAR-Packer
 no_index:
   directory:
-    - t
+    - contrib
     - inc
+    - t
+provides:
+  App::Packer::PAR:
+    file: lib/App/Packer/PAR.pm
+    version: 0.91
+  PAR::Filter:
+    file: lib/PAR/Filter.pm
+    version: 0.03
+  PAR::Filter::Bleach:
+    file: lib/PAR/Filter/Bleach.pm
+  PAR::Filter::Bytecode:
+    file: lib/PAR/Filter/Bytecode.pm
+  PAR::Filter::Obfuscate:
+    file: lib/PAR/Filter/Obfuscate.pm
+  PAR::Filter::PatchContent:
+    file: lib/PAR/Filter/PatchContent.pm
+  PAR::Filter::PodStrip:
+    file: lib/PAR/Filter/PodStrip.pm
+  PAR::Packer:
+    file: lib/PAR/Packer.pm
+    version: 1.015
+  PAR::StrippedPARL::Base:
+    file: lib/PAR/StrippedPARL/Base.pm
+    version: 0.975
+  pp:
+    file: lib/pp.pm
+    version: 0.992
+recommends:
+  Digest: Module::Signature
+  Tk: 0
+  Tk::ColoredButton: 0
+  Tk::EntryCheck: 0
+  Tk::Getopt: 0
 requires:
   Archive::Zip: 1
   Compress::Zlib: 1.3
@@ -27,5 +61,8 @@
   Module::ScanDeps: 1.09
   PAR: 1.005
   PAR::Dist: 0.22
-  perl: 5.008001
-version: 1.014
+  perl: 5.8.1
+resources:
+  license: http://dev.perl.org/licenses/
+  repository: http://svn.openfoundry.org/par/PAR-Packer/trunk
+version: 1.015
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/PAR-Packer-1.014/contrib/automated_pp_test/automated_pp_test.pl 
new/PAR-Packer-1.015/contrib/automated_pp_test/automated_pp_test.pl
--- old/PAR-Packer-1.014/contrib/automated_pp_test/automated_pp_test.pl 
2012-11-16 17:40:05.000000000 +0100
+++ new/PAR-Packer-1.015/contrib/automated_pp_test/automated_pp_test.pl 
2013-01-22 18:25:08.000000000 +0100
@@ -5566,40 +5566,31 @@
      ) = @_;
 
   #--------------------------------------------------------------------
-  # Goal: Test of 'pp --gui --icon hi.ico -o hello.exe hello.pl'
+  # Goal: Test of 'pp --gui -o hello.exe hello.pl'
   # ----
-  #            The file hi.ico should already exist in the same
-  #            directory as the running program, so that it can
-  #            be copied to the test directory.  hello.pl is created.
   #
   # Outline
   # -------
   # . Create the file hello.pl with code that will print "hello".
-  # . Assume the icon hi.ico already exists.
   # . Build the out.exe with
-  #     pp --gui --icon hi.ico -o out.exe hello.pl
-  # . Test the out.exe for gui and icon. We can use Win32::Exe
-  #   itself to inspect the GUI and icon status of the resulting
+  #     pp --gui -o out.exe hello.pl
+  # . Test the out.exe for gui. We can use Win32::Exe
+  #   itself to inspect the GUI of the resulting
   #   exe, so the snippet below should do:
   # 
   #   my $exe = Win32::Exe->new('out.exe');
-  #   my $ico = Win32::Exe->new('hi.ico');
   #   is($exe->Subsystem, 'windows');
-  #   is($exe->dump_iconfile, $ico->dump_iconfile);
   # Success if true in both cases, failure otherwise.  # 
   # 
   # 
   #--------------------------------------------------------------------
   my $error = EXIT_FAILURE;
-  my $cmd = 'pp --gui --icon hi.ico -o ' . "$hello_executable $hello_pl_file";
+  my $cmd = 'pp --gui -o ' . "$hello_executable $hello_pl_file";
 
   my $sub_test = 0;
   my $file_to_copy = "";
   my $exe = "";
-  my $ico = "";
   my $FALSE = 0;
-  my $exe_is_okay = $FALSE;
-  my $ico_is_okay = $FALSE;
   my $test_file = $hello_pl_file;
   my $print_cannot_locate_message = $FALSE;
 
@@ -5628,16 +5619,6 @@
 
 
   #.................................................................
-  $file_to_copy = File::Spec->catfile($orig_dir, 'hi.ico');
-  if(!(copy($file_to_copy, "$test_dir"))) {
-      $$message_ref = "\namsg568: sub $test_name_string: cannot " .
-                       "copy $file_to_copy to $test_dir:$!:\n";
-      return (EXIT_FAILURE);
-  }
-  if ($verbose) {
-    print ("Copied $file_to_copy to $test_dir\n");
-  }
-  #.................................................................
   $error = create_file($test_file, "hello", $verbose, $message_ref);
   if ($error == EXIT_FAILURE) {
     $$message_ref = "\npgt_msg570: sub $test_name_string: $$message_ref";
@@ -5656,37 +5637,13 @@
 
   #.................................................................
   $exe = Win32::Exe->new($hello_executable);
-  $ico = Win32::Exe::IconFile->new('hi.ico');
-  #.................................................................
-
-  if ($ico->dump_iconfile eq $exe->dump_iconfile) {
-    $ico_is_okay = $TRUE;
-  } else {
-    $ico_is_okay = $FALSE;
-    $$message_ref = $$message_ref . "amsg574: sub $test_name_string " .
-               ": ico->dump_iconfile is not exe->dump_iconfile\n";
-  }
-
-  #.................................................................
-  if ($exe->Subsystem eq 'windows') {
-    $exe_is_okay = $TRUE;
-  } else {
-    $exe_is_okay = $FALSE;
+  if ($exe->Subsystem ne 'windows') {
     $$message_ref = $$message_ref . "amsg576: sub $test_name_string " .
                ": exe->Subsystem is not windows\n";
-  }
-
-  if ($exe_is_okay && $ico_is_okay) {
-    if ($verbose) {
-      print ("Win32::Exe shows a good icon file\n");
-    }
-
-    return (EXIT_SUCCESS);
-  } else {
-      $$message_ref = $$message_ref . 
-        "\nThe command $cmd did not produce a good icon on exe\n";
     return (EXIT_FAILURE)
   }
+
+  return (EXIT_SUCCESS);
   #.................................................................
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/lib/PAR/Packer.pm 
new/PAR-Packer-1.015/lib/PAR/Packer.pm
--- old/PAR-Packer-1.014/lib/PAR/Packer.pm      2012-02-22 10:58:45.000000000 
+0100
+++ new/PAR-Packer-1.015/lib/PAR/Packer.pm      2013-09-02 16:44:49.000000000 
+0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.014';
+our $VERSION = '1.015';
 
 =head1 NAME
 
@@ -49,8 +49,6 @@
     'X|exclude:s@'   => 'Exclude modules',
     'f|filter:s@'    => 'Input filters for scripts',
     'g|gui'          => 'No console window',
-    'i|icon:s'       => 'Icon file',
-    'N|info:s@'      => 'Executable header info',
     'I|lib:s@'       => 'Include directories (for perl)',
     'l|link:s@'      => 'Include additional shared libraries',
     'L|log:s'        => 'Where to log packaging process information',
@@ -811,22 +809,6 @@
             $dep_manifest->{ $root . "lib/$pfile" } =
               [ string => $content_ref ];
         }
-        elsif (
-            File::Basename::basename($map{$pfile}) =~ /^Tk\.dll$/i and 
$opt->{i}
-            and eval { require Win32::Exe; 1 }
-            and eval { require Win32::Exe::IconFile; 1 }
-            and 0 # XXX - broken on larger icon files - XXX
-        ) {
-            my $tkdll = Win32::Exe->new($map{$pfile});
-            $tkdll = $tkdll->create_resource_section if 
!$tkdll->has_resource_section;
-            my $ico = Win32::Exe::IconFile->new($opt->{i});
-            $tkdll->set_icons(scalar $ico->icons);
-
-            $full_manifest->{ $root . "lib/$pfile" } =
-              [ string => $tkdll->dump ];
-            $dep_manifest->{ $root . "lib/$pfile" } =
-              [ string => $tkdll->dump ];
-        }
         else {
             $full_manifest->{ $root . "lib/$pfile" } =
               [ file => $map{$pfile} ];
@@ -1108,9 +1090,9 @@
                 $manifest->{ $alias } = [ file => $file ];
 
                 $oldsize += -s $file;
-                $zip->addFile($file, $alias);
-                $zip->memberNamed($alias)->desiredCompressionMethod($method);
-                $zip->memberNamed($alias)->desiredCompressionLevel($level);
+                my $member = $zip->addFile($file, $alias);
+                $member->desiredCompressionMethod($method);
+                $member->desiredCompressionLevel($level);
             }
         }
         elsif (-e $fn and -r $fn) {
@@ -1121,9 +1103,9 @@
             $self->_vprint(1, "... adding $fn as $in\n");
 
             $oldsize += -s $fn;
-            $zip->addFile($fn => $in);
-            $zip->memberNamed($in)->desiredCompressionMethod($method);
-            $zip->memberNamed($in)->desiredCompressionLevel($level);
+            my $member = $zip->addFile($fn => $in);
+            $member->desiredCompressionMethod($method);
+            $member->desiredCompressionLevel($level);
         }
     }
     else {
@@ -1135,9 +1117,10 @@
         $oldsize += length($str);
 
         $self->_vprint(1, "... adding <string> as $in");
-        $zip->addString($str => $in)->unixFileAttributes(0644);
-        $zip->memberNamed($in)->desiredCompressionMethod($method);
-        $zip->memberNamed($in)->desiredCompressionLevel($level);
+        my $member = $zip->addString($str => $in);
+        $member->unixFileAttributes(0644);
+        $member->desiredCompressionMethod($method);
+        $member->desiredCompressionLevel($level);
     }
 
     $self->{pack_attrib}{old_size} = $oldsize;
@@ -1252,37 +1235,10 @@
     if ($^O ne 'MSWin32' or $opt->{p} or $opt->{P}) {
         $self->_generate_output();
     }
-    elsif (!$opt->{N} and !$opt->{i}) {
+    else {
         $self->_generate_output();
         $self->_fix_console() if $opt->{g};
     }
-    elsif (eval { require Win32::Exe; 1 }) {
-        # FIXME --info results in a corrupted executable
-        if ($opt->{N}) {
-            $self->_warn("--info is currently broken, disabling it");
-            delete $opt->{N};
-        }
-
-        $self->_move_parl();
-        my $exe = Win32::Exe->new($self->{parl});
-        $exe = $exe->create_resource_section if !$exe->has_resource_section;
-        $exe->update(
-            icon => $opt->{i},
-            info => $opt->{N},
-        );
-
-        $self->_append_parl();
-        $self->_generate_output();
-
-        $self->_fix_console();
-        unlink($self->{parl});
-        unlink($self->{orig_parl});
-        unlink("$self->{parl}.bak");
-        return;
-    }
-    else {
-        $self->_die("--icon and --info support needs Win32::Exe");
-    }
 }
 
 # extracts a parl (static) or parldyn (dynamic) from the appropriate data class
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/lib/pp.pm 
new/PAR-Packer-1.015/lib/pp.pm
--- old/PAR-Packer-1.014/lib/pp.pm      2012-01-06 15:12:46.000000000 +0100
+++ new/PAR-Packer-1.015/lib/pp.pm      2013-01-22 18:25:09.000000000 +0100
@@ -135,8 +135,8 @@
     % pp hello --log=c          # Pack 'hello' into 'a.out', logs
                                 # messages into 'c'
 
-    # Pack 'hello' into a console-less 'out.exe' with icon (Win32 only)
-    % pp --gui --icon hello.ico -o out.exe hello
+    # Pack 'hello' into a console-less 'out.exe' (Win32 only)
+    % pp --gui -o out.exe hello
 
     % pp @file hello.pl         # Pack 'hello.pl' but read _additional_
                                 # options from file 'file'
@@ -276,25 +276,6 @@
 
 Show basic usage information.
 
-=item B<-i>, B<--icon>=I<FILE>
-
-Specify an icon file (in F<.ico>, F<.exe> or F<.dll> format) for the
-executable. This option is ignored on non-MSWin32 platforms or when C<-p>
-is specified.
-
-=item B<-N>, B<--info>=I<KEY=VAL>
-
-Add additional information for the packed file, both in C<META.yml>
-and in the executable header (if applicable).  The name/value pair is
-joined by C<=>.  You may specify C<-N> multiple times, or use C<;> to
-link several pairs.
-
-For Win32 executables, these special C<KEY> names are recognized:
-
-    Comments        CompanyName     FileDescription FileVersion
-    InternalName    LegalCopyright  LegalTrademarks OriginalFilename
-    ProductName     ProductVersion
-
 =item B<-I>, B<--lib>=I<DIR>
 
 Add the given directory to the perl library file search path.  May
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/myldr/Makefile.PL 
new/PAR-Packer-1.015/myldr/Makefile.PL
--- old/PAR-Packer-1.014/myldr/Makefile.PL      2012-12-21 15:31:47.000000000 
+0100
+++ new/PAR-Packer-1.015/myldr/Makefile.PL      2013-05-19 17:37:31.000000000 
+0200
@@ -6,7 +6,7 @@
 
 use strict;
 use Config;
-use File::Spec;
+use File::Spec::Functions ':ALL';
 use ExtUtils::Embed;
 use ExtUtils::MakeMaker;
 use DynaLoader;
@@ -19,9 +19,9 @@
     my $file = shift;
 
     my @paths = (
-           $Config{bin},
-       File::Spec->catdir($Config{'archlibexp'}, 'CORE'),
-           split(/\Q$Config{path_sep}\E/, $ENV{$Config{ldlibpthname}} || ''),
+       $Config{bin},
+       catdir($Config{'archlibexp'}, 'CORE'),
+       split(/\Q$Config{path_sep}\E/, $ENV{$Config{ldlibpthname}} || ''),
        split(/ /, $Config{libpth}),
     );
 
@@ -29,12 +29,8 @@
     if ($libperl = DynaLoader::dl_findfile("-lperl")) {
         if (-l $libperl) {
             my $realpath = readlink($libperl);
-            if (!File::Spec->file_name_is_absolute($realpath)) {
-                $realpath = File::Spec->rel2abs(
-                    File::Spec->catfile(
-                        dirname($libperl) => $realpath
-                    )
-                );
+            if (!file_name_is_absolute($realpath)) {
+                $realpath = rel2abs(catfile(dirname($libperl), $realpath));
             }
             $libperl = $realpath;
         }
@@ -42,15 +38,15 @@
     }
 
     foreach my $path (@paths) {
-           $libperl = File::Spec->catfile($path, $file);
+           $libperl = catfile($path, $file);
        return $libperl if -e $libperl;
         
        # for MinGW
-           $libperl = File::Spec->catfile($path, $1) if $file =~ /^lib(.+)/;
+           $libperl = catfile($path, $1) if $file =~ /^lib(.+)/;
        return $libperl if -e $libperl;
         
                # for Cygwin
-       $libperl = File::Spec->catfile($path, $file.$Config{_a});
+       $libperl = catfile($path, $file.$Config{_a});
        return $libperl if -e $libperl;
     }
 }
@@ -72,12 +68,12 @@
 my $ld = $Config{ld} || (($^O eq 'MSWin32') ? 'link.exe' : $Config{cc});
 $ld = $Config{cc} if ($^O =~ /^(?:dec_osf|aix|hpux)$/);
 
-my $f2c = File::Spec->catfile('.', "file2c.pl");
-my $par_pl = File::Spec->catfile('..', 'script', "par.pl");
-my $par_exe = File::Spec->catfile('.', "par$exe");
-my $par_exe_link = File::Spec->catfile('.', "par$link_exe");
-my $boot_exe = File::Spec->catfile('.', "boot$exe");
-my $boot_exe_link = File::Spec->catfile('.', "boot$link_exe");
+my $f2c = catfile('.', "file2c.pl");
+my $par_pl = catfile('..', 'script', "par.pl");
+my $par_exe = catfile('.', "par$exe");
+my $par_exe_link = catfile('.', "par$link_exe");
+my $boot_exe = catfile('.', "boot$exe");
+my $boot_exe_link = catfile('.', "boot$link_exe");
 my $parl_exe = "parl$exe";
 my $parldyn_exe = "parldyn$exe";
 
@@ -85,10 +81,7 @@
 my( $out, $ccdebug, $lddebug, $warn, $rm, $mv, $mt_cmd );
 
 my $res = '';
-my $pre_res = '';
-my $res_cmd = '-$(NOOP)';
-my $rt_cmd = '-$(NOOP)';
-my $res_section = 'noresource.o'; # is never built
+my $res_section = '';
 my $boot_ldflags = '';
 
 if( $cc =~ m/^cl\b/i ) {
@@ -97,11 +90,13 @@
     $lddebug = $debug ? '-debug ' : '-release ';
     $warn = $debug ? '-W3' : '';
     my $machinearch = ( $Config{ptrsize} == 8 ) ? 'AMD64' : 'X86';
-   $pre_res = qq(winres\\pp.res);
-   $rt_cmd = qq(rc winres\\pp.rc);
-    $res_cmd = qq(cvtres /NOLOGO /MACHINE:$machinearch /OUT:ppresource.obj 
$pre_res);
     $res = 'ppresource.obj';
-    $res_section = $res;
+    $res_section = <<"...";
+$res:
+       rc winres\\pp.rc
+       cvtres /NOLOGO /MACHINE:$machinearch /OUT:$res winres\\pp.res
+...
+
     # Embed the manifest file for VC 2005 (aka VC8) or higher, but not for the
     # 64-bit Platform SDK compiler.
     if( $Config{ptrsize} == 4 and $Config{ccversion} =~ /^(\d+)/ and $1 >= 14 
) {
@@ -117,10 +112,13 @@
     if ( $^O =~ /^(?:MSWin|cygwin)/ ) {
         my $target = $Config{archname} =~ /x64/ ? 'pe-x86-64' : 'pe-i386';
         $res = 'ppresource.coff';
-        $pre_res = qq(winres\\pp.rc);
-        $rt_cmd = '-$(NOOP)';
-        $res_cmd = qq(windres -i winres\\pp.rc -o ppresource.coff 
--input-format=rc --output-format=coff --target=$target);
-        $res_section = $res;
+        # Note: On cygwin the command below will be processed by the
+        # cygwin shell, so backslashes in pathnames might be a problem.
+        # Instead use forward slashes which work on Windows as well.
+        $res_section = <<"...";
+$res:
+       windres -i winres/pp.rc -o $res --input-format=rc --output-format=coff 
--target=$target
+...
     }
     $mt_cmd = '-$(NOOP)';
     $boot_ldflags = '-static-libgcc ';
@@ -224,10 +222,10 @@
     # - in the same directory as the perl executable itself
     # - in the same directory as gcc (only useful if it's an absolute path)
     # - in PATH
-    my ($dll_path) = map { glob(File::Spec->catfile($_, $dll_glob)) }
-                         File::Basename::dirname($^X),
-                         File::Basename::dirname($cc),
-                         File::Spec->path;
+    my ($dll_path) = map { glob(catfile($_, $dll_glob)) }
+                         dirname($^X),
+                         dirname($cc),
+                         path();
     return $dll_path;
 }
 
@@ -270,7 +268,7 @@
     SKIP        => [qw(static static_lib dynamic dynamic_lib test)],
     NO_META     => 1,
     PL_FILES    => {},
-    PM          => { map { $_ => File::Spec->catfile('$(INST_LIBDIR)', qw( PAR 
StrippedPARL ), $_) }
+    PM          => { map { $_ => catfile('$(INST_LIBDIR)', qw( PAR 
StrippedPARL ), $_) }
                      @strippedparl },
     MAN1PODS    => {},
     EXE_FILES   => \@parl_exes,
@@ -301,9 +299,7 @@
 sha1.c:
        \$(PERLRUN) sha1.c.PL
 
-$res_section:
-       $rt_cmd
-       $res_cmd
+$res_section
 
 clean::
        -\$(RM_F) boot_embedded_files.c my_par_pl.c
@@ -321,7 +317,7 @@
        \$(PERLRUN) par_pl2c.pl my_par_pl < $par_pl > \$@ 
 
 $parl_exe: $par
-       \$(PERLRUN) -Mblib run_with_inc.pl $par -q -B -O\$@
+       \$(PERLRUN) -Mblib=.. run_with_inc.pl $par -q -B -O\$@
 
 Static.pm: Static.in $par
        \$(PERLRUN) encode_append.pl Static.in $par Static.pm
@@ -343,7 +339,7 @@
 pure_all:: $parldyn_exe Dynamic.pm
 
 $parldyn_exe: $par_exe
-       \$(PERLRUN) -Mblib run_with_inc.pl $par_exe -q -B -O\$@
+       \$(PERLRUN) -Mblib=.. run_with_inc.pl $par_exe -q -B -O\$@
 
 boot$o: \$(MKTMP_STUFF) boot_embedded_files.c
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PAR-Packer-1.014/myldr/boot.c 
new/PAR-Packer-1.015/myldr/boot.c
--- old/PAR-Packer-1.014/myldr/boot.c   2012-10-05 19:13:00.000000000 +0200
+++ new/PAR-Packer-1.015/myldr/boot.c   2013-10-09 13:09:46.000000000 +0200
@@ -25,23 +25,35 @@
 
 #include "boot_embedded_files.c"
 
-
+#define EXTRACT_FAIL    0
+#define EXTRACT_OK      1
+#define EXTRACT_ALREADY 2
+
+/* extract EMB_FILE to file STMPDIR/EXT_NAME and set *EXT_PATH to the latter;
+ * return EXTRACT_ALREADY if the extracted file already exists (and has the
+ * expected size), EXTRACT_OK if successful, EXTRACT_FAIL otherwise
+ */
 static 
 int extract_embedded_file(embedded_file_t *emb_file, const char* ext_name, 
const char* stmpdir, char** ext_path) {
     int fd;
     chunk_t *chunk;
+    struct stat statbuf;
 
     *ext_path = malloc(strlen(stmpdir) + 1 + strlen(ext_name) + 1);
     sprintf(*ext_path, "%s/%s", stmpdir, ext_name);
 
     fd = open(*ext_path, O_CREAT | O_EXCL | O_WRONLY | OPEN_O_BINARY, 0755);
     if ( fd == -1 ) {
-        struct stat statbuf;
-        if ( errno == EEXIST 
-             && par_lstat(*ext_path, &statbuf) == 0 
-             && statbuf.st_size == emb_file->size )
-            return 1;           /* file already exists and has the expected 
size */
-        return 0;
+        if ( errno != EEXIST ) return EXTRACT_FAIL;
+
+        if (par_lstat(*ext_path, &statbuf) == 0 
+            && statbuf.st_size == emb_file->size )
+            /* file already exists and has the expected size */
+            return EXTRACT_ALREADY;           
+
+        /* corrupted file? re-try writing it */
+        fd = open(*ext_path, O_CREAT | O_WRONLY | OPEN_O_BINARY, 0755);
+        if ( fd == -1 ) return EXTRACT_FAIL;
     }
 
     chunk = emb_file->chunks;
@@ -52,10 +64,10 @@
         chunk++;
     }
     if (close(fd) == -1)
-        return 0;
+        return EXTRACT_FAIL;
 
     chmod(*ext_path, 0755);
-    return 1;
+    return EXTRACT_OK;
 }
 
 
@@ -100,7 +112,7 @@
 
 int main ( int argc, char **argv, char **env )
 {
-    int i;
+    int rc, i;
     char *stmpdir;
     embedded_file_t *emb_file;
     char *my_file;
@@ -123,8 +135,8 @@
     stmpdir = par_mktmpdir( argv );    
     if ( !stmpdir ) DIE;        /* error message has already been printed */
 
-    i = my_mkdir(stmpdir, 0700);
-    if ( i == -1 && errno != EEXIST) {
+    rc = my_mkdir(stmpdir, 0700);
+    if ( rc == -1 && errno != EEXIST) {
        fprintf(stderr, "%s: creation of private cache subdirectory %s failed 
(errno= %i)\n", 
                         argv[0], stmpdir, errno);
        DIE;
@@ -133,12 +145,15 @@
     /* extract embedded_files[0] (i.e. the custom Perl interpreter) 
      * into stmpdir (but under the same basename as argv[0]) */
     my_prog = par_findprog(argv[0], strdup(par_getenv("PATH")));
-    if (!extract_embedded_file(embedded_files, par_basename(my_prog), stmpdir, 
&my_perl)) {
+    rc = extract_embedded_file(embedded_files, par_basename(my_prog), stmpdir, 
&my_perl);
+    if (rc == EXTRACT_FAIL) {
         fprintf(stderr, "%s: extraction of %s (custom Perl interpreter) failed 
(errno=%i)\n", 
                             argv[0], my_perl, errno);
         DIE;
     }
 
+    if (rc == EXTRACT_OK)       /* i.e. file didn't already exist */
+    {
 #ifdef __hpux
         {
             /* HPUX will only honour SHLIB_PATH if the executable is specially 
marked */
@@ -168,11 +183,12 @@
             close(fd);                  // CHECK != -1
         }
 #endif
+    }
 
     /* extract the rest of embedded_files into stmpdir */
     emb_file = embedded_files + 1;
     while (emb_file->name) {
-        if (!extract_embedded_file(emb_file, emb_file->name, stmpdir, 
&my_file)) {
+        if (extract_embedded_file(emb_file, emb_file->name, stmpdir, &my_file) 
== EXTRACT_FAIL) {
             fprintf(stderr, "%s: extraction of %s failed (errno=%i)\n", 
                                 argv[0], my_file, errno);
             DIE;
@@ -201,10 +217,10 @@
     }
 
     par_setenv("PAR_SPAWNED", "1");
-    i = spawnvpe(P_WAIT, my_perl, (const char* const*)argv, (const char* 
const*)environ);
+    rc = spawnvpe(P_WAIT, my_perl, (const char* const*)argv, (const char* 
const*)environ);
 
     par_cleanup(stmpdir);
-    exit(i);
+    exit(rc);
 #else
     execvp(my_perl, argv);
     DIE;

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to