r77076 - in /trunk/libfind-lib-perl: Changes MANIFEST META.yml debian/changelog lib/Find/Lib.pm t/moretests/03-chdir-topbegin.t t/moretests/04-symlinks.t t/moretests/symlink_test.pl
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Mon Jul 4 13:27:34 UTC 2011
Author: carnil
Date: Mon Jul 4 13:27:25 2011
New Revision: 77076
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77076
Log:
New upstream release
Added:
trunk/libfind-lib-perl/t/moretests/03-chdir-topbegin.t
- copied unchanged from r77075, branches/upstream/libfind-lib-perl/current/t/moretests/03-chdir-topbegin.t
Modified:
trunk/libfind-lib-perl/Changes
trunk/libfind-lib-perl/MANIFEST
trunk/libfind-lib-perl/META.yml
trunk/libfind-lib-perl/debian/changelog
trunk/libfind-lib-perl/lib/Find/Lib.pm
trunk/libfind-lib-perl/t/moretests/04-symlinks.t
trunk/libfind-lib-perl/t/moretests/symlink_test.pl
Modified: trunk/libfind-lib-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/Changes?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/Changes (original)
+++ trunk/libfind-lib-perl/Changes Mon Jul 4 13:27:25 2011
@@ -1,4 +1,10 @@
Revision history for Find-Lib
+
+1.03 Mon Jul 4 00:20:00 PDT 2011
+ - Making this the final 1.03. All tests pass on cpantesters.
+
+1.03_01 Wed Jun 29 11:05:00 PDT 2011
+ - Revert 1.02 change, but keep a default to Cwd::cwd()
1.02 Mon Jun 20 22:00:00 PDT 2011
- Fix a portabality issue s/$ENV{PWD}/Cwd::cwd()/ RT#68967
Modified: trunk/libfind-lib-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/MANIFEST?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/MANIFEST (original)
+++ trunk/libfind-lib-perl/MANIFEST Mon Jul 4 13:27:25 2011
@@ -17,6 +17,7 @@
t/moretests/02-dollar0-begin.t
t/moretests/02-dollar0.t
t/moretests/03-chdir-begin.t
+t/moretests/03-chdir-topbegin.t
t/moretests/03-chdir.t
t/moretests/03-pwd-begin.t
t/moretests/04-symlinks.t
Modified: trunk/libfind-lib-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/META.yml?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/META.yml (original)
+++ trunk/libfind-lib-perl/META.yml Mon Jul 4 13:27:25 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Find-Lib
-version: 1.02
+version: 1.03
abstract: Helper to smartly find libs to use in the filesystem tree
author:
- Yann Kerherve <yannk at cpan.org>
Modified: trunk/libfind-lib-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/debian/changelog?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/debian/changelog (original)
+++ trunk/libfind-lib-perl/debian/changelog Mon Jul 4 13:27:25 2011
@@ -1,9 +1,4 @@
-libfind-lib-perl (1.02-1) UNRELEASED; urgency=low
-
- TODO:
- - FTBFS; cf.
- https://rt.cpan.org/Public/Bug/Display.html?id=69019
-
+libfind-lib-perl (1.03-1) UNRELEASED; urgency=low
* Team upload.
* New upstream release
Modified: trunk/libfind-lib-perl/lib/Find/Lib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/lib/Find/Lib.pm?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/lib/Find/Lib.pm (original)
+++ trunk/libfind-lib-perl/lib/Find/Lib.pm Mon Jul 4 13:27:25 2011
@@ -4,7 +4,6 @@
use lib;
use File::Spec();
-use Cwd;
use vars qw/$Base $VERSION @base/;
use vars qw/$Script/; # compat
@@ -18,7 +17,7 @@
=cut
-$VERSION = '1.02';
+$VERSION = '1.03';
=head1 SYNOPSIS
@@ -94,7 +93,7 @@
information the module relies on to interpret the relative path given by the
calling program.
-If one of cwd, or $0 is changed before Find::Lib has a chance to do
+If one of cwd, $ENV{PWD} or $0 is changed before Find::Lib has a chance to do
its job, then Find::Lib will most probably die, saying "The script cannot be
found". I don't know a workaround that. So be sure to load Find::Lib as soon
as possible in your script to minimize problems (you are in control!).
@@ -128,8 +127,16 @@
return guess_system_path();
}
+## we want to use PWD if it exists (it's not guaranteed on all platforms)
+## so that we have a sense of the shell current working dir, with unresolved
+## symlinks
+sub guess_pwd {
+ return $ENV{PWD} || Cwd::cwd();
+}
+
sub guess_shell_path {
- my ($volume, $path, $file) = File::Spec->splitpath( Cwd::cwd() );
+ my $pwd = guess_pwd();
+ my ($volume, $path, $file) = File::Spec->splitpath($pwd);
my @path = File::Spec->splitdir($path);
pop @path unless $path[-1];
@base = (@path, $file);
Modified: trunk/libfind-lib-perl/t/moretests/04-symlinks.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/t/moretests/04-symlinks.t?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/t/moretests/04-symlinks.t (original)
+++ trunk/libfind-lib-perl/t/moretests/04-symlinks.t Mon Jul 4 13:27:25 2011
@@ -3,16 +3,19 @@
use Test::More;
use File::Copy;
use File::Spec;
+use Cwd;
+our $cwd;
our $PWD;
our @dirs = ("testdir_$$", "testdir");
our $link = "symlink_$$";
my $script = 'symlink_test.pl';
-my $dirs = File::Spec->catdir(@dirs);
+my $nested_dir = File::Spec->catdir(@dirs);
my $srcfile = File::Spec->catfile('t', 'moretests', $script);
my $dstfile = File::Spec->catfile(@dirs, $script);
BEGIN {
+ $cwd = Cwd::cwd();
$PWD = $ENV{PWD};
if ($^O eq 'MSWin32' or $^O eq 'os2') {
plan skip_all => "irrelevant on dosish OS";
@@ -24,32 +27,32 @@
plan tests => 2;
END {
- chdir $PWD; ## restore original directory
+ chdir $cwd; ## restore original directory
unlink "symlinktest$$";
unlink $link;
unlink $dstfile;
- rmdir $dirs;
+ rmdir $nested_dir;
rmdir $dirs[0];
}
## let's create some stuff
mkdir $dirs[0];
-mkdir $dirs;
-symlink $dirs, $link
- or die "Couldn't symlink the test directory '$dirs $link': $!";
+mkdir $nested_dir;
+symlink $nested_dir, $link
+ or die "Couldn't symlink the test directory '$nested_dir $link': $!";
copy $srcfile, $dstfile;
## this is where we do the real test;
{
## Go into the symlinked directory
- chdir $link or die "coudn't chdir to $link";
- ## damn chdir doesn't update PWD unless comming from non-core Cwd
+ chdir $link or die "couldn't chdir to $link";
+ ## damn chdir doesn't update PWD unless coming from Cwd (which might not be installed?)
local $ENV{PWD} = File::Spec->catdir( $ENV{PWD}, $link );
## execute from there, if all is ok, succeeds
my $ret = system $^X, $script;
ok !$ret, "script succeeded, meaning that compilation with symlink worked"
- or diag "PWD=$ENV{PWD}, script=$script";
+ or diag "cwd=$cwd, PWD=$PWD script=$script";
$ret = system $^X, ".///$script";
ok !$ret, "crufty path doesn't make it blow up";
Modified: trunk/libfind-lib-perl/t/moretests/symlink_test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libfind-lib-perl/t/moretests/symlink_test.pl?rev=77076&op=diff
==============================================================================
--- trunk/libfind-lib-perl/t/moretests/symlink_test.pl (original)
+++ trunk/libfind-lib-perl/t/moretests/symlink_test.pl Mon Jul 4 13:27:25 2011
@@ -1,7 +1,6 @@
#!perl
## this is not a test in itself, don't execute
## this is a script that is executed by a test
-
use Find::Lib '../t/mylib';
use MyLibNoTest;
exit 0;
More information about the Pkg-perl-cvs-commits
mailing list