mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-29 10:18:30 +00:00
Fix conflict handling when pkgng is used.
Submitted by: Garrett Cooper <yanegomi@gmail.com>
This commit is contained in:
parent
4c1f4420d8
commit
05659b4050
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296867
@ -119,13 +119,13 @@ fake-pkg:
|
||||
.if !target(check-build-conflicts)
|
||||
check-build-conflicts:
|
||||
.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK)
|
||||
@conflicts_with=; \
|
||||
@conflicts_with=$$( \
|
||||
${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} \
|
||||
| while read pkgname prfx orgn; do \
|
||||
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
|
||||
conflicts_with="$${conflicts_with} $${pkgname}"; \
|
||||
${ECHO_CMD} -n " $${pkgname}"; \
|
||||
fi; \
|
||||
done; \
|
||||
done); \
|
||||
if [ -n "$${conflicts_with}" ]; then \
|
||||
${ECHO_MSG}; \
|
||||
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
|
||||
@ -143,13 +143,13 @@ check-build-conflicts:
|
||||
.if !target(identify-install-conflicts)
|
||||
identify-install-conflicts:
|
||||
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS)
|
||||
@conflicts_with=; \
|
||||
@conflicts_with=$$( \
|
||||
${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} \
|
||||
| while read pkgname prfx orgn; do \
|
||||
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
|
||||
conflicts_with="$${conflicts_with} $${pkgname}"; \
|
||||
${ECHO_CMD} -n " $${pkgname}"; \
|
||||
fi; \
|
||||
done; \
|
||||
done); \
|
||||
if [ -n "$${conflicts_with}" ]; then \
|
||||
${ECHO_MSG}; \
|
||||
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
|
||||
@ -168,13 +168,13 @@ identify-install-conflicts:
|
||||
check-install-conflicts:
|
||||
.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS)
|
||||
.if defined(DEFER_CONFLICTS_CHECK)
|
||||
@conflicts_with; \
|
||||
@conflicts_with=$$( \
|
||||
${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} \
|
||||
| while read pkgname prfx orgn; do \
|
||||
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
|
||||
conflicts_with="$${conflicts_with} $${pkgname}"; \
|
||||
${ECHO_CMD} -n " $${pkgname}"; \
|
||||
fi; \
|
||||
done; \
|
||||
done); \
|
||||
if [ -n "$${conflicts_with}" ]; then \
|
||||
${ECHO_MSG}; \
|
||||
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
|
||||
@ -186,13 +186,13 @@ check-install-conflicts:
|
||||
exit 1; \
|
||||
fi
|
||||
.else
|
||||
@conflicts_with=; \
|
||||
@conflicts_with=$$( \
|
||||
${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} \
|
||||
| while read pkgname prfx orgn; do \
|
||||
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
|
||||
conflicts_with="$${conflicts_with} $${pkgname}"; \
|
||||
${ECHO_CMD} -n " $${pkgname}"; \
|
||||
fi; \
|
||||
done; \
|
||||
done); \
|
||||
if [ -n "$${conflicts_with}" ]; then \
|
||||
${ECHO_MSG}; \
|
||||
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
|
||||
|
Loading…
Reference in New Issue
Block a user