source: trunk/tools/ipkg-utils/patches/180-add_installed_size.patch @ 25021

Last change on this file since 25021 was 25021, checked in by jow, 6 years ago

tools/ipkg-utils: calculate installed size from embedded data.tar.gz, makes opkg space checking more precise

File size: 431 bytes
  • ipkg-build

    a b mkdir $tmp_dir 
    250250 
    251251echo $CONTROL > $tmp_dir/tarX 
    252252( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . ) 
     253 
     254installed_size=`du -b $tmp_dir/data.tar.gz | cut -f1` 
     255sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \ 
     256        $pkg_dir/$CONTROL/control 
     257 
    253258( cd $pkg_dir/$CONTROL && $TAR $ogargs -czf $tmp_dir/control.tar.gz . ) 
    254259rm $tmp_dir/tarX 
    255260 
Note: See TracBrowser for help on using the repository browser.