pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48694: perllink creates and ignores package conflicts



>Number:         48694
>Category:       pkg
>Synopsis:       perllink creates and ignores package conflicts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 31 17:25:00 +0000 2014
>Originator:     Jim Bernard
>Release:        NetBSD 6.99.31
>Organization:
>Environment:
System: NetBSD 6.99.31: Sat Feb 15 18:45:02 MST 2014 i386
Architecture: i386
Machine: i386
>Description:
        When perl packages are installed, the script perllink (from lang/perl5)
        is used to link bin and man1 files installed within the perl library
        into /usr/pkg/bin and /usr/pkg/man/man1.  These are apparently created
        and deleted unconditionally, without regard to whether doing so may
        conflict with files owned by other packages.  Furthermore, no record of
        their installation is made in the packing list, so other packages 
installed
        subsequently have no way of knowing whether they may overwrite links
        created by perllink.

>How-To-Repeat:
        I noticed this with textproc/bibparse and textproc/p5-Text-BibTeX,
        which both install binaries called "bibparse" and "biblex".  Those
        from the bibparse package are included in its packing list, while
        those from the p5-Text-BibTeX package are not in its packing list.

        To demonstrate:

        % pkg_add bibparse
        % ls -ltc /usr/pkg/bin | head -10
        total 175178
        -rwxr-xr-x    1 root  wheel     15368 Mar 31 10:42 bibunlex
        -rwxr-xr-x    1 root  wheel     27668 Mar 31 10:42 bibparse
        -rwxr-xr-x    1 root  wheel     19120 Mar 31 10:42 biblex
        -rwxr-xr-x    1 root  wheel       642 Mar 31 10:42 bibdup
        ...

        % pkg_add p5-Text-BibTeX
        [no output]

        % ls -ltc /usr/pkg/bin | head -10
        total 175130
        lrwxr-xr-x    1 root  wheel        38 Mar 31 10:43 dumpnames -> 
../lib/perl5/vendor_perl/bin/dumpnames
        lrwxr-xr-x    1 root  wheel        37 Mar 31 10:43 bibparse -> 
../lib/perl5/vendor_perl/bin/bibparse
        lrwxr-xr-x    1 root  wheel        35 Mar 31 10:43 biblex -> 
../lib/perl5/vendor_perl/bin/biblex
        -rwxr-xr-x    1 root  wheel     15368 Mar 31 10:42 bibunlex
        -rwxr-xr-x    1 root  wheel       642 Mar 31 10:42 bibdup
        ...
        [The bibparse and biblex files belonging to the bibparse package
        were sliently overwritten by links.  pkg_info -F still reports them
        as belonging to the bibparse package.  Also, the biblex program
        from p5-Text-BibTeX is incompatible with the bibunlex program from
        bibparse, so "biblex somebibfile | bibunlex" fails at this point.]

        % pkg_delete bibparse
        original MD5 checksum failed, not deleting: /usr/pkg/bin/biblex
        original MD5 checksum failed, not deleting: /usr/pkg/bin/bibparse
        pkg_delete: couldn't entirely delete package `bibparse-1.06'

        % ls -ltc /usr/pkg/bin | head -10
        total 175112
        lrwxr-xr-x    1 root  wheel        38 Mar 31 10:43 dumpnames -> 
../lib/perl5/vendor_perl/bin/dumpnames
        lrwxr-xr-x    1 root  wheel        37 Mar 31 10:43 bibparse -> 
../lib/perl5/vendor_perl/bin/bibparse
        lrwxr-xr-x    1 root  wheel        35 Mar 31 10:43 biblex -> 
../lib/perl5/vendor_perl/bin/biblex

        % pkg_delete p5-Text-BibTeX
        [no output]


        Alternatively, install in the opposite order:

        % pkg_add p5-Text-BibTeX
        % ls -ltc /usr/pkg/bin | head -10
        total 175112
        lrwxr-xr-x    1 root  wheel        38 Mar 31 10:46 dumpnames -> 
../lib/perl5/vendor_perl/bin/dumpnames
        lrwxr-xr-x    1 root  wheel        37 Mar 31 10:46 bibparse -> 
../lib/perl5/vendor_perl/bin/bibparse
        lrwxr-xr-x    1 root  wheel        35 Mar 31 10:46 biblex -> 
../lib/perl5/vendor_perl/bin/biblex

        % pkg_add bibparse
        % ls -ltc /usr/pkg/bin | head -10
        total 175178
        -rwxr-xr-x    1 root  wheel     15368 Mar 31 10:46 bibunlex
        -rwxr-xr-x    1 root  wheel     27668 Mar 31 10:46 bibparse
        -rwxr-xr-x    1 root  wheel     19120 Mar 31 10:46 biblex
        -rwxr-xr-x    1 root  wheel       642 Mar 31 10:46 bibdup
        lrwxr-xr-x    1 root  wheel        38 Mar 31 10:46 dumpnames -> 
../lib/perl5/vendor_perl/bin/dumpnames
        [The bibparse and biblex links belonging to the p5-Text-BibTeX
        package were overwritten by files.  pkg_info -F reports them as
        belonging to the bibparse package.]

        % pkg_delete p5-Text-BibTeX
        [no output]

        % ls -ltc /usr/pkg/bin | head -10
        total 175130
        -rwxr-xr-x    1 root  wheel     15368 Mar 31 10:46 bibunlex
        -rwxr-xr-x    1 root  wheel       642 Mar 31 10:46 bibdup
        [The bibparse and biblex files belonging to the bibparse pkg were
        silently deleted.  pkg_info -L still reports them as parts of
        the bibparse package.]

        % pkg_delete bibparse
        pkg_delete: Couldn't remove /usr/pkg/bin/biblex
        pkg_delete: Couldn't remove /usr/pkg/bin/bibparse

>Fix:



Home | Main Index | Thread Index | Old Index