[Cpan2rpm-general] --name option not working
Brought to you by:
ekkis
From: Ian B. <ib...@on...> - 2003-05-27 21:42:41
|
I am trying to build perl/Tk. cpan2rpm is getting the wrong value from the MakeMaker metadata. Probably because Tk overloads MakeMaker producing a really complicated Makefile.PL. cpan2rpm gets back "Tk::Text", how I can't figure out. The problem is that I can't set the name with the --name option but it doesn't work. The metadata always overrides it. cpan2rpm --name Tk Tk-800.024 I fixed the problem with a single line fix although putting in a if block would be more elegant. I have appended the patch which includes some output statements. - Ian --- cpan2rpm-2.018/cpan2rpm.orig Fri May 2 00:16:30 2003 +++ cpan2rpm-2.018/cpan2rpm Tue May 27 14:38:14 2003 @@ -396,8 +399,12 @@ my $msg = "Unable to build module, the following dependencies have failed:\ "; die "$msg\n " . join("\n ", @deps) . "\nStopped" if @deps; + print "Dependencies: ", join(', ', keys %$deps), "\n"; + # figure out package name + ($info{module} = $info{name}) =~ s/::/-/g if $info{name}; + $info{module} ||= $meta{DISTNAME} || $meta{NAME}; if (!$info{module}) { # for directories, guess at the tarball name @@ -417,6 +424,8 @@ die "No package name available. Stopped" unless $info{name}; + print "Name: $info{name}\n"; + $info{spec} ||= "$RPMDIR{SPECS}/$info{name}.spec"; |