Re: [perl #36576] ExtUtils::Manifest 1.46 manicopy bug

2005-07-17 Thread Michael G Schwern
On Sat, Jul 16, 2005 at 02:51:14PM -0700, Earl Hood wrote:
> It appears that cp_if_diff() was supposed to be coded
> to only warn about non-existent file do to the initial
> -f $from check.  But all that is printed is a warning from
> the check, and the following open() call fails.
> 
> As it is coded, the -f $from is basically an expensive noop.
> 
> What follows is a patch that if -f $from fails, a warning
> is printed, and the routine returns without aborting
> execution.

Thanks, I'll patch that in.


> NOTE: All this came about due to the metafile target for
> MakeMaker is dependent on create_distdir (which is something
> added in later releases).  The problem is if META.yml does
> not exist (since the developer knows that MakeMaker will
> do it automatically), metafile target always fails due
> to create_distdir failing since META.yml is in the MANIFEST
> which metafile target is supposed to create.

The solution for this is to delete META.yml from your MANIFEST and let
MakeMaker add it to the copy in the distdir.


-- 
Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern
You are wicked and wrong to have broken inside and peeked at the
implementation and then relied upon it.
-- tchrist in <[EMAIL PROTECTED]>


[perl #36576] ExtUtils::Manifest 1.46 manicopy bug

2005-07-17 Thread via RT
# New Ticket Created by  Earl Hood 
# Please include the string:  [perl #36576]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/rt3/Ticket/Display.html?id=36576 >



This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.6.


-
[Please enter your report here]

ExtUtils::Manifest v1.46 has a bug, or undesirable behavior
when manicopy is used.  If a file does not exist, execution
is aborted, vs just printing a warning.

It appears that cp_if_diff() was supposed to be coded
to only warn about non-existent file do to the initial
-f $from check.  But all that is printed is a warning from
the check, and the following open() call fails.

As it is coded, the -f $from is basically an expensive noop.

What follows is a patch that if -f $from fails, a warning
is printed, and the routine returns without aborting
execution.

NOTE: All this came about due to the metafile target for
MakeMaker is dependent on create_distdir (which is something
added in later releases).  The problem is if META.yml does
not exist (since the developer knows that MakeMaker will
do it automatically), metafile target always fails due
to create_distdir failing since META.yml is in the MANIFEST
which metafile target is supposed to create.


--- Manifest.pm.1.462005-07-16 15:18:55.0 -0500
+++ Manifest.pm 2005-07-16 15:17:48.0 -0500
@@ -416,7 +416,10 @@
 
 sub cp_if_diff {
 my($from, $to, $how)[EMAIL PROTECTED];
--f $from or carp "$0: $from not found";
+if (! -f $from) {
+   carp "Warning: $from not found";
+   return;
+}
 my($diff) = 0;
 local(*F,*T);
 open(F,"< $from\0") or die "Can't read $from: $!\n";


[Please do not change anything below this line]
-
---
Flags:
category=library
severity=low
---
This perlbug was built using Perl v5.8.6 - Wed Apr 20 23:24:48 CDT 2005
It is being executed now by  Perl v5.8.6 - Fri Dec 24 15:39:48 CST 2004.

Site configuration information for perl v5.8.6:

Configured by lindsey at Fri Dec 24 15:39:48 CST 2004.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
osname=linux, osvers=2.4.28, archname=i686-linux
uname='linux imladris.mallorn.com 2.4.28 #1 smp wed nov 17 14:55:07 cst 
2004 i686 unknown '
config_args='-ds -Dprefix=/usr/local/perl-5.8.6 -Dscriptdir=/usr/local/bin 
-Dldflags=-L/usr/local/lib -Dincpath=-I/usr/local/include -Doptimize=-O2'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/gdbm',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -I/usr/local/include 
-I/usr/local/include/gdbm'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.2 2.96-112.7.2)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='cc', ldflags ='-L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl /usr/local/lib/libgdbm.a -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.4'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.6:
/usr/local/perl-5.8.6/lib/5.8.6/i686-linux
/usr/local/perl-5.8.6/lib/5.8.6
/usr/local/perl-5.8.6/lib/site_perl/5.8.6/i686-linux
/usr/local/perl-5.8.6/lib/site_perl/5.8.6
/usr/local/perl-5.8.6/lib/site_perl
.

---
Environment for perl v5.8.6:
LANG=C
LANGUAGE (unset)
LC_ALL=C
LD_LIBRARY_PATH=/home/users/mhonarc.org/ehood/lib:/usr/local/lib:/usr/lib
LOGDIR (unset)
PATH=/usr/local/bin:/usr/bitsccs:/usr/X11/bin:/sbin:/usr/sbin:/usr/bin:/bin
PERL_BADLANG (unset)
SHELL=/bin/bash2