feat: fail build if dependency detection returns no packages
Add error message and exit if find-deps.sh does not detect any dependencies. This prevents building a broken package with missing library requirements.
This commit is contained in:
23
Makefile
23
Makefile
@@ -96,18 +96,27 @@ $(DEB_FILE): $(EXTRACT_DIR)/.extracted
|
||||
@chmod +x $(FIND_DEPS_SCRIPT)
|
||||
@echo "Detecting library dependencies..."
|
||||
@DEPS=$$($(FIND_DEPS_SCRIPT) --quiet --format makefile $(EXTRACT_DIR)/zed.app/lib); \
|
||||
if [ -z "$$DEPS" ]; then \
|
||||
echo ""; \
|
||||
echo "ERROR: Failed to detect library dependencies!"; \
|
||||
echo "The dependency detection script did not return any packages."; \
|
||||
echo "This may indicate a problem with:"; \
|
||||
echo " - The find-deps.sh script"; \
|
||||
echo " - The bundled libraries in $(EXTRACT_DIR)/zed.app/lib"; \
|
||||
echo " - Missing system tools (ldd, dpkg-query, etc.)"; \
|
||||
echo ""; \
|
||||
echo "Please investigate and fix the issue before building."; \
|
||||
echo "Run 'make list-deps' for more details."; \
|
||||
echo ""; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "Package: $(PACKAGE_NAME)" > $(CONTROL_DIR)/control; \
|
||||
echo "Version: $(VERSION)" >> $(CONTROL_DIR)/control; \
|
||||
echo "Section: editors" >> $(CONTROL_DIR)/control; \
|
||||
echo "Priority: optional" >> $(CONTROL_DIR)/control; \
|
||||
echo "Architecture: amd64" >> $(CONTROL_DIR)/control; \
|
||||
if [ -n "$$DEPS" ]; then \
|
||||
echo "Depends: $$DEPS" >> $(CONTROL_DIR)/control; \
|
||||
echo " Detected dependencies: $$DEPS"; \
|
||||
else \
|
||||
echo "Depends: libc6" >> $(CONTROL_DIR)/control; \
|
||||
echo " Warning: Could not detect dependencies, using minimal set"; \
|
||||
fi; \
|
||||
echo "Depends: $$DEPS" >> $(CONTROL_DIR)/control; \
|
||||
echo " Detected dependencies: $$DEPS"; \
|
||||
echo "Maintainer: Zed Packager <packager@local>" >> $(CONTROL_DIR)/control; \
|
||||
echo "Description: Zed - A high-performance, multiplayer code editor" >> $(CONTROL_DIR)/control; \
|
||||
echo " Zed is a next-generation code editor designed for" >> $(CONTROL_DIR)/control; \
|
||||
|
||||
Reference in New Issue
Block a user