CPAN
view release on metacpan or search on metacpan
* major surgery: split all packages within the CPAN.pm file into
separate files. Requested by Gabor Szabo who also submitted an initial
implementation.
* major surgery: relocate the repository to github, adjust all SVN
related code in the Makefile.PL to git, and remove all files that are
not directly relevant to CPAN.pm. (David Golden and Andreas Koenig)
* mega doc and English patch by Tom Christiansen and David Golden
* chmod the build directories to be world readable (suggested by Slaven Rezic)
* fix broken perldoc command (Randy Kobes)
* Use Parse::CPAN::Meta not Parse::Metayaml (Steffen Mueller)
* Negated match variables in distroprefs (Gisle Aas)
* new batch signing key PAUSE2009.pub included
* this is release 1.93_03
Makefile.PL view on Meta::CPAN
ddify-distroprefs:
-$(PERL) -Ilib -e 'use YAML::Syck;use CPAN::Kwalify;use Kwalify qw(validate);use Data::Dumper;{my $$errors = 0; my $$files = 0; my $$perrors = 0;my $$distroprefs_path = $$INC{"CPAN/Kwalify.pm"};$$distroprefs_path =~ s{\.pm$$}{/distroprefs.yml};my $$...
kwalify-distroprefs-straight:
-$(PERL) -Ilib -le 'use YAML::Syck;use CPAN::Kwalify;use Kwalify qw(validate);use Data::Dumper;{my $$errors = 0; my $$files = 0; my $$perrors = 0;my $$distroprefs_path = $$INC{"CPAN/Kwalify.pm"};$$distroprefs_path =~ s{\.pm$$}{/distroprefs.yml};my $...
setversion:
$(PERL) Makefile.PL --setversion
README: lib/CPAN.pm Makefile
-[ -r $@ ] && chmod +w $@
-$(PERL) -MPod::Text -e 'Pod::Text->new->parse_from_file(\*ARGV)' lib/CPAN.pm > $@
the-release-name :
$(NOECHO) $(ECHO) 'version ' $(VERSION)
$(NOECHO) $(ECHO) 'release-name ' $(DISTVNAME).tar$(SUFFIX)
pull-request :
$(NOECHO) $(ECHO) 'http://www.nntp.perl.org/group/perl.perl5.porters/2016/01/msg233838.html'
# the last test for META.json prevents that the distro goes out without it (old MakeMaker)
familiar. But in fact it failed all runs since 30977, both maint and
blead. I have already reported to cpantesters but most reports were
PASS. ARRRG, this is the annoying circular data structures problem in
JSON::Syck. We seem to have a negative dependency on JSON::Syck. But as
we always install it because it comes with YAML::Syck we see the
negative report always.
And now I discover that there is a 4.20_1 since last November. But it
fails at the same test.
* 26664 is reopened by Marek and he asks for a chmod before running
patch. I'd think we should chmod selectively.
* Jifty caused a hang in the test suite again. I solved it the same way
as the other times but this time I had to kill an additional ptee
process which apparently was still waiting. Frightening.
* B::Generate seems to be broken. It was also already broken at 23023
which is my first intermediate point to base binary searches on because
it is faster than 20002. And the interval [20002,23023] is it.
----Program----
lib/CPAN/CacheMgr.pm view on Meta::CPAN
#-> sub CPAN::CacheMgr::disk_usage ;
sub disk_usage {
my($self,$dir,$fast) = @_;
return if exists $self->{SIZE}{$dir};
return if $CPAN::Signal;
my($Du) = 0;
if (-e $dir) {
if (-d $dir) {
unless (-x $dir) {
unless (chmod 0755, $dir) {
$CPAN::Frontend->mywarn("I have neither the -x permission nor the ".
"permission to change the permission; cannot ".
"estimate disk usage of '$dir'\n");
$CPAN::Frontend->mysleep(5);
return;
}
}
} elsif (-f $dir) {
# nothing to say, no matter what the permissions
}
lib/CPAN/CacheMgr.pm view on Meta::CPAN
sub {
$File::Find::prune++ if $CPAN::Signal;
return if -l $_;
if ($^O eq 'MacOS') {
require Mac::Files;
my $cat = Mac::Files::FSpGetCatInfo($_);
$Du += $cat->ioFlLgLen() + $cat->ioFlRLgLen() if $cat;
} else {
if (-d _) {
unless (-x _) {
unless (chmod 0755, $_) {
$CPAN::Frontend->mywarn("I have neither the -x permission nor ".
"the permission to change the permission; ".
"can only partially estimate disk usage ".
"of '$_'\n");
$CPAN::Frontend->mysleep(5);
return;
}
}
} else {
$Du += (-s _);
lib/CPAN/Distribution.pm view on Meta::CPAN
@readdir = grep { $_ ne "pax_global_header" } @readdir;
}
$dh->close;
my $tdir_base;
my $from_dir;
my @dirents;
if (@readdir == 1 && -d $readdir[0]) {
$tdir_base = $readdir[0];
$from_dir = File::Spec->catdir(File::Spec->curdir,$readdir[0]);
my($mode) = (stat $from_dir)[2];
chmod $mode | 00755, $from_dir; # JONATHAN/Math-Calculus-TaylorSeries-0.1.tar.gz has 0644
my $dh2;
unless ($dh2 = DirHandle->new($from_dir)) {
my $why = sprintf
(
"Couldn't opendir '%s', mode '%o': %s",
$from_dir,
$mode,
$!,
);
$CPAN::Frontend->mywarn("$why\n");
lib/CPAN/Distribution.pm view on Meta::CPAN
my $parent = $builddir;
mkdir($packagedir, 0777) and last;
if((defined($eexist) && $! != $eexist) || $suffix == 999) {
$CPAN::Frontend->mydie("Cannot create directory $packagedir: $!\n");
}
}
my $f;
for $f (@dirents) { # is already without "." and ".."
my $from = File::Spec->catfile($from_dir,$f);
my($mode) = (stat $from)[2];
chmod $mode | 00755, $from if -d $from; # OTTO/Pod-Trial-LinkImg-0.005.tgz
my $to = File::Spec->catfile($packagedir,$f);
unless (File::Copy::move($from,$to)) {
my $err = $!;
$from = File::Spec->rel2abs($from);
$CPAN::Frontend->mydie(
"Couldn't move $from to $to: $err; #82295? ".
"CPAN::VERSION=$CPAN::VERSION; ".
"File::Copy::VERSION=$File::Copy::VERSION; ".
"$from " . (-e $from ? "exists; " : "does not exist; ").
"$to " . (-e $to ? "exists; " : "does not exist; ").
lib/CPAN/Distribution.pm view on Meta::CPAN
if ($ppp eq "applypatch") {
$pcommand = "$CPAN::Config->{applypatch} -verbose";
} else {
my $thispatchargs = join " ", $stdpatchargs, $ppp;
$pcommand = "$patchbin $thispatchargs";
require Config; # usually loaded from CPAN.pm
if ($Config::Config{osname} eq "solaris") {
# native solaris patch cannot patch readonly files
for my $file (@{$pfiles||[]}) {
my @stat = stat $file or next;
chmod $stat[2] | 0600, $file; # may fail
}
}
}
$readfh = CPAN::Tarzip->TIEHANDLE($patch); # open again
my $writefh = FileHandle->new;
$CPAN::Frontend->myprint(" $pcommand\n");
unless (open $writefh, "|$pcommand") {
my $fail = "Could not fork '$pcommand'";
$CPAN::Frontend->mywarn("$fail; cannot continue\n");
lib/CPAN/FTP.pm view on Meta::CPAN
#-> sub CPAN::FTP::_copy_stat
sub _copy_stat {
my($src, $dest) = @_;
my @stat = stat($src);
if (!@stat) {
$CPAN::Frontend->mywarn("Can't stat '$src': $!\n");
return;
}
eval {
chmod $stat[2], $dest
or $CPAN::Frontend->mywarn("Can't chmod '$dest' to " . sprintf("0%o", $stat[2]) . ": $!\n");
};
warn $@ if $@;
eval {
chown $stat[4], $stat[5], $dest
or do {
my $save_err = $!; # otherwise it's lost in the get... calls
$CPAN::Frontend->mywarn("Can't chown '$dest' to " .
(getpwuid($stat[4]))[0] . "/" .
(getgrgid($stat[5]))[0] . ": $save_err\n"
);
lib/CPAN/HandleConfig.pm view on Meta::CPAN
$mode = (stat $configpm)[2];
if ($mode && ! -w _) {
_die_cant_write_config($configpm);
}
}
$self->_write_config_file($configpm);
require_myconfig_or_config() if $must_reload;
#$mode = 0444 | ( $mode & 0111 ? 0111 : 0 );
#chmod $mode, $configpm;
###why was that so? $self->defaults;
$CPAN::Frontend->myprint("commit: wrote '$configpm'\n");
$CPAN::CONFIG_DIRTY = 0;
1;
}
sub _write_config_file {
my ($self, $configpm) = @_;
my $msg;
$msg = <<EOF if $configpm =~ m{CPAN/Config\.pm};
lib/CPAN/InfoObj.pm view on Meta::CPAN
my($self,$todir) = @_;
# we die if we cannot chdir and we are debuggable
Carp::confess("safe_chdir called without todir argument")
unless defined $todir and length $todir;
if (chdir $todir) {
$self->debug(sprintf "changed directory to %s", CPAN::anycwd())
if $CPAN::DEBUG;
} else {
if (-e $todir) {
unless (-x $todir) {
unless (chmod 0755, $todir) {
my $cwd = CPAN::anycwd();
$CPAN::Frontend->mywarn("I have neither the -x permission nor the ".
"permission to change the permission; cannot ".
"chdir to '$todir'\n");
$CPAN::Frontend->mysleep(5);
$CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] }.
qq{to todir[$todir]: $!});
}
}
} else {
$CPAN::Frontend->mydie("Directory '$todir' has gone. Cannot continue.\n");
}
if (chdir $todir) {
$self->debug(sprintf "changed directory to %s", CPAN::anycwd())
if $CPAN::DEBUG;
} else {
my $cwd = CPAN::anycwd();
$CPAN::Frontend->mydie(qq{Could not chdir from cwd[$cwd] }.
qq{to todir[$todir] (a chmod has been issued): $!});
}
}
}
#-> sub CPAN::InfoObj::set ;
sub set {
my($self,%att) = @_;
my $class = ref $self;
# This must be ||=, not ||, because only if we write an empty
( run in 0.435 second using v1.01-cache-2.11-cpan-496ff517765 )