Ignore:
Timestamp:
2011-09-09T19:25:20+02:00 (5 years ago)
Author:
jow
Message:

[imagebuilder] Various enhancements from Manuel Munz <freifunk@…>

  • don't regenerate Package index unless the packagedir changes
  • remove opkg lists from rootfs, saves > 1MB uncompressed
  • don't direct errors on index creation into packagelist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/imagebuilder/files/Makefile

    r27872 r28205  
    101101        rm -rf $(TARGET_DIR) 
    102102        mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) 
    103         $(MAKE) package_index 
     103        if [ ! -f "$(PACKAGE_DIR)/Packages" ] || [ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || [ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/Packages.gz`" ]; then \ 
     104                echo "Package list missing or not up-to-date, generating it.";\ 
     105                $(MAKE) package_index; \ 
     106        else \ 
     107                mkdir -p $(TARGET_DIR)/tmp; \ 
     108                $(OPKG) update; \ 
     109        fi 
    104110        $(MAKE) package_install 
    105111ifneq ($(USER_FILES),) 
     
    113119        @echo Building package index... 
    114120        @mkdir -p $(TOPDIR)/tmp $(TOPDIR)/dl $(TARGET_DIR)/tmp 
    115         (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages && \ 
     121        (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \ 
    116122                gzip -9c Packages > Packages.gz \ 
    117123        ) >/dev/null 2>/dev/null 
     
    122128        @echo Installing packages... 
    123129        $(OPKG) install $(BUILD_PACKAGES) 
     130        rm -f $(TARGET_DIR)/usr/lib/opkg/lists/* 
    124131 
    125132copy_files: FORCE 
Note: See TracChangeset for help on using the changeset viewer.