Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 611550 - media-libs/hamlib-3.1 : file collision with dev-libs/libprelude-3.1.0
Summary: media-libs/hamlib-3.1 : file collision with dev-libs/libprelude-3.1.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Beierlein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 18:19 UTC by Toralf Förster
Modified: 2017-03-11 19:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,5.53 KB, text/plain)
2017-03-03 18:19 UTC, Toralf Förster
Details
config.log.tbz2 (config.log.tbz2,14.46 KB, application/x-bzip)
2017-03-03 18:19 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,164.67 KB, text/plain)
2017-03-03 18:19 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,22.14 KB, application/x-bzip)
2017-03-03 18:19 UTC, Toralf Förster
Details
media-libs:hamlib-3.1:20170303-115232.log (media-libs:hamlib-3.1:20170303-115232.log,379.25 KB, text/plain)
2017-03-03 18:20 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,46 bytes, application/x-bzip)
2017-03-03 18:20 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-03-03 18:19:43 UTC
 * Detected file collision(s):
 * 
 * 	/usr/lib64/perl5/5.24.1/perllocal.pod
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * dev-libs/libprelude-3.1.0:0::gentoo
 * 	/usr/lib64/perl5/5.24.1/perllocal.pod
 * 
 * Package 'media-libs/hamlib-3.1' NOT merged due to file collisions. If

  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named desktop_20170228-191423) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-5.4.0 *
llvm-config:
3.9.1
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
  [3]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.3.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
Comment 1 Toralf Förster gentoo-dev 2017-03-03 18:19:47 UTC
Created attachment 465836 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-03-03 18:19:50 UTC
Created attachment 465838 [details]
config.log.tbz2
Comment 3 Toralf Förster gentoo-dev 2017-03-03 18:19:53 UTC
Created attachment 465840 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-03-03 18:19:56 UTC
Created attachment 465842 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-03-03 18:20:00 UTC
Created attachment 465844 [details]
media-libs:hamlib-3.1:20170303-115232.log
Comment 6 Toralf Förster gentoo-dev 2017-03-03 18:20:03 UTC
Created attachment 465846 [details]
temp.tbz2
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-03-03 20:50:01 UTC
I'd dare say both are broken ;-).
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-05 00:03:44 UTC
(In reply to Michał Górny from comment #7)
> I'd dare say both are broken ;-).

Yeah.... this is a clear indication that they're doing things outside our standard Perl Module tooling, which has provisions for this problem.

perl-module_src_install() {
  ...
  perl_delete_localpod
}

perl_delete_localpod() {
        debug-print-function $FUNCNAME "$@"

        find "${D}" -type f -name perllocal.pod -delete
        find "${D}" -depth -mindepth 1 -type d -empty -delete
}


Additionally, the EUMM shipped with Perl is patched to not generate this file in the first place: 

https://github.com/gentoo-perl/perl-patchset/blob/perl-5.24/patches/gentoo/EUMM_perllocalpod.diff

Emerge log doesn't incidate perl-core/ExtUtils-MakeMaker is in use either, so that patch should be having its intended effect.

So additional spookyness is in play.
Comment 9 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-05 00:21:47 UTC
There's a PR for the prelude side of this problem: 

https://github.com/gentoo/gentoo/pull/4113
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-05 00:30:00 UTC
make  -f Hamlib-pl.mk install_site


^ I suspect this is the problem. 

That's not how we install perl modules.
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-03-05 02:46:51 UTC
Ok. Think I've nailed it.

1. It uses install_site instead of install, install_site forcibly takes the wrong path.

2. It doesn't set INSTALLPATHS=vendor anywhere in the code, and subsequently also installs the perl bindings in the wrong places (!)

So the changes I'd make here would be :


in src_prepare:

# Correct install target to whatever INSTALLDIRS says and use vendor
# installdirs everywhere
sed -i -e "s#install_site#install#"	\
 -e 's#MAKEFILE="Hamlib-pl.mk"#MAKEFILE="Hamlib-pl.mk" INSTALLDIRS=vendor#' \
 bindings/Makefile.am || die "sed failed patching for perl"


This will not only prevent generation of perllocal.pod, but will install the .pm modules and XS stuff in the right path:

 /usr/lib64/perl5/vendor_perl/5.24.1/

Instead of

 /usr/lib64/perl5/5.24.1/

Which is reserved for perl itself.  

You can add the perl_delete_localpod in addition to this fix, but that's more window dressing fixing side effects than fixing the real problem.
Comment 12 Thomas Beierlein gentoo-dev 2017-03-05 18:03:41 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #11)
> Ok. Think I've nailed it.
> 
> 1. It uses install_site instead of install, install_site forcibly takes the
> wrong path.
> 
> 2. It doesn't set INSTALLPATHS=vendor anywhere in the code, and subsequently
> also installs the perl bindings in the wrong places (!)
> 
> So the changes I'd make here would be :
> 
> 
> in src_prepare:
> 
> # Correct install target to whatever INSTALLDIRS says and use vendor
> # installdirs everywhere
> sed -i -e "s#install_site#install#"	\
>  -e 's#MAKEFILE="Hamlib-pl.mk"#MAKEFILE="Hamlib-pl.mk" INSTALLDIRS=vendor#' \
>  bindings/Makefile.am || die "sed failed patching for perl"
> 
> 
> This will not only prevent generation of perllocal.pod, but will install the
> .pm modules and XS stuff in the right path:
> 
>  /usr/lib64/perl5/vendor_perl/5.24.1/
> 
> Instead of
> 
>  /usr/lib64/perl5/5.24.1/
> 
> Which is reserved for perl itself.  
> 
> You can add the perl_delete_localpod in addition to this fix, but that's
> more window dressing fixing side effects than fixing the real problem.

Just coming back from a short vacation. Give me one or two days to catch up to fix it. And thanks for the analyze.
Comment 13 Göktürk Yüksek archtester gentoo-dev 2017-03-07 20:31:48 UTC
commit 3b105523bb15b3b71fd0b62512fd5bc847adb32e
Author:     Thomas Andrejak <thomas.andrejak@gmail.com>
AuthorDate: Fri Mar 3 23:33:13 2017 +0100
Commit:     Göktürk Yüksek <gokturk@gentoo.org>
CommitDate: Tue Mar 7 15:24:44 2017 -0500

    dev-libs/libprelude: Fix #611550

I'll leave resolving the bug to hamlib maintainers in case there's more they need to discuss.
Comment 14 Thomas Beierlein gentoo-dev 2017-03-11 19:17:16 UTC
Fixed version in tree.

>   media-libs/hamlib: Fix installation for USE=perl (bug #611550).
>   Thanks Toralf for reporting and Kent\n for pointing out how to fix.