r71491 - in /trunk/perlbrew: Changes MANIFEST META.yml bin/perlbrew debian/changelog lib/App/perlbrew.pm t/03.path_with_tilde.t
ghedo-guest at users.alioth.debian.org
ghedo-guest at users.alioth.debian.org
Wed Mar 16 11:14:34 UTC 2011
Author: ghedo-guest
Date: Wed Mar 16 11:14:26 2011
New Revision: 71491
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71491
Log:
New upstream release
Added:
trunk/perlbrew/t/03.path_with_tilde.t
- copied unchanged from r71488, branches/upstream/perlbrew/current/t/03.path_with_tilde.t
Modified:
trunk/perlbrew/Changes
trunk/perlbrew/MANIFEST
trunk/perlbrew/META.yml
trunk/perlbrew/bin/perlbrew
trunk/perlbrew/debian/changelog
trunk/perlbrew/lib/App/perlbrew.pm
Modified: trunk/perlbrew/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/Changes?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/Changes (original)
+++ trunk/perlbrew/Changes Wed Mar 16 11:14:26 2011
@@ -1,3 +1,10 @@
+0.18:
+- Spotted and fixed by chad.a.davis++, an issue when bash set "noclobber" option,
+ which breaks the creation of ~/.perlbrew/init. See https://rt.cpan.org/Ticket/Display.html?id=66518
+- A simple `perlbrew clean` command to clean build dir.
+- delegate `-j` arg value to `make test_harness`. by dagolden++
+- $HOME is replaced with "~" in many messages. https://rt.cpan.org/Ticket/Display.html?id=57668
+
0.17:
- UPDATE NOTES: you need to init, off and switch back to the version you want;
- Fix "perlbrew use" to work even if we are switched to a specific version
Modified: trunk/perlbrew/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/MANIFEST?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/MANIFEST (original)
+++ trunk/perlbrew/MANIFEST Wed Mar 16 11:14:26 2011
@@ -20,3 +20,4 @@
t/00.load.t
t/01.options.t
t/02.format_perl_version.t
+t/03.path_with_tilde.t
Modified: trunk/perlbrew/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/META.yml?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/META.yml (original)
+++ trunk/perlbrew/META.yml Wed Mar 16 11:14:26 2011
@@ -24,4 +24,4 @@
resources:
license: http://opensource.org/licenses/mit-license.php
repository: git://github.com/gugod/App-perlbrew.git
-version: 0.17
+version: 0.18
Modified: trunk/perlbrew/bin/perlbrew
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/bin/perlbrew?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/bin/perlbrew (original)
+++ trunk/perlbrew/bin/perlbrew Wed Mar 16 11:14:26 2011
@@ -140,6 +140,12 @@
Force installation of a perl.
+=item B<-j>
+
+Enable parallel make and test (if supported by the target perl)
+
+ perlbrew install -j 5 perl-5.12.3
+
=item B<-n| --notest>
Skip the test suite
Modified: trunk/perlbrew/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/debian/changelog?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/debian/changelog (original)
+++ trunk/perlbrew/debian/changelog Wed Mar 16 11:14:26 2011
@@ -1,3 +1,9 @@
+perlbrew (0.18-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Alessandro Ghedini <al3xbio at gmail.com> Wed, 16 Mar 2011 12:12:38 +0100
+
perlbrew (0.17-1) unstable; urgency=low
* New upstream release
Modified: trunk/perlbrew/lib/App/perlbrew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/perlbrew/lib/App/perlbrew.pm?rev=71491&op=diff
==============================================================================
--- trunk/perlbrew/lib/App/perlbrew.pm (original)
+++ trunk/perlbrew/lib/App/perlbrew.pm Wed Mar 16 11:14:26 2011
@@ -5,7 +5,7 @@
use Getopt::Long ();
use File::Spec::Functions qw( catfile );
-our $VERSION = "0.17";
+our $VERSION = "0.18";
our $CONF;
my $ROOT = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew";
@@ -27,7 +27,7 @@
mkdir -p $HOME/.perlbrew
fi
- echo '# DO NOT EDIT THIS FILE' > $HOME/.perlbrew/init
+ echo '# DO NOT EDIT THIS FILE' >| $HOME/.perlbrew/init
command perlbrew $short_option env $1 >> $HOME/.perlbrew/init
source $HOME/.perlbrew/init
__perlbrew_set_path
@@ -122,6 +122,28 @@
return;
}
+# File::Path::Tiny::rm
+sub rmpath {
+ my ($path) = @_;
+ if (-e $path && !-d $path) { $! = 20;return; }
+ return 2 if !-d $path;
+ opendir(DIR, $path) or return;
+ my @contents = grep { $_ ne '.' && $_ ne '..' } readdir(DIR);
+ closedir DIR;
+ require File::Spec if @contents;
+ for my $thing (@contents) {
+ my $long = File::Spec->catdir($path, $thing);
+ if (!-l $long && -d $long) {
+ rmpath($long) or return;
+ }
+ else {
+ unlink $long or return;
+ }
+ }
+ rmdir($path) or return;
+ return 1;
+}
+
sub uniq(@) {
my %a;
grep { ++$a{$_} == 1 } @_;
@@ -221,6 +243,13 @@
return \%ENV;
}
+sub path_with_tilde {
+ my ($self, $dir) = @_;
+ my $home = $self->env('HOME');
+ $dir =~ s/^$home/~/ if $home;
+ return $dir;
+}
+
sub is_shell_csh {
my ($self) = @_;
return 1 if $self->env('SHELL') =~ /(t?csh)/;
@@ -302,18 +331,19 @@
$shrc = $yourshrc = 'bashrc';
}
-
system("$0 env > ${HOME}/.perlbrew/init");
+
+ my $root_dir = $self->path_with_tilde($ROOT);
print <<INSTRUCTION;
Perlbrew environment initiated, required directories are created under
- $ROOT
+ $root_dir
Well-done! Congratulations! Please add the following line to the end
of your ~/.${yourshrc}
- source $ROOT/etc/${shrc}
+ source $root_dir/etc/${shrc}
After that, exit this shell, start a new one, and install some fresh
perls:
@@ -354,16 +384,18 @@
File::Copy::copy($executable, $target);
chmod(0755, $target);
+ my $path = $self->path_with_tilde($target);
+
print <<HELP;
The perlbrew is installed as:
- $target
+ $path
You may trash the downloaded $executable from now on.
Next, if this is the first time you install perlbrew, run:
- $target init
+ $path init
And follow the instruction on screen.
HELP
@@ -434,11 +466,11 @@
my $as = $self->{as} || ($dist_git_describe ? "perl-$dist_git_describe" : $dist);
unshift @d_options, qq(prefix=$ROOT/perls/$as);
push @d_options, "usedevel" if $dist_version =~ /5\.1[13579]|git/ ? "-Dusedevel" : "";
- print "Installing $dist into $ROOT/perls/$as\n";
+ print "Installing $dist into " . $self->path_with_tilde("$ROOT/perls/$as") . "\n";
print <<INSTALL if $self->{quiet} && !$self->{verbose};
This could take a while. You can run the following command on another shell to track the status:
- tail -f $self->{log_file}
+ tail -f @{[ $self->path_with_tilde($self->{log_file}) ]}
INSTALL
@@ -467,6 +499,8 @@
&& ($1 >= 8 || $1 == 7 && $2 == 3)) {
$test_target = "test_harness";
}
+ local $ENV{TEST_JOBS}=$self->{j}
+ if $test_target eq "test_harness" && ($self->{j}||1) > 1;
my $make = "make " . ($self->{j} ? "-j$self->{j}" : "");
my @install = $self->{notest} ? "make install" : ("make $test_target", "make install");
@@ -759,6 +793,17 @@
}
}
+sub run_command_clean {
+ my ($self) = @_;
+ my @build_dirs = <$ROOT/build/*>;
+
+ for my $dir (@build_dirs) {
+ print "Remove $dir\n";
+ rmpath($dir);
+ }
+
+ print "\nDone\n";
+}
sub conf {
my($self) = @_;
@@ -949,7 +994,8 @@
Tatsuhiko Miyagawa, Chris Prather, Yanick Champoux, aero, Jason May,
Jesse Leuhrs, Andrew Rodland, Justin Davis, Masayoshi Sekimura,
castaway, jrockway, chromatic, Goro Fuji, Sawyer X, Danijel Tasov,
-polettix, tokuhirom, Ãvar Arnfjörð Bjarmason.
+polettix, tokuhirom, Ãvar Arnfjörð Bjarmason, Pedro Melo,
+Chad A Davis, dagolden.
=head1 DISCLAIMER OF WARRANTY
More information about the Pkg-perl-cvs-commits
mailing list