Skip to content

Commit

Permalink
build/bin/sage-spkg: Move handling of dummy packages here from build/…
Browse files Browse the repository at this point in the history
…make/Makefile.in
  • Loading branch information
Matthias Koeppe committed Jun 24, 2024
1 parent b79fd73 commit 8d6f11a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
18 changes: 17 additions & 1 deletion build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,23 @@ case "$PKG_SRC_TYPE" in
error_msg "Error copying upstream tarball to directory '$SAGE_SPKG_COPY_UPSTREAM'"
exit 1
fi
fi;;
fi
;;
none)
echo >&2
echo >&2 "Note: $PKG_BASE is a dummy package that the Sage distribution uses"
echo >&2 "to provide information about equivalent system packages."
echo >&2 "It cannot be installed using the Sage distribution."
echo >&2 "Please install it manually, for example using the system packages"
echo >&2 "recommended at the end of a run of './configure'"
echo >&2 "See below for package-specific information."
echo >&2
sage-spkg-info $PKG_BASE
echo >&2
echo >&2 "Error: $PKG_BASE is a dummy package and "
echo >&2 "cannot be installed using the Sage distribution."
exit 1
;;
esac
} ################################################# ensure_pkg_src

Expand Down
15 changes: 1 addition & 14 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ $(1)-$(4)-no-deps:
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
echo "$$($(4)_DISABLED_MESSAGE)" 2>&1; \
exit 1; \
elif [ -x '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install' -o -r '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-install.in' ]; then \
else \
rm -rf '$$($(4))/var/lib/sage/scripts/$(1)'; \
cd '$$(SAGE_ROOT)/build/pkgs/$(1)' && \
. '$$(SAGE_ROOT)/src/bin/sage-src-env-config' && \
Expand All @@ -759,19 +759,6 @@ $(1)-$(4)-no-deps:
sage-logger -p 'SAGE_CHECK=$$(SAGE_CHECK_$(1)) PATH=$$(SAGE_SRC)/bin:$$($(4))/bin:$$$$PATH $$(SAGE_SPKG) $$(SAGE_SPKG_OPTIONS) \
$(if $(filter $(1),$(TOOLCHAIN_DEPS)),--keep-existing) \
$(1)-$(2) $$($(4))' '$$(SAGE_LOGS)/$(1)-$(2).log'; \
else ( \
echo; \
echo "Note: $(1) is a dummy package that the Sage distribution uses"; \
echo "to provide information about equivalent system packages."; \
echo "It cannot be installed using the Sage distribution."; \
echo "Please install it manually, for example using the system packages"; \
echo "recommended at the end of a run of './configure'"; \
echo "See below for package-specific information."; \
echo; \
$$(SAGE_ROOT)/build/bin/sage-spkg-info $(1); \
echo; \
echo "Error: $(1) is a dummy package and "; \
echo "cannot be installed using the Sage distribution." ) | sage-logger -p 'cat; exit 1' '$$(SAGE_LOGS)/$(1)-$(2).log'; \
fi

$(1)-no-deps: $(1)-$(4)-no-deps
Expand Down

0 comments on commit 8d6f11a

Please sign in to comment.