Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2014 11:53:47 +1000
From:      Robert Backhaus <robbak@robbak.com>
To:        "Ronald F. Guilmette" <rfg@tristatelogic.com>
Cc:        Freebsd_mailinglist_PORTS <freebsd-ports@freebsd.org>
Subject:   Re: PORT META: Installed files conflict between ports
Message-ID:  <CABG_4jn0_Days5_2AktU3BQjN98mLyKkJUR4AfCQKHQi6cdQzA@mail.gmail.com>
In-Reply-To: <86305.1400624755@server1.tristatelogic.com>
References:  <86305.1400624755@server1.tristatelogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The fact that those two ports install conflicting binaries isn't a problem.
The problem is that you were allowed to install the second port.

With mplayer, there is a correct CONFLICTS line in mplayer2, but does not
appear to be one in mplayer. But both samba ports seem to have the correct
CONFLICTS line, but that may have been fixed after you installed the port.


On 21 May 2014 08:25, Ronald F. Guilmette <rfg@tristatelogic.com> wrote:

>
> I just submitted the following PR:
>
>   http://www.freebsd.org/cgi/query-pr.cgi?pr=190027
>
> I was a bit flabberghasted to believe that such file conflicts between
> ports was even possible.  Seeing that it is possible prompted me to
> write the attached small Perl script, which can quickly find all such
> cases among a set of installed ports on a given system.
>
> To use this simple script, place it somewhere on your path and name
> it "pccheck" (Port Conflict Check).  Then do the following:
>
>     cd /var/db/pkg
>     pccheck *
>
> That will tell you if any of your installed ports have installed any
> files which any other of your installed ports also believe that they
> also have installed.
>
> When I ran it on my system, I got this, which is worrying, to say the
> least:
>
> mplayer2-2.0.20130428_4: Conflict -- file=/usr/local/bin/mplayer
>  pkg=mplayer-1.1.r20140418
> mplayer2-2.0.20130428_4: Conflict -- file=/usr/local/man/man1/mplayer.1.gz
>  pkg=mplayer-1.1.r20140418
> samba36-nmblookup-3.6.23: Conflict -- file=/usr/local/bin/nmblookup
>  pkg=samba36-3.6.23
> samba36-nmblookup-3.6.23: Conflict --
> file=/usr/local/man/man1/nmblookup.1.gz  pkg=samba36-3.6.23
> samba36-nmblookup-3.6.23: Conflict --
> file=/usr/local/man/man5/smb.conf.5.gz  pkg=samba36-3.6.23
>
> How does this sort of problem even creep in (to the ports tree)?  Is
> there nothing in place which prevents it from arising?
>
>
> ============================================================================
> #!/usr/bin/perl -w
>
> use strict;
>
> my $origin;
> my %installed_files;
>
> foreach my $arg (@ARGV) {
>   next unless (-d "$arg");
>   open (IFILE, "<$arg/+CONTENTS") || die "$arg: Open failed\n";
>   while (my $line = <IFILE>) {
>     chop $line;
>     if ($line =~ m/^\@/) {
>       if ($line =~ m/^\@conflicts /) {
> #        print STDERR ("$arg: $line\n");
>         # do nothing
>       } elsif ($line =~ m/^\@cwd /) {
>         $origin = $';
>       } else {
>         # do nothing
>       }
>     } else {
>       next if ($line =~ m/^\+[A-Z]/);
>       die "$arg: Origin not defined\n" unless (defined ($origin));
>       my $fullpath = "$origin/$line";
> #      print "$fullpath\n";
>       if (exists ($installed_files{$fullpath})) {
>         print STDERR ("$arg: Conflict -- file=$fullpath
>  pkg=$installed_files{$fullpath}\n");
>       } else {
>         $installed_files{$fullpath} = $arg;
>       }
>     }
>   }
>   close (IFILE);
> }
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABG_4jn0_Days5_2AktU3BQjN98mLyKkJUR4AfCQKHQi6cdQzA>