summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-29 16:58:43 +0000
committerSam James <sam@gentoo.org>2022-06-29 17:49:24 +0000
commit4fa1129e290e654c815d9f6783741d8e8b787a7c (patch)
treed81721639a781bf2e52c4aaaa387d85793a1ec14
parentdev-python/furo: Bump to 2022.6.21 (diff)
downloadgentoo-4fa1129e290e654c815d9f6783741d8e8b787a7c.tar.gz
gentoo-4fa1129e290e654c815d9f6783741d8e8b787a7c.tar.bz2
gentoo-4fa1129e290e654c815d9f6783741d8e8b787a7c.zip
distutils-r1.eclass: make QA check conditional on 'diff' presence
We get trouble when bootstrapping Prefix otherwise as diffutils may not be installed yet. This is a bit less churn than adding the BDEPEND, not that there's a strong argument either way. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--eclass/distutils-r1.eclass31
1 files changed, 18 insertions, 13 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 85d6c8ae5080..612db00e36b7 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1590,20 +1590,25 @@ distutils-r1_python_install() {
# remove files that we've created explicitly
rm "${reg_scriptdir}"/{"${EPYTHON}",python3,python,pyvenv.cfg} || die
- # verify that scriptdir & wrapped_scriptdir both contain
- # the same files
- (
- cd "${reg_scriptdir}" && find . -mindepth 1
- ) | sort > "${T}"/.distutils-files-bin
- assert "listing ${reg_scriptdir} failed"
- (
- if [[ -d ${wrapped_scriptdir} ]]; then
- cd "${wrapped_scriptdir}" && find . -mindepth 1
+
+ # Automagically do the QA check to avoid issues when bootstrapping
+ # prefix.
+ if type diff &>/dev/null ; then
+ # verify that scriptdir & wrapped_scriptdir both contain
+ # the same files
+ (
+ cd "${reg_scriptdir}" && find . -mindepth 1
+ ) | sort > "${T}"/.distutils-files-bin
+ assert "listing ${reg_scriptdir} failed"
+ (
+ if [[ -d ${wrapped_scriptdir} ]]; then
+ cd "${wrapped_scriptdir}" && find . -mindepth 1
+ fi
+ ) | sort > "${T}"/.distutils-files-wrapped
+ assert "listing ${wrapped_scriptdir} failed"
+ if ! diff -U 0 "${T}"/.distutils-files-{bin,wrapped}; then
+ die "File lists for ${reg_scriptdir} and ${wrapped_scriptdir} differ (see diff above)"
fi
- ) | sort > "${T}"/.distutils-files-wrapped
- assert "listing ${wrapped_scriptdir} failed"
- if ! diff -U 0 "${T}"/.distutils-files-{bin,wrapped}; then
- die "File lists for ${reg_scriptdir} and ${wrapped_scriptdir} differ (see diff above)"
fi
# remove the altered bindir, executables from the package