build: reduce the size of package metadata a bit to keep package list files smaller
authorFelix Fietkau <nbd@openwrt.org>
Sat, 22 Dec 2012 19:56:21 +0000 (19:56 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 22 Dec 2012 19:56:21 +0000 (19:56 +0000)
SVN-Revision: 34871

include/package-defaults.mk
include/package-ipkg.mk
include/package.mk

index a0f859c6e3f0d8680c6a00e4c0569f4a13bd385c..0505a43c4fdc4a508891121c30aea25d7498d6db 100644 (file)
@@ -42,7 +42,6 @@ define Package/Default
   else
     PKGARCH:=$(BOARD)
   endif
-  PRIORITY:=optional
   DEFAULT:=
   MENU:=
   SUBMENU:=
index 5de51ebb58fad98365beb868f529f21d530d3a39..b4b83fea5c0b8cb2438f048909a210192dd6d5e8 100644 (file)
@@ -146,18 +146,17 @@ ifeq ($(DUMP),)
                for depend in $$(filter-out @%,$$(IDEPEND_$(1))); do \
                        DEPENDS=$$$${DEPENDS:+$$$$DEPENDS, }$$$${depend##+}; \
                done; \
-               echo "Depends: $$$$DEPENDS"; \
-               echo "Provides: $(PROVIDES)"; \
+               [ -z "$$$$DEPENDS" ] || echo "Depends: $$$$DEPENDS"; \
+               $(if $(PROVIDES), echo "Provides: $(PROVIDES)"; ) \
                echo "Source: $(SOURCE)"; \
-               echo "SourceFile: $(PKG_SOURCE)"; \
-               echo "SourceURL: $(PKG_SOURCE_URL)"; \
-               echo "License: $(PKG_LICENSE)"; \
-               echo "LicenseFiles: $(PKG_LICENSE_FILES)"; \
+               $(if $(PKG_SOURCE), echo "SourceFile: $(PKG_SOURCE)"; ) \
+               $(if $(PKG_SOURCE_URL), echo "SourceURL: $(PKG_SOURCE_URL)"; ) \
+               $(if $(PKG_LICENSE), echo "License: $(PKG_LICENSE)"; ) \
+               $(if $(PKG_LICENSE_FILES), echo "LicenseFiles: $(PKG_LICENSE_FILES)"; ) \
                echo "Section: $(SECTION)"; \
-               echo "Status: unknown $(if $(filter hold,$(PKG_FLAGS)),hold,ok) not-installed"; \
-               echo "Essential: $(if $(filter essential,$(PKG_FLAGS)),yes,no)"; \
-               echo "Priority: $(PRIORITY)"; \
-               echo "Maintainer: $(MAINTAINER)"; \
+               $(if $(filter hold,$(PKG_FLAGS)),echo "Status: unknown hold not-installed"; ) \
+               $(if $(filter essential,$(PKG_FLAGS)), echo "Essential: yes"; ) \
+               $(if $(MAINTAINER),echo "Maintainer: $(MAINTAINER)"; ) \
                echo "Architecture: $(PKGARCH)"; \
                echo "Installed-Size: 0"; \
                echo -n "Description: "; $(SH_FUNC) getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \
index c1fe088eced81acaa6769a64317d1f373770b475..99d2dd270ed3568e1c9368f11f30455552de979d 100644 (file)
@@ -215,7 +215,7 @@ define Package/$(1)/description
 endef
 endif
 
-  $(foreach FIELD, TITLE CATEGORY PRIORITY SECTION VERSION,
+  $(foreach FIELD, TITLE CATEGORY SECTION VERSION,
     ifeq ($($(FIELD)),)
       $$(error Package/$(1) is missing the $(FIELD) field)
     endif