Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2022-11-07 22:57:21 +0300
committerBryan Drewery <bryan@shatow.net>2022-11-07 23:24:04 +0300
commitd92b679189a8174359c0c818d247ebf3cc99f875 (patch)
tree9ab7ca9ea7142499aeb5c399bb84c1ec0fb45a9c
parentf5a009c9399a4a398bd8a345bfdb13db60d4e43e (diff)
clean_pool: Remove some dead IGNORED handling.
This was added in 5d6aef4b8f but is not needed due to both gather_ports_vars() and compute_deps() not processing deps of IGNORED ports. Handling for those came in da49bc02a8 and 06b67be81c01b9. Primarily it is due to compute_deps() not relating the IGNORED dependency to the port that would have been skipped if it were not for it already being IGNORED. Add some extra comments about this. Tweak the bulk-ignore-and-skipped.sh test for this slightly to capture an ordering requirement, and add comments explaining the expectations.
-rwxr-xr-xsrc/share/poudriere/common.sh15
-rw-r--r--test-ports/omnibus/misc/Makefile1
-rw-r--r--test-ports/omnibus/misc/foop-IGNORED/Makefile27
-rw-r--r--test-ports/omnibus/misc/foop-IGNORED/pkg-descr3
-rw-r--r--test-ports/omnibus/misc/foop-IGNORED/pkg-plist52
-rw-r--r--test-ports/omnibus/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile1
-rw-r--r--test/bulk-flavor-ignore-all.sh2
-rw-r--r--test/bulk-ignore-and-skipped.sh9
-rw-r--r--test/bulk-overlay-all.sh2
-rw-r--r--test/common.bulk.sh1
10 files changed, 99 insertions, 14 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh
index 1234a489..23a6bb24 100755
--- a/src/share/poudriere/common.sh
+++ b/src/share/poudriere/common.sh
@@ -5125,13 +5125,6 @@ clean_pool() {
# Cleaning queue (pool is cleaned here)
pkgqueue_done "${pkgname}" "${clean_rdepends}" | \
while mapfile_read_loop_redir skipped_pkgname; do
- # Don't skip listed ports that are also IGNORED. They
- # should be accounted as IGNORED.
- if [ "${clean_rdepends}" = "ignored" ] && \
- shash_exists pkgname-ignore "${skipped_pkgname}" && \
- pkgname_is_listed "${skipped_pkgname}"; then
- continue
- fi
get_originspec_from_pkgname skipped_originspec "${skipped_pkgname}"
originspec_decode "${skipped_originspec}" skipped_origin \
skipped_flavor
@@ -6914,10 +6907,13 @@ gather_port_vars_port() {
fi
# If there are no deps for this port then there's nothing left to do.
- if [ -n "${ignore}" ] || [ -z "${deps}" ]; then
+ if [ -z "${deps}" ]; then
+ return 0
+ fi
+ # Don't bother fetching dependencies if this port is IGNORED.
+ if [ -n "${ignore}" ]; then
return 0
fi
-
# Assert some policy before proceeding to process these deps
# further.
if ! deps_sanity "${originspec}" "${deps}"; then
@@ -7102,6 +7098,7 @@ compute_deps_pkg() {
shash_remove pkgname-deps "${pkgname}" deps || \
err 1 "compute_deps_pkg failed to find deps for ${COLOR_PORT}${pkgname}${COLOR_RESET}"
+ # Don't bother relating dependencies of IGNORED ports.
if shash_exists pkgname-ignore "${pkgname}"; then
msg_debug "compute_deps_pkg: Will not build IGNORED ${COLOR_PORT}${pkgname}${COLOR_RESET} nor queue its deps"
return
diff --git a/test-ports/omnibus/misc/Makefile b/test-ports/omnibus/misc/Makefile
index c14f8cf7..84dd0e0b 100644
--- a/test-ports/omnibus/misc/Makefile
+++ b/test-ports/omnibus/misc/Makefile
@@ -1,4 +1,5 @@
SUBDIR += foo
SUBDIR += foo-dep-FLAVORS-unsorted
+SUBDIR += foop-IGNORED
SUBDIR += foo-FLAVORS-unsorted
SUBDIR += freebsd-release-manifests
diff --git a/test-ports/omnibus/misc/foop-IGNORED/Makefile b/test-ports/omnibus/misc/foop-IGNORED/Makefile
new file mode 100644
index 00000000..6a60f63a
--- /dev/null
+++ b/test-ports/omnibus/misc/foop-IGNORED/Makefile
@@ -0,0 +1,27 @@
+# $FreeBSD: head/misc/freebsd-release-manifests/Makefile 429892 2016-12-29 12:41:04Z mat $
+
+PORTNAME= foop
+DISTVERSION= 20161010
+PORTREVISION= 0
+PKGNAMESUFFIX= -IGNORED
+IGNORE= ignored
+CATEGORIES= misc
+MASTER_SITES= #
+DISTFILES= #
+
+MAINTAINER= bdrewery@FreeBSD.org
+COMMENT= FreeBSD release manifests
+
+LICENSE= BSD2CLAUSE
+
+NO_BUILD= yes
+NO_ARCH= yes
+
+DATADIR= ${PREFIX}/share/freebsd
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${DATADIR}/MANIFESTS
+ ${INSTALL_DATA} ${FILESDIR}/MANIFESTS/* \
+ ${STAGEDIR}${DATADIR}/MANIFESTS/
+
+.include <bsd.port.mk>
diff --git a/test-ports/omnibus/misc/foop-IGNORED/pkg-descr b/test-ports/omnibus/misc/foop-IGNORED/pkg-descr
new file mode 100644
index 00000000..c5d831eb
--- /dev/null
+++ b/test-ports/omnibus/misc/foop-IGNORED/pkg-descr
@@ -0,0 +1,3 @@
+MANIFEST files from the FreeBSD release images.
+
+WWW: https://www.FreeBSD.org
diff --git a/test-ports/omnibus/misc/foop-IGNORED/pkg-plist b/test-ports/omnibus/misc/foop-IGNORED/pkg-plist
new file mode 100644
index 00000000..cb59bff2
--- /dev/null
+++ b/test-ports/omnibus/misc/foop-IGNORED/pkg-plist
@@ -0,0 +1,52 @@
+%%DATADIR%%/MANIFESTS/amd64-amd64-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-9.1-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-9.1-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/ia64-ia64-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-9.1-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-10.0-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-10.1-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-10.2-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-10.3-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-9.0-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-9.1-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-9.2-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-9.3-RELEASE
+%%DATADIR%%/MANIFESTS/amd64-amd64-11.0-RELEASE
+%%DATADIR%%/MANIFESTS/arm64-aarch64-11.0-RELEASE
+%%DATADIR%%/MANIFESTS/i386-i386-11.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc-11.0-RELEASE
+%%DATADIR%%/MANIFESTS/powerpc-powerpc64-11.0-RELEASE
+%%DATADIR%%/MANIFESTS/sparc64-sparc64-11.0-RELEASE
diff --git a/test-ports/omnibus/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile b/test-ports/omnibus/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile
index 4bb55e0a..4dc42be8 100644
--- a/test-ports/omnibus/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile
+++ b/test-ports/omnibus/ports-mgmt/poudriere-devel-IGNORED-and-skipped/Makefile
@@ -31,6 +31,7 @@ OPTIONS_DEFAULT=ZSH
OPTIONS_SUB= yes
RUN_DEPENDS+= freebsd-release-manifests>0:misc/freebsd-release-manifests
+RUN_DEPENDS+= foop-IGNORED>0:misc/foop-IGNORED
RUN_DEPENDS+= poudriere-devel-IGNORED>0:ports-mgmt/poudriere-devel-IGNORED
.include <bsd.port.options.mk>
diff --git a/test/bulk-flavor-ignore-all.sh b/test/bulk-flavor-ignore-all.sh
index e84a9b61..020ccd30 100644
--- a/test/bulk-flavor-ignore-all.sh
+++ b/test/bulk-flavor-ignore-all.sh
@@ -5,7 +5,7 @@ OVERLAYS="omnibus"
do_bulk -n -a
assert 0 $? "Bulk should pass"
-EXPECTED_IGNORED="misc/foo-FLAVORS-unsorted@IGNORED misc/foo-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@IGNORED misc/foo@IGNORED ports-mgmt/poudriere-devel-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+EXPECTED_IGNORED="misc/foo-FLAVORS-unsorted@IGNORED misc/foo-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@IGNORED misc/foo@IGNORED ports-mgmt/poudriere-devel-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped misc/foop-IGNORED"
EXPECTED_SKIPPED="ports-mgmt/poudriere-devel-dep-IGNORED ports-mgmt/poudriere-devel-dep2-IGNORED"
assert_bulk_queue_and_stats
diff --git a/test/bulk-ignore-and-skipped.sh b/test/bulk-ignore-and-skipped.sh
index 90917e81..018e2569 100644
--- a/test/bulk-ignore-and-skipped.sh
+++ b/test/bulk-ignore-and-skipped.sh
@@ -1,15 +1,18 @@
-LISTPORTS="ports-mgmt/poudriere-devel ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+LISTPORTS="misc/foop-IGNORED ports-mgmt/poudriere-devel ports-mgmt/poudriere-devel-IGNORED-and-skipped"
# IGNORE should take precedence over skipped.
OVERLAYS="omnibus"
+JFLAG=1:1
. common.bulk.sh
do_bulk -n ${LISTPORTS}
assert 0 $? "Bulk should pass"
-EXPECTED_LISTPORTS_IGNORED="ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+EXPECTED_LISTPORTS_IGNORED="misc/foop-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped"
# ports-mgmt/poudriere-devel-IGNORED is a dependency which is also ignored but
# because we are ignoring ports-mgmt/poudriere-devel-IGNORED-and-skipped we
# should not bother processing ports-mgmt/poudriere-devel-IGNORED at all.
-EXPECTED_IGNORED="ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+# Meaning poudriere-devel-IGNORED should not appear in the IGNORE list.
+# misc/foop-IGNORED should not cause a skip here either.
+EXPECTED_IGNORED="misc/foop-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped"
EXPECTED_SKIPPED=
assert_bulk_queue_and_stats
diff --git a/test/bulk-overlay-all.sh b/test/bulk-overlay-all.sh
index a8fc4ac4..6e668c3f 100644
--- a/test/bulk-overlay-all.sh
+++ b/test/bulk-overlay-all.sh
@@ -11,7 +11,7 @@ hash_get originspec-pkgname "misc/foo" pkgname || ret=$?
assert 0 "${ret}" "Cannot find pkgname for misc/foo"
assert "foo-OVERLAY-20161010" "${pkgname}" "misc/foo didn't find the overlay version"
-EXPECTED_IGNORED="misc/foo-FLAVORS-unsorted@IGNORED misc/foo-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@IGNORED misc/foo@IGNORED_OVERLAY ports-mgmt/poudriere-devel-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped"
+EXPECTED_IGNORED="misc/foo-FLAVORS-unsorted@IGNORED misc/foo-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@DEPIGNORED misc/foo-dep-FLAVORS-unsorted@IGNORED misc/foo@IGNORED_OVERLAY ports-mgmt/poudriere-devel-IGNORED ports-mgmt/poudriere-devel-IGNORED-and-skipped misc/foop-IGNORED"
EXPECTED_SKIPPED="ports-mgmt/poudriere-devel-dep-IGNORED ports-mgmt/poudriere-devel-dep2-IGNORED"
assert_bulk_queue_and_stats
diff --git a/test/common.bulk.sh b/test/common.bulk.sh
index 60cd7582..125e4b3b 100644
--- a/test/common.bulk.sh
+++ b/test/common.bulk.sh
@@ -462,6 +462,7 @@ do_bulk() {
done
${SUDO} ${POUDRIEREPATH} -e ${POUDRIERE_ETC} bulk -CNt ${verbose} \
${OVERLAYS:+$(echo "${OVERLAYS}" | tr ' ' '\n' | sed -e 's,^,-O ,' | paste -d ' ' -s -)} \
+ ${JFLAG:+-J ${JFLAG}} \
-B "${BUILDNAME}" \
-j "${JAILNAME}" -p "${PTNAME}" ${SETNAME:+-z "${SETNAME}"} \
"$@"