Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CPAN-Mini CPAN distribution.

Report information
The Basics
Id: 16696
Status: rejected
Priority: 0/
Queue: CPAN-Mini

People
Owner: Nobody in particular
Requestors: sthoenna [...] efn.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Return-Path: <sthoenna [...] efn.org>
X-Original-To: bug-CPAN-Mini [...] rt.cpan.org
Delivered-To: cpan-bug+cpan-mini [...] diesel.bestpractical.com
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 36C814D80E7 for <bug-CPAN-Mini [...] rt.cpan.org>; Fri, 23 Dec 2005 03:47:50 -0500 (EST)
Received: (qmail 24528 invoked by alias); 23 Dec 2005 08:47:24 -0000
X-Spam-Check-BY: la.mx.develooper.com
Received-SPF: fail (x1.develooper.com: domain of sthoenna [...] efn.org does not designate 209.221.136.5 as permitted sender)
Received: from zipcon.net (HELO zipcon.net) (209.221.136.5) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Fri, 23 Dec 2005 00:47:17 -0800
Received: (qmail 15836 invoked from network); 23 Dec 2005 00:52:31 -0800
Received: from unknown (HELO efn.org) (209.221.136.25) by mail.zipcon.net with SMTP; 23 Dec 2005 00:52:31 -0800
Received: by efn.org (sSMTP sendmail emulation); Fri, 23 Dec 2005 00:47:11 -0800
Date: Fri, 23 Dec 2005 00:47:10 -0800
From: Yitzchak Scott-Thoennes <sthoenna [...] efn.org>
To: bug-CPAN-Mini [...] rt.cpan.org
Subject: [PATCH] add bundle option, allow skip_cleanup in rc file
Message-ID: <20051223084710.GA2964 [...] efn.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.1i
Organization: bs"d
X-RT-Original-Encoding: us-ascii
Content-Length: 2113
This adds a -b|bundle option to specify a bundle file and only mirror the bundle's contents. I'd hope this would prevent the proliferation of modules like CPAN::Mini::Phalanx100. Also allow skip_cleanup in the .minicpanrc file. --- CPAN-Mini-0.40/bin/minicpan.orig 2005-09-05 21:24:38.000000000 -0700 +++ CPAN-Mini-0.40/bin/minicpan 2005-12-23 00:31:47.681542400 -0800 @@ -18,15 +18,13 @@ -p - mirror perl, ponie, and parrot distributions -q - run in quiet mode (don't print status) -qq - run in silent mode (don't even print warnings) + -b FILE - only modules listed in the given bundle file =head1 DESCRIPTION This simple shell script just updates (or creates) a miniature CPAN mirror as described in CPAN::Mini. -The local and remote mirror locations are (for now) hardcoded and should be -updated before running this script for the first time. - =cut use CPAN::Mini; @@ -84,6 +82,7 @@ "l|local=s" => \$config{local}, "r|remote=s" => \$config{remote}, "d|dirmode=s" => \$config{dirmode}, + "b|bundle=s" => \$config{bundle}, "qq" => sub { $config{quiet} = 2; $config{errors} = 0; }, "q+" => \$config{quiet}, "f+" => \$config{force}, @@ -91,6 +90,21 @@ "x+" => \$config{exact_mirror}, ) or pod2usage(2); +# make a suitable module filter if just doing a bundle +if ($config{bundle}) { + my $file = delete $config{bundle}; + open my $fh, "<", $file or die "Couldn't open bundle file $file: $!\n"; + my %contents; + while (<$fh>) { + next unless /^=head1\s+CONTENTS/ .. /^=(?!head1\s+CONTENTS)/; + next if /^=/; + s/\#.*//; + next if /^\s+$/; + $contents{(split " ", $_, 2)[0]} = 1; + } + push @{$config{module_filters}}, sub { !exists $contents{$_[0]} }; +} + eval "require $class"; die $@ if $@; @@ -106,6 +120,7 @@ trace => (not $config{quiet}), force => $config{force}, dirmode => $config{dirmode}, + skip_cleanup => $config{skip_cleanup}, skip_perl => (not $config{perl}), exact_mirror => ($config{exact_mirror}), module_filters => ($config{module_filters}),
MIME-Version: 1.0
In-Reply-To: <20051223084710.GA2964 [...] efn.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
References: <20051223084710.GA2964 [...] efn.org>
Message-Id: <rt-3.6.HEAD-32366-1209698276-1669.16696-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 178
Download (untitled) / with headers
text/plain 178b
I have fixed the skip_cleanup omission. I am unsure about the code that reads in a bundle. I'd like to see if I can use CPAN.pm to get that information more reliably. -- rjbs
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-32366-1209698276-1669.16696-6-0 [...] rt.cpan.org>
References: <RT-Ticket-16696 [...] rt.cpan.org> <20051223084710.GA2964 [...] efn.org> <rt-3.6.HEAD-32366-1209698276-1669.16696-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: iso-8859-1
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 490FE4D80A1 for <bug-CPAN-Mini [...] rt.cpan.org>; Fri, 2 May 2008 00:16:19 -0400 (EDT)
Received: (qmail 15360 invoked from network); 2 May 2008 04:16:18 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 2 May 2008 04:16:18 -0000
Received: from samwise.efn.org (HELO samwise.efn.org) (12.33.21.33) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 May 2008 21:16:15 -0700
Received: from webmail.efn.org (localhost [127.0.0.1]) by samwise.efn.org (Postfix) with ESMTP id 157B61701D9 for <bug-CPAN-Mini [...] rt.cpan.org>; Thu, 1 May 2008 21:16:11 -0700 (PDT)
Received: from 71.35.175.248 (SquirrelMail authenticated user sthoenna) by webmail.efn.org with HTTP; Thu, 1 May 2008 21:16:11 -0700 (PDT)
Delivered-To: cpan-bug+CPAN-Mini [...] diesel.bestpractical.com
User-Agent: SquirrelMail/1.5.1
Subject: Re: [rt.cpan.org #16696] [PATCH] add bundle option, allow skip_cleanup in rc file
Return-Path: <sthoenna [...] efn.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-CPAN-Mini [...] rt.cpan.org
Date: Thu, 1 May 2008 21:16:11 -0700 (PDT)
X-Spam-Level: *
Message-Id: <45793.71.35.175.248.1209701771.squirrel [...] webmail.efn.org>
To: bug-CPAN-Mini [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
From: "Yitzchak Scott-Thoennes" <sthoenna [...] efn.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-32366-1209701996-535.16696-0-0 [...] rt.cpan.org>
Content-Length: 652
Download (untitled) / with headers
text/plain 652b
On Thu, May 1, 2008 8:17 pm, Ricardo SIGNES via RT wrote: Show quoted text
>
Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=16696 > > > > I have fixed the skip_cleanup omission. > > > I am unsure about the code that reads in a bundle. I'd like to see if I > can use CPAN.pm to get that information more reliably.
Thanks for looking at my patch :) I believe I copied that code from CPAN.pm, so it should certainly work for existing bundles, and any new bundles that need to be compatible with older CPAN.pm versions. The only advantage to somehow going through CPAN would be if new formats of bundles become supported at some point; is the extra work worth it?
CC: undisclosed-recipients: ;
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-32366-1209701996-535.16696-5-0 [...] rt.cpan.org>
Content-Disposition: inline
References: <RT-Ticket-16696 [...] rt.cpan.org> <20051223084710.GA2964 [...] efn.org> <rt-3.6.HEAD-32366-1209698276-1669.16696-6-0 [...] rt.cpan.org> <45793.71.35.175.248.1209701771.squirrel [...] webmail.efn.org> <rt-3.6.HEAD-32366-1209701996-535.16696-5-0 [...] rt.cpan.org>
X-Pobox-Relay-Id: 682BB4FE-183A-11DD-A71A-80001473D85F-07314517!a-sasl-fastnet.pobox.com
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: us-ascii
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id ACDED4D80BB for <bug-CPAN-Mini [...] rt.cpan.org>; Fri, 2 May 2008 07:25:10 -0400 (EDT)
Received: (qmail 12507 invoked from network); 2 May 2008 11:25:10 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 2 May 2008 11:25:10 -0000
Received: from a-sasl-fastnet.sasl.smtp.pobox.com (HELO sasl.smtp.pobox.com) (207.106.133.19) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 May 2008 04:25:06 -0700
Received: from localhost.localdomain (localhost [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 91C204FE1 for <bug-CPAN-Mini [...] rt.cpan.org>; Fri, 2 May 2008 07:25:02 -0400 (EDT)
Received: from knight.manxome.org (208-58-28-7.c3-0.eas-ubr10.atw-eas.pa.cable.rcn.com [208.58.28.7]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 71C984FE0 for <bug-CPAN-Mini [...] rt.cpan.org>; Fri, 2 May 2008 07:25:02 -0400 (EDT)
Received: by knight.manxome.org (Postfix, from userid 502) id E99158024CC; Fri, 2 May 2008 07:24:59 -0400 (EDT)
Delivered-To: cpan-bug+CPAN-Mini [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #16696] [PATCH] add bundle option, allow skip_cleanup in rc file
User-Agent: Mutt/1.5.17 (2007-11-01)
Return-Path: <rjbs [...] cpan.org>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-CPAN-Mini [...] rt.cpan.org
X-Message-Flag: Warning: This sender thinks he is better than you.
Date: Fri, 2 May 2008 07:24:59 -0400
X-Spam-Level: *
X-Planet: Planet of the Apes
Message-Id: <20080502112459.GA59760 [...] knight.local>
To: Yitzchak Scott-Thoennes via RT <bug-CPAN-Mini [...] rt.cpan.org>
From: Ricardo SIGNES <rjbs [...] cpan.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-32349-1209727516-855.16696-0-0 [...] rt.cpan.org>
Content-Length: 564
Download (untitled) / with headers
text/plain 564b
* Yitzchak Scott-Thoennes via RT <bug-CPAN-Mini@rt.cpan.org> [2008-05-02T00:20:01] Show quoted text
> I believe I copied that code from CPAN.pm, so it should certainly work > for existing bundles, and any new bundles that need to be compatible > with older CPAN.pm versions. The only advantage to somehow going through > CPAN would be if new formats of bundles become supported at some point; > is the extra work worth it?
The other advantage is if bugs are found in CPAN.pm, or if the code is changed in any other way that later makes future bugfixes harder to apply. -- rjbs
MIME-Version: 1.0
In-Reply-To: <20051223084710.GA2964 [...] efn.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <20051223084710.GA2964 [...] efn.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-11060-1283638657-1320.16696-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 366
Download (untitled) / with headers
text/plain 366b
Please consider submitting a patch to CPAN to break the bundle expansion code into a reusable component (CPAN::BundleExpander or something) which we can then rely on. Until then, I think this is not appropriate for CPAN::Mini to re-implement. Thanks for your contributions. I look forward to this feature finding its way in differently in the future. -- rjbs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.