tazpkg rev 90

tazpkgbox: add size for mirrored packages
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 19 11:04:00 2008 +0000 (2008-05-19)
parents 97e0e9b1c847
children 3cdc61b655ec
files lib/tazpkgbox/package_infos
line diff
     1.1 --- a/lib/tazpkgbox/package_infos	Mon May 19 10:27:48 2008 +0000
     1.2 +++ b/lib/tazpkgbox/package_infos	Mon May 19 11:04:00 2008 +0000
     1.3 @@ -62,7 +62,8 @@
     1.4  	VERSION=`echo "$RES" | cut -d "|" -f 2`
     1.5  	CATEGORY=`echo "$RES" | cut -d "|" -f 4`
     1.6  	WEB_SITE=`echo "$RES" | cut -d "|" -f 5`
     1.7 -	export PACKAGE_INFOS="
     1.8 +	SIZES=`grep -A 3 "^$(echo $PACKAGE)$" /var/lib/tazpkg/packages.txt | tail -1`
     1.9 +	PACKAGE_INFOS="
    1.10  <window title=\"Package: $PACKAGE\" icon-name=\"package-x-generic\">
    1.11  <vbox>
    1.12  
    1.13 @@ -71,7 +72,10 @@
    1.14  		<label>Package|$PKG</label>
    1.15  		<item icon=\"tazpkg\">Name: | $PACKAGE</item>
    1.16  		<item icon=\"tazpkg\">Version: | $VERSION</item>
    1.17 -		<item icon=\"tazpkg\">category: | $CATEGORY</item>
    1.18 +		<item icon=\"tazpkg\">Category: | $CATEGORY</item>"
    1.19 +	[ -n "$SIZES" ] && PACKAGE_INFOS="$PACKAGE_INFOS
    1.20 +		<item icon=\"tazpkg\">Size: | $SIZES</item>"
    1.21 +	PACKAGE_INFOS="$PACKAGE_INFOS
    1.22  		<item icon=\"applications-internet\">Web site: | $WEB_SITE</item>
    1.23  	</tree>
    1.24  
    1.25 @@ -99,6 +103,7 @@
    1.26  </vbox>
    1.27  </window>
    1.28  "
    1.29 +	export PACKAGE_INFOS
    1.30  fi
    1.31  
    1.32  gtkdialog --center --program=PACKAGE_INFOS