Bug 137855 - bsd.port.mk - early identify port conflicts
Summary: bsd.port.mk - early identify port conflicts
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-16 20:20 UTC by Piotr Smyrak
Modified: 2010-12-29 07:45 UTC (History)
0 users

See Also:


Attachments
file.diff (1.23 KB, patch)
2009-08-16 20:20 UTC, Piotr Smyrak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Smyrak 2009-08-16 20:20:04 UTC
Currently the port build checks for existing conflicts very late after install-message target. 

Just imagine a situation where one has to download a big tarball, build it, and out of sudden, when everything is prepared, even dependences were installed, the port will refuse to cooperate due to a conflict. Fine if it can be safely resolved, but quite annoying, when the conflicting app is needed and cannot be removed. 

Moving check-conflicts target before check-depends into _SANITY_SEQ sounds quite logical and safe. See attached patch.

Fix: Apply the attached patch

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-08-16 23:04:53 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Portmgr territory.
Comment 2 dfilter service freebsd_committer freebsd_triage 2009-12-29 10:26:12 UTC
miwi        2009-12-29 10:25:55 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.port.mk 
    devel/bcc            Makefile 
    devel/error          Makefile 
    devel/linux_kdump    Makefile 
    devel/plan9port      Makefile 
    dns/ldns             Makefile 
    editors/mined        Makefile 
    games/wesnoth        Makefile 
    games/wesnoth-devel  Makefile 
    games/xmulti         Makefile 
    games/xscorch        Makefile 
    german/manpages      Makefile 
    lang/erlang          Makefile 
    lang/gcc34           Makefile 
    lang/gnat-gcc41      Makefile 
    lang/gnat-gcc42      Makefile 
    lang/gnat-gcc43      Makefile 
    lang/gnat-gcc44      Makefile 
    misc/freedialog/files patch-aa 
    misc/shuffle         Makefile 
    net/htpdate          Makefile 
    net/mopd             Makefile 
    net/v6eval           Makefile 
    palm/p5-Palm         Makefile 
    ports-mgmt/portbrowser Makefile 
    print/enscriptfonts  Makefile 
    print/perlftlib      Makefile 
    security/qident      Makefile 
    sysutils/dc42wrap    Makefile 
    sysutils/heirloom    Makefile 
    sysutils/readlink    Makefile 
    sysutils/wmpccard    Makefile 
    textproc/freegrep/files patch-aa 
    www/p5-AMF-Perl      Makefile 
    x11/chameleon/files  Makefile 
    x11-toolkits/p5-Prima Makefile 
  Log:
  - Convert NOMANCOMPRESS to NO_MANCOMPRESS to sync with src
  
  PR:     ports/136065 ports/127469
  Submitted by:   N.J. Mann <njm@njm.me.uk> and Aldis Berjoza <killasmurf86@gmail.com>
  
  - Early identify port CONFLICTS
  
  PR:     137855
  Submitted by:           Piotr Smyrak <smyru@heron.pl>
  
  - Add --no-same-permissions to the EXTRACT_AFTER_ARGS command.
  
  Tijl Coosemans has been reported an issue that when root is extracting from the
  tarball, and the tarball contains world writable files
  (sysutils/policykit as an example), there is a chance that the files
  gets changed by malicious third parties right after the extraction,
  which makes it possible to inject code into the package thus compromise
  the system.
  
  Submitted by:   Tijl Coosemans <tijl@coosemans.org> Xin LI (delphij@)
  
  - Fix some whitespaces
  
  Tested with:    exp-run
  
  Revision  Changes    Path
  1.632     +15 -16    ports/Mk/bsd.port.mk
  1.13      +1 -1      ports/devel/bcc/Makefile
  1.5       +1 -1      ports/devel/error/Makefile
  1.31      +1 -1      ports/devel/linux_kdump/Makefile
  1.29      +1 -1      ports/devel/plan9port/Makefile
  1.15      +1 -1      ports/dns/ldns/Makefile
  1.18      +1 -1      ports/editors/mined/Makefile
  1.78      +2 -2      ports/games/wesnoth-devel/Makefile
  1.75      +2 -2      ports/games/wesnoth/Makefile
  1.9       +1 -1      ports/games/xmulti/Makefile
  1.25      +1 -1      ports/games/xscorch/Makefile
  1.24      +1 -1      ports/german/manpages/Makefile
  1.145     +1 -1      ports/lang/erlang/Makefile
  1.252     +1 -1      ports/lang/gcc34/Makefile
  1.13      +1 -1      ports/lang/gnat-gcc41/Makefile
  1.16      +1 -1      ports/lang/gnat-gcc42/Makefile
  1.19      +1 -1      ports/lang/gnat-gcc43/Makefile
  1.3       +1 -1      ports/lang/gnat-gcc44/Makefile
  1.2       +1 -1      ports/misc/freedialog/files/patch-aa
  1.7       +1 -1      ports/misc/shuffle/Makefile
  1.19      +1 -1      ports/net/htpdate/Makefile
  1.17      +1 -1      ports/net/mopd/Makefile
  1.20      +1 -1      ports/net/v6eval/Makefile
  1.9       +1 -1      ports/palm/p5-Palm/Makefile
  1.13      +1 -1      ports/ports-mgmt/portbrowser/Makefile
  1.15      +1 -1      ports/print/enscriptfonts/Makefile
  1.28      +1 -1      ports/print/perlftlib/Makefile
  1.11      +1 -1      ports/security/qident/Makefile
  1.3       +1 -1      ports/sysutils/dc42wrap/Makefile
  1.16      +1 -1      ports/sysutils/heirloom/Makefile
  1.7       +1 -1      ports/sysutils/readlink/Makefile
  1.14      +1 -1      ports/sysutils/wmpccard/Makefile
  1.4       +1 -1      ports/textproc/freegrep/files/patch-aa
  1.9       +1 -1      ports/www/p5-AMF-Perl/Makefile
  1.19      +1 -1      ports/x11-toolkits/p5-Prima/Makefile
  1.2       +1 -1      ports/x11/chameleon/files/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2009-12-29 10:28:59 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 4 kamikaze 2010-02-06 10:18:35 UTC
