Skip to content

build: Run missing package dist-hook earlier #10249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

bwbarrett
Copy link
Member

The hook that would fail "make dist" if packages weren't configured to
be included in the tarball ran at the end of "make dist". This was
fine when the packages missing didn't break running make dist. However,
Sphinx not being available means that "make dist" won't work because
of missing files, but the error was really not intuitive.

Move the dist-hook for missing packages from the top level to the
config directory Makefile, which has the practical outcome of running
the missing package check right after generation of the AUTHORS file,
well before any likely missing package make breakage, returning us to
clear error messages.

Signed-off-by: Brian Barrett [email protected]

The hook that would fail "make dist" if packages weren't configured to
be included in the tarball ran at the end of "make dist".  This was
fine when the packages missing didn't break running make dist.  However,
Sphinx not being available means that "make dist" won't work because
of missing files, but the error was really not intuitive.

Move the dist-hook for missing packages from the top level to the
config directory Makefile, which has the practical outcome of running
the missing package check right after generation of the AUTHORS file,
well before any likely missing package make breakage, returning us to
clear error messages.

Signed-off-by: Brian Barrett <[email protected]>
@bwbarrett bwbarrett requested review from jsquyres and shijin-aws April 8, 2022 15:45
@bwbarrett
Copy link
Member Author

With this change, running "make dist" without Sphinx being found results in:

% make dist
make  dist-bzip2 dist-gzip am__post_remove_distdir='@:'
make[1]: Entering directory '/home/bbarrett/projects/open-mpi/ompi'
make  distdir-am
make[2]: Entering directory '/home/bbarrett/projects/open-mpi/ompi'
/usr/bin/perl "./contrib/dist/make-authors.pl" --skip-ok --quiet --srcdir="."
New AUTHORS file written.
if test -d "openmpi-gitclone"; then find "openmpi-gitclone" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "openmpi-gitclone" || { sleep 5 && rm -rf "openmpi-gitclone"; }; else :; fi
test -d "openmpi-gitclone" || mkdir "openmpi-gitclone"
 (cd config && make  top_distdir=../openmpi-gitclone distdir=../openmpi-gitclone/config \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[3]: Entering directory '/home/bbarrett/projects/open-mpi/ompi/config'
make  distdir-am
make[4]: Entering directory '/home/bbarrett/projects/open-mpi/ompi/config'
make  \
  top_distdir="../openmpi-gitclone" distdir="../openmpi-gitclone/config" \
  dist-hook
make[5]: Entering directory '/home/bbarrett/projects/open-mpi/ompi/config'
#########################################################################
#
# make dist is disabled due to the following packages: Sphinx/Documentation
#
#########################################################################
make[5]: *** [Makefile:1475: dist-hook] Error 1
make[5]: Leaving directory '/home/bbarrett/projects/open-mpi/ompi/config'
make[4]: *** [Makefile:1323: distdir-am] Error 2
make[4]: Leaving directory '/home/bbarrett/projects/open-mpi/ompi/config'
make[3]: *** [Makefile:1319: distdir] Error 2
make[3]: Leaving directory '/home/bbarrett/projects/open-mpi/ompi/config'
make[2]: *** [Makefile:1587: distdir-am] Error 1
make[2]: Leaving directory '/home/bbarrett/projects/open-mpi/ompi'
make[1]: *** [Makefile:1581: distdir] Error 2
make[1]: Leaving directory '/home/bbarrett/projects/open-mpi/ompi'
make: *** [Makefile:1685: dist] Error 2

That seems close enough to the top and fast enough to be acceptable...

@bwbarrett bwbarrett merged commit 3c95815 into open-mpi:main Apr 11, 2022
@bwbarrett bwbarrett deleted the bugfix/make-dist-error-message branch April 11, 2022 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants