Changeset 13602


Ignore:
Timestamp:
2008-12-11T21:15:41+01:00 (9 years ago)
Author:
nico
Message:

add an "Installed-Size" field to package control files, so that opkg could check needed vs. available storage space before installing a package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/package-ipkg.mk

    r13051 r13602  
    7373                echo "Maintainer: $(MAINTAINER)"; \ 
    7474                echo "Architecture: $(PKGARCH)"; \ 
     75                echo "Installed-Size: 1"; \ 
    7576                echo -n "Description: "; getvar $(call shvar,Package/$(1)/description) | sed -e 's,^[[:space:]]*, ,g'; \ 
    7677        ) >> $$(IDIR_$(1))/CONTROL/control 
     
    8586        -find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' | $(XARGS) rm -rf 
    8687        $(RSTRIP) $$(IDIR_$(1)) 
     88        SIZE=`cd $$(IDIR_$(1)); du -bs --exclude=./CONTROL . 2>/dev/null | cut -f1`; \ 
     89        $(SED) "s|^\(Installed-Size:\).*|\1 $$$$SIZE|g" $$(IDIR_$(1))/CONTROL/control 
    8790        $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR) 
    8891        @[ -f $$(IPKG_$(1)) ] || false  
Note: See TracChangeset for help on using the changeset viewer.