I request revocation.

I think the example below sufficiently signifies why.

The discussion
http://lists.freebsd.org/pipermail/freebsd-questions/2010-January/211053.html
shows that I'm not alone with my opinion. I don't care about
wasting CPU time, not when the alternative is to waste my
precious brain time:

# portmaster -Do lang/perl5.10 lang/perl5.8
===>>> Currently installed version: perl-threaded-5.8.9_3
===>>> Port directory: /usr/ports/lang/perl5.10
===>>> Launching 'make checksum' for lang/perl5.10 in background
===>>> Gathering dependency list for lang/perl5.10 from ports
===>>> No dependencies for lang/perl5.10

===>>> Starting build for lang/perl5.10 <<<===

===>>> All dependencies are up to date

===>  Cleaning for perl-threaded-5.10.1


===>  perl-threaded-5.10.1 conflicts with installed package(s): 
      perl-threaded-5.8.9_3

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/lang/perl5.10.

===>>> make failed for lang/perl5.10
===>>> Aborting update
Comment 5 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2010-02-06 10:54:00 UTC
State Changed
From-To: closed->open

Reopen this, as I agree with the submitter, even if there could be a 
better sulution that to back this out.
Comment 6 Beat Gaetzi freebsd_committer freebsd_triage 2010-02-06 11:33:59 UTC
There are some situations where ports conflicts already at build stage
and thats why CONFLICTS should be checked prior to the build:

http://lists.freebsd.org/pipermail/freebsd-gecko/2009-December/000577.html

So please do not back out this change.
Comment 7 Martin Wilke freebsd_committer freebsd_triage 2010-12-29 07:45:39 UTC
State Changed
From-To: open->closed

already fixed.