From owner-p4-projects@FreeBSD.ORG Thu Jun 22 16:45:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 752A216A4D8; Thu, 22 Jun 2006 16:45:12 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 508DC16A4CE for ; Thu, 22 Jun 2006 16:45:12 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D480D4424E for ; Thu, 22 Jun 2006 16:15:04 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5MGF4CD077506 for ; Thu, 22 Jun 2006 16:15:04 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5MGF45b077499 for perforce@freebsd.org; Thu, 22 Jun 2006 16:15:04 GMT (envelope-from gabor@FreeBSD.org) Date: Thu, 22 Jun 2006 16:15:04 GMT Message-Id: <200606221615.k5MGF45b077499@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 99818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 16:45:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=99818 Change 99818 by gabor@spitfire on 2006/06/22 16:14:09 Only use pkg_info for checking if the given port is already installed when DESTDIR is not set. Check PKG_DBDIR otherwise. Affected files ... .. //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#7 edit Differences ... ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.port.mk#7 (text+ko) ==== @@ -3629,13 +3629,12 @@ # Utility targets follow -### FIXME: pkg_info in DESTDIR - .if !target(check-already-installed) check-already-installed: .if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) @${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed" @${MKDIR} ${PKG_DBDIR} +.if !defined(DESTDIR) @already_installed=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ if [ -n "$${already_installed}" ]; then \ for p in $${already_installed}; do \ @@ -3648,8 +3647,9 @@ fi; \ fi; \ done; \ - fi; \ - if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \ + fi; +.else + @if [ -d ${PKG_DBDIR}/${PKGNAME} -o -n "$${found_package}" ]; then \ if [ -d ${PKG_DBDIR}/${PKGNAME} ]; then \ ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ else \ @@ -3662,6 +3662,7 @@ ${ECHO_CMD} " in your environment or the \"make install\" command line."; \ exit 1; \ fi +.endif .else @${DO_NADA} .endif