diff --git a/Makefile b/Makefile index a7c6c91..ae1ad28 100644 --- a/Makefile +++ b/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 " >> $(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; \