summaryrefslogtreecommitdiff
path: root/tools/ipkg-utils/patches
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-04-13 13:26:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-04-13 13:26:26 +0000
commit2702ba56f09c22fca8e7bb269af110d0959dc7f3 (patch)
tree7a1893c0bda2d9692f923e5b2248fee8d4f8e4d5 /tools/ipkg-utils/patches
parent372cefb114c045f5e887128f5d927c8bed75b1d2 (diff)
downloadmtk-20170518-2702ba56f09c22fca8e7bb269af110d0959dc7f3.zip
mtk-20170518-2702ba56f09c22fca8e7bb269af110d0959dc7f3.tar.gz
mtk-20170518-2702ba56f09c22fca8e7bb269af110d0959dc7f3.tar.bz2
ipkg-utils: use (g)stat instead of "du -b" to find package size, fixes Darwin compat (#9214)
SVN-Revision: 26642
Diffstat (limited to 'tools/ipkg-utils/patches')
-rw-r--r--tools/ipkg-utils/patches/180-add_installed_size.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ipkg-utils/patches/180-add_installed_size.patch b/tools/ipkg-utils/patches/180-add_installed_size.patch
index 6ee7de8..fb91a31 100644
--- a/tools/ipkg-utils/patches/180-add_installed_size.patch
+++ b/tools/ipkg-utils/patches/180-add_installed_size.patch
@@ -5,7 +5,7 @@
echo $CONTROL > $tmp_dir/tarX
( cd $pkg_dir && $TAR $ogargs -X $tmp_dir/tarX -czf $tmp_dir/data.tar.gz . )
+
-+installed_size=`du -b $tmp_dir/data.tar.gz | cut -f1`
++installed_size=`stat -c "%s" $tmp_dir/data.tar.gz`
+sed -i -e "s/^Installed-Size: .*/Installed-Size: $installed_size/" \
+ $pkg_dir/$CONTROL/control
+