Bug#632871: Problem in dpkg-cross/perl regexp

Steve McIntyre <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <20110718133044.GH19838__48534.6887530342$1310996012$gmane$org@linaro.org>
On Mon, Jul 18, 2011 at 02:25:33PM +0100, Steve McIntyre wrote:
>On Sun, Jul 17, 2011 at 04:51:20PM +0100, Neil Williams wrote:
>>tag 632871 - patch
>>tag 632871 + moreinfo
>>quit
>>
>>The problem with the patch is that it isn't specific for perl itself.
>>
>>$ find /usr/lib -name Config.pm 
>>/usr/lib/perl/5.12.4/Config.pm
>>/usr/lib/perl/5.12.4/Encode/Config.pm
>>/usr/lib/perl5/AptPkg/Config.pm
>>
>>First one is for perl-base, second perl (are both relevant?), third the
>>Apt perl bindings. :-(
>
>Bugger, yes.
>
>>packages.debian.org search lists quite a few more (parrot and a few
>>random perl modules). (Is Config_heavy.pm a local / during build-only
>>module? Can't find that in Debian.)
>
>They're both generated by the cross-build of perl (#633884). Config.pm
>is the core config script used by the Makefile in a perl module to
>work out config. It, in turn, requires Config_heavy.pm.
>
>>I can't see a good way out of this though. The name of the file is just
>>too obvious and common and the location varies by version.
>
>  \/usr\/lib\/perl\/v\d+\.\d+\.\d+\/Config.pm
>
>might work? i.e. tie it down. Of course, with m-a this path is going
>to change at the same time as a lot of dpkg-cross has to change (or
>even goes away?)

Just tested:

                } elsif (m:^/usr/(lib/perl/\d+\.\d+\.\d/(Config.pm|Config_heavy.pl)):) {
                        # the perl cross-configure scripts
                        link_file("$src$_", "$dst$crossdir/$1") or goto fail;

seems to do the right thing for me, and is much more specific. Is that
better for you?

Cheers,
-- 
Steve McIntyre
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.