Kenneth Porter <shiva(a)sewingwitch.com> writes:
--On Tuesday, April 26, 2005 12:38 AM -0400 Chip Turner
<cturner(a)pattern.net> wrote:
> It should automatically fill in version, but cpanflute2 operates from
> the tarball, so it bases it on the version in the tarball's filename.
I'd definitely like to see cpanflute2 be a bit smarter about
package/directory/tarball names. I'd like to see it peek inside the
tarball directory structure to cook up the right %setup directive,
allowing the tarball name to have no relation to the BUILD directory
name.
Until recently I needed a patched version of MIME::tools that came in
a file named MIME-tools-5.411a-RP-Patched-3.tar.gz which confused
cpanflute2 badly. (The package has since been adopted by the
MIMEDefang maintainer and has a more reasonable tarball filename.)
Your wish is my command. cpanflute2 will now inspect the tarball
(assuming it can; gotta have perl-Archive-Tar and perl-IO-Zlib). If
the first directory of every file in the tarball is consistent, then
that is what will be passed to %setup (with the version replaced with
%{version}, if possible). It falls back to the old behavior if it
cannot determine a common prefix. Will this suffice for your needs?
> Downloading from CPAN is, unfortunately, not an entirely clean
> operation.
What does CPAN.pm do to accomplish this?
Lots. Remember the first time you installed CPAN.pm and it found
mirrors, used about six differnt modules to download from, prompted
you for lots of info, etc? It left its droppings in ~/.cpan of all
the decisions it made. In essence, basically you have to download an
index of cpan and inspect it to find what the latest version of a
module is, and then find the path to it. There seems to be no API to
do this cleanly against, say,
search.cpan.org. I've submitted a
nebulous feature request to s.c.o, but no telling how/when/if that
will work.
I recently needed to install CGI::Builder and after a brief attempt
at
using cpanflute2, I gave up and went to /usr/bin/cpan to install the
associated Bundle module. It would be great if some kind RPM mechanism
was available to do the equivalent.
<
http://search.cpan.org/~domizio/CGI-Builder-1.26+/lib/Bundle/CGI/Builder/...
Was what was blocking you the manpage thing and the %setup directory,
or something else?
Chip
--
Chip Turner cturner(a)pattern.net