hotshot has asked for the wisdom of the Perl Monks concerning the following question:

Hello again!

I following PodMaster's advice and intalled the cpan2rpm package to be able creating moduls rpm's.
Now I'm trying to create rpm for the XML::DOM module (using 'cpan2rpm XML::DOM'), except for a warning the libwww-perl isn't installed I get the following errors in the installation procedure after the Scanning cache /local/src/.cpan/build for sizes stage:
Removing previously used /local/src/.cpan/build/XML-DOM-1.41 sh: -c: line 1: syntax error near unexpected token `%(e' sh: -c: line 1: `cp /local/src/.cpan/sources/authors/id/T/TJ/TJMATHER/ +XML-DOM-1.41.tar.gz %(eval/%(eval/rpms/SOURCES' sh: -c: line 1: syntax error near unexpected token `%(e' sh: -c: line 1: `tar -tzvf %(eval/%(eval/rpms/SOURCES/XML-DOM-1.41.tar +.gz' Tarball extraction: [%(eval/%(eval/rpms/SOURCES/XML-DOM-1.41.tar.gz] sh: -c: line 1: syntax error near unexpected token `%(e' sh: -c: line 1: `tar -xz --directory /tmp/cpan2rpm -f %(eval/%(eval/rp +ms/SOURCES/XML-DOM-1.41.tar.gz' sh: -c: line 1: syntax error near unexpected token `%(e' sh: -c: line 1: `tar -tzvf %(eval/%(eval/rpms/SOURCES/XML-DOM-1.41.tar +.gz' Metadata retrieval No such file or directory at /usr/bin/cpan2rpm line 223. -- Generating spec file -- writefile('%(eval/%(eval/rpms/SPECS/XML-DOM.spec'): No such file or di +rectory. Stopped at /usr/bin/cpan2rpm line 694. -- Done --
Anyone know what can it be? it's seems like it can't find /usr/bin/cpan2rpm, but I installed cpan2rpm just before that, what's going on here?

Hotshot

Replies are listed 'Best First'.
Re: problems with cpan2rpm
by robartes (Priest) on Nov 27, 2002 at 10:53 UTC
    Your problem is not that it can't find cpan2rpm, it can find it just fine, but this:
    Tarball extraction: [%(eval/%(eval/rpms/SOURCES/XML-DOM-1.41.tar.gz] sh: -c: line 1: syntax error near unexpected token `%(e' sh: -c: line 1: `tar -xz --directory /tmp/cpan2rpm -f %(eval/%(eval/rp +ms/SOURCES/XML-DOM-1.41.tar.gz'
    And variations thereon. cpan2rpm is trying to operate on files called %(eval/%(eval etcetera. These files do not exist. Apparently, something has gone wrong in cpan2rpm - it looks like those sequences are meant to be paths to your rpms directory, but somehow things got garbled. I would suggest having a look in cpan2rpm, near lines 223 and 694 to see how these values are supposed to be filled in.

    CU
    Robartes-

      yeh I noticed that my note at the end was wrong, but doesn't cpan2rpm is mature enough not to fall for these things?

      Hotshot
        I don't know - I've never had the pleasure of working with said beast before. I just noticed what it tried to do from the output you quoted. Sorry I can't be more helpful than that :)

        CU
        Robartes-