aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-07-05 20:29:35 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-07-05 20:29:35 +0800
commit5dde63ce01aed0567644d39e07463fe0bd65706d (patch)
tree6de9c4edd734250f5c888c26abe818d2f5c9000c /Mk
parent33b8fdf590e3b7733e9a80cb6495f7ad2e81a273 (diff)
downloadfreebsd-ports-gnome-5dde63ce01aed0567644d39e07463fe0bd65706d.tar.gz
freebsd-ports-gnome-5dde63ce01aed0567644d39e07463fe0bd65706d.tar.zst
freebsd-ports-gnome-5dde63ce01aed0567644d39e07463fe0bd65706d.zip
- Fix pkg2ng due to UID/ID not being defined.
Pkg-1.1.4 will define UID=0 when sourcing bsd.pkgng.mk directly. This extra defined(UID) can eventually be removed, but is needed for backwards compatibility for now. Reported by: uqs Reviewed by: bapt With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.pkgng.mk8
1 files changed, 1 insertions, 7 deletions
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
index 5b709ef8371f..17a69fb28ef5 100644
--- a/Mk/bsd.pkgng.mk
+++ b/Mk/bsd.pkgng.mk
@@ -36,12 +36,6 @@ ACTUAL-PACKAGE-DEPENDS?= \
${PKG_QUERY} "%dn: {origin: %do, version: \"%dv\"}" " " ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,:C,${PORTSDIR}/,,} 2>/dev/null || : ; \
fi
-# Redefine. pkg2ng calls directly 'make -f bsd.pkgng.mk' which needs UID to be defined
-
-.if !defined(UID)
-UID!= ${ID} -u
-.endif
-
.if !target(fake-pkg)
fake-pkg:
.if !defined(NO_PKG_REGISTER)
@@ -267,7 +261,7 @@ check-already-installed:
.if !target(deinstall)
deinstall:
-.if ${UID} != 0 && !defined(INSTALL_AS_USER)
+.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER)
@${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
@cd ${.CURDIR} && \
${SU_CMD} "${MAKE} ${.TARGET}"