From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 23 07:10:15 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74C5516A420 for ; Wed, 23 Nov 2005 07:10:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B97AB43D62 for ; Wed, 23 Nov 2005 07:10:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jAN7ADqk094512 for ; Wed, 23 Nov 2005 07:10:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jAN7ADSL094495; Wed, 23 Nov 2005 07:10:13 GMT (envelope-from gnats) Resent-Date: Wed, 23 Nov 2005 07:10:13 GMT Resent-Message-Id: <200511230710.jAN7ADSL094495@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anton Berezin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 584E816A41F for ; Wed, 23 Nov 2005 07:05:28 +0000 (GMT) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [217.157.39.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA73743D49 for ; Wed, 23 Nov 2005 07:05:27 +0000 (GMT) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id D9862125451; Wed, 23 Nov 2005 08:05:25 +0100 (CET) Message-Id: <20051123070525.D9862125451@heechee.tobez.org> Date: Wed, 23 Nov 2005 08:05:25 +0100 (CET) From: Anton Berezin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/89448: bsd.port.mk: improve behavior when dealing with versioned dependencies X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anton Berezin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 07:10:15 -0000 >Number: 89448 >Category: ports >Synopsis: bsd.port.mk: improve behavior when dealing with versioned dependencies >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 23 07:10:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Anton Berezin >Release: FreeBSD 5.4-STABLE amd64 >Organization: >Environment: >Description: Currently, the existing mechanism of version dependencies (BUILD_DEPENDS=pkg_a>0.42:pkg_a_port) behaves somewhat counter-intuitively when an incompatible with this specification version of pkg_a is installed (say, version 0.21). Namely, the "not found" condition is detected and the build of the current version of pkg_a_port is commensed. This leads nowhere, however, since the install stage refuses to install a newer version of pkg_a on top of already installed version. This is a good thing in and by itself, but the behavior can and should be improved, so that the user gets earlier indication that something is amiss and a less cryptic error message. >How-To-Repeat: >Fix: The proposed fix, upon detection of the condition described above, tries to determine whether another, incompatible version of the package is installed. If that is the case, the build process is interrupted immediately, with a (hopefully) sane error message. Thanks to lth for poking me about this and to him and to lars@balker.dk for testing and discussion. Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.518 diff -u -r1.518 bsd.port.mk --- bsd.port.mk 8 Nov 2005 09:02:51 -0000 1.518 +++ bsd.port.mk 23 Nov 2005 06:54:11 -0000 @@ -4343,6 +4343,16 @@ ${ECHO_MSG} "===> ${PKGNAME} depends on package: $$prog - not found"; \ notfound=1; \ fi; \ + if [ $$notfound != 0 ]; then \ + inverse_dep=`${ECHO_CMD} $$prog | ${SED} \ + -e 's/<=/=gt=/; s/=/=lt=/; s/>/=le=/' \ + -e 's/=gt=/>/; s/=ge=/>=/; s/=lt=/ Found $$pkg_info, but you need to upgrade to $$prog."; \ + exit 1; \ + fi; \ + fi; \ elif ${WHICH} "$$prog" > /dev/null 2>&1 ; then \ ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ if [ ${_DEPEND_ALWAYS} = 1 ]; then \ >Release-Note: >Audit-Trail: >Unformatted: