tazpkg rev 230
tazpkgbox: Major improvement (all list in the same tab + icons)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Feb 21 22:06:40 2009 +0100 (2009-02-21) |
parents | 5c0e601b47d3 |
children | 1956016c0998 |
files | tazpkgbox |
line diff
1.1 --- a/tazpkgbox Sat Feb 21 15:15:21 2009 +0100 1.2 +++ b/tazpkgbox Sat Feb 21 22:06:40 2009 +0100 1.3 @@ -14,6 +14,8 @@ 1.4 exit 0 1.5 fi 1.6 1.7 +export LIB=$PWD/lib/tazpkgbox 1.8 + 1.9 # We need at least a mirror URL. 1.10 if [ ! -f /var/lib/tazpkg/mirror ]; then 1.11 tazpkg >/dev/null 1.12 @@ -22,9 +24,8 @@ 1.13 # Tmp dir and files used to get pkgs infos on the fly. Clean also 1.14 # list and search files to load less data and have a faster start. 1.15 mkdir -p /tmp/tazpkgbox 1.16 -echo "all" > /tmp/tazpkgbox/installed-category 1.17 -echo "all" > /tmp/tazpkgbox/installable-category 1.18 -echo "all" > /tmp/tazpkgbox/mirrored-category 1.19 +echo "all" > /tmp/tazpkgbox/status 1.20 +echo "all" > /tmp/tazpkgbox/category 1.21 echo "all" > /tmp/tazpkgbox/undigest-category 1.22 echo "" > /tmp/tazpkgbox/search-installed 1.23 echo "" > /tmp/tazpkgbox/search-mirrored 1.24 @@ -173,17 +174,16 @@ 1.25 </pixmap> 1.26 </hbox> 1.27 1.28 - <notebook labels="Installed|Installable|Mirrored|Undigest|Blocked|Search|Configuration"> 1.29 + <notebook labels="Packages list|Search|Undigest|Configuration"> 1.30 1.31 <vbox> 1.32 <tree> 1.33 <width>620</width><height>240</height> 1.34 <variable>PKG</variable> 1.35 - <label>Package name|Version|Description</label> 1.36 - <input>/usr/lib/slitaz/tazpkgbox/list installed</input> 1.37 - <item icon="tazpkg">dummy | -</item> 1.38 + <label>Name|Version|Description</label> 1.39 + <input icon_column="0">$LIB/list all</input> 1.40 <action>echo "$PKG" > /tmp/tazpkgbox/pkg</action> 1.41 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.42 + <action>$LIB/package_infos</action> 1.43 <action>refresh:PKG</action> 1.44 <action>refresh:GETIT</action> 1.45 <action>refresh:PKG_STATS</action> 1.46 @@ -191,10 +191,20 @@ 1.47 </tree> 1.48 <hbox> 1.49 <text> 1.50 + <label>"Status:"</label> 1.51 + </text> 1.52 + <combobox> 1.53 + <variable>STATUS</variable> 1.54 + <item>all</item> 1.55 + <item>installed</item> 1.56 + <item>installable</item> 1.57 + <item>blocked</item> 1.58 + </combobox> 1.59 + <text> 1.60 <label>"Category:"</label> 1.61 </text> 1.62 <combobox> 1.63 - <variable>INSTALLED_CAT</variable> 1.64 + <variable>CAT</variable> 1.65 <item>all</item> 1.66 <item>base-system</item> 1.67 <item>x-window</item> 1.68 @@ -214,98 +224,57 @@ 1.69 <button> 1.70 <label>List</label> 1.71 <input file icon="reload"></input> 1.72 - <action>echo "$INSTALLED_CAT" > /tmp/tazpkgbox/installed-category</action> 1.73 + <action>echo "$CAT" > /tmp/tazpkgbox/category</action> 1.74 + <action>echo "$STATUS" > /tmp/tazpkgbox/status</action> 1.75 <action>refresh:PKG</action> 1.76 </button> 1.77 </hbox> 1.78 </vbox> 1.79 - 1.80 - <vbox> 1.81 - <tree> 1.82 - <width>620</width><height>240</height> 1.83 - <variable>GETIT</variable> 1.84 - <label>Package name|Version|Description</label> 1.85 - <input>/usr/lib/slitaz/tazpkgbox/list installable</input> 1.86 - <item icon="tazpkg">dummy | -</item> 1.87 - <action>echo "$GETIT" > /tmp/tazpkgbox/pkg</action> 1.88 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.89 + 1.90 + <vbox> 1.91 + <tree icon="tazpkg"> 1.92 + <width>620</width><height>120</height> 1.93 + <variable>RESULT_INSTALLED</variable> 1.94 + <label>Installed packages|Version|Description / File</label> 1.95 + <input>cat /tmp/tazpkgbox/search-installed</input> 1.96 + <action>echo "$RESULT_INSTALLED" > /tmp/tazpkgbox/pkg</action> 1.97 + <action>$LIB/package_infos</action> 1.98 + <action>$LIB/search</action> 1.99 + <action>refresh:RESULT_INSTALLED</action> 1.100 <action>refresh:PKG</action> 1.101 - <action>refresh:GETIT</action> 1.102 + <action>refresh:PKG_STATS</action> 1.103 + <action>refresh:CACHE_STATS</action> 1.104 + </tree> 1.105 + <tree icon="tazpkg"> 1.106 + <width>620</width><height>120</height> 1.107 + <variable>RESULT_MIRROR</variable> 1.108 + <label>Mirrored packages|Version|Description / File</label> 1.109 + <input>cat /tmp/tazpkgbox/search-mirrored</input> 1.110 + <action>echo "$RESULT_MIRROR" > /tmp/tazpkgbox/pkg</action> 1.111 + <action>$LIB/package_infos</action> 1.112 + <action>$LIB/search</action> 1.113 + <action>refresh:RESULT_INSTALLED</action> 1.114 + <action>refresh:PKG</action> 1.115 <action>refresh:PKG_STATS</action> 1.116 <action>refresh:CACHE_STATS</action> 1.117 </tree> 1.118 <hbox> 1.119 - <text> 1.120 - <label>"Category:"</label> 1.121 - </text> 1.122 - <combobox> 1.123 - <variable>INSTALLABLE_CAT</variable> 1.124 - <item>all</item> 1.125 - <item>base-system</item> 1.126 - <item>x-window</item> 1.127 - <item>utilities</item> 1.128 - <item>network</item> 1.129 - <item>graphics</item> 1.130 - <item>multimedia</item> 1.131 - <item>office</item> 1.132 - <item>development</item> 1.133 - <item>system-tools</item> 1.134 - <item>security</item> 1.135 - <item>games</item> 1.136 - <item>misc</item> 1.137 - <item>meta</item> 1.138 - <item>non-free</item> 1.139 - </combobox> 1.140 + <entry> 1.141 + <variable>SEARCH</variable> 1.142 + </entry> 1.143 <button> 1.144 - <label>List</label> 1.145 - <input file icon="reload"></input> 1.146 - <action>echo "$INSTALLABLE_CAT" > /tmp/tazpkgbox/installable-category</action> 1.147 - <action>refresh:GETIT</action> 1.148 + <label>Search Packages</label> 1.149 + <input file icon="system-search"></input> 1.150 + <action>$LIB/search</action> 1.151 + <action>refresh:RESULT_INSTALLED</action> 1.152 + <action>refresh:RESULT_MIRROR</action> 1.153 </button> 1.154 - </hbox> 1.155 - </vbox> 1.156 - 1.157 - <vbox> 1.158 - <tree> 1.159 - <width>620</width><height>240</height> 1.160 - <variable>GET</variable> 1.161 - <label>Package name|Version|Description</label> 1.162 - <input>/usr/lib/slitaz/tazpkgbox/list mirrored</input> 1.163 - <item icon="tazpkg">dummy | -</item> 1.164 - <action>echo "$GET" > /tmp/tazpkgbox/pkg</action> 1.165 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.166 - <action>refresh:PKG</action> 1.167 - <action>refresh:GETIT</action> 1.168 - <action>refresh:PKG_STATS</action> 1.169 - <action>refresh:CACHE_STATS</action> 1.170 - </tree> 1.171 - <hbox> 1.172 - <text> 1.173 - <label>"Category:"</label> 1.174 - </text> 1.175 - <combobox> 1.176 - <variable>MIRRORED_CAT</variable> 1.177 - <item>all</item> 1.178 - <item>base-system</item> 1.179 - <item>x-window</item> 1.180 - <item>utilities</item> 1.181 - <item>network</item> 1.182 - <item>graphics</item> 1.183 - <item>multimedia</item> 1.184 - <item>office</item> 1.185 - <item>development</item> 1.186 - <item>system-tools</item> 1.187 - <item>security</item> 1.188 - <item>games</item> 1.189 - <item>misc</item> 1.190 - <item>meta</item> 1.191 - <item>non-free</item> 1.192 - </combobox> 1.193 <button> 1.194 - <label>List</label> 1.195 - <input file icon="reload"></input> 1.196 - <action>echo "$MIRRORED_CAT" > /tmp/tazpkgbox/mirrored-category</action> 1.197 - <action>refresh:GET</action> 1.198 + <label>Search Files</label> 1.199 + <input file icon="system-search"></input> 1.200 + <action>$LIB/search --files</action> 1.201 + <action>refresh:RESULT_INSTALLED</action> 1.202 + <action>refresh:RESULT_MIRROR</action> 1.203 </button> 1.204 </hbox> 1.205 </vbox> 1.206 @@ -315,9 +284,9 @@ 1.207 <width>620</width><height>240</height> 1.208 <variable>DEV</variable> 1.209 <label>Package name|Version|Description</label> 1.210 - <input>/usr/lib/slitaz/tazpkgbox/list undigest</input> 1.211 + <input>$LIB/list undigest</input> 1.212 <action>echo "$DEV" > /tmp/tazpkgbox/pkg</action> 1.213 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.214 + <action>$LIB/package_infos</action> 1.215 <action>refresh:PKG</action> 1.216 <action>refresh:GETIT</action> 1.217 <action>refresh:PKG_STATS</action> 1.218 @@ -372,75 +341,6 @@ 1.219 </vbox> 1.220 1.221 <vbox> 1.222 - <tree> 1.223 - <width>620</width><height>240</height> 1.224 - <variable>BLOCKED</variable> 1.225 - <label>Package name|Version|Available|Description</label> 1.226 - <input>/usr/lib/slitaz/tazpkgbox/list blocked</input> 1.227 - <action>echo "$BLOCKED" > /tmp/tazpkgbox/pkg</action> 1.228 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.229 - <action>refresh:BLOCKED</action> 1.230 - <action>refresh:PKG_STATS</action> 1.231 - </tree> 1.232 - <hbox> 1.233 - <button> 1.234 - <label>Refresh</label> 1.235 - <input file icon="reload"></input> 1.236 - <action>refresh:BLOCKED</action> 1.237 - <action>refresh:PKG_STATS</action> 1.238 - </button> 1.239 - </hbox> 1.240 - </vbox> 1.241 - 1.242 - <vbox> 1.243 - <tree icon="tazpkg"> 1.244 - <width>620</width><height>120</height> 1.245 - <variable>RESULT_INSTALLED</variable> 1.246 - <label>Installed packages|Version|Description / File</label> 1.247 - <input>cat /tmp/tazpkgbox/search-installed</input> 1.248 - <action>echo "$RESULT_INSTALLED" > /tmp/tazpkgbox/pkg</action> 1.249 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.250 - <action>/usr/lib/slitaz/tazpkgbox/search</action> 1.251 - <action>refresh:RESULT_INSTALLED</action> 1.252 - <action>refresh:PKG</action> 1.253 - <action>refresh:PKG_STATS</action> 1.254 - <action>refresh:CACHE_STATS</action> 1.255 - </tree> 1.256 - <tree icon="tazpkg"> 1.257 - <width>620</width><height>120</height> 1.258 - <variable>RESULT_MIRROR</variable> 1.259 - <label>Mirrored packages|Version|Description / File</label> 1.260 - <input>cat /tmp/tazpkgbox/search-mirrored</input> 1.261 - <action>echo "$RESULT_MIRROR" > /tmp/tazpkgbox/pkg</action> 1.262 - <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.263 - <action>/usr/lib/slitaz/tazpkgbox/search</action> 1.264 - <action>refresh:RESULT_INSTALLED</action> 1.265 - <action>refresh:PKG</action> 1.266 - <action>refresh:PKG_STATS</action> 1.267 - <action>refresh:CACHE_STATS</action> 1.268 - </tree> 1.269 - <hbox> 1.270 - <entry> 1.271 - <variable>SEARCH</variable> 1.272 - </entry> 1.273 - <button> 1.274 - <label>Search Packages</label> 1.275 - <input file icon="system-search"></input> 1.276 - <action>/usr/lib/slitaz/tazpkgbox/search</action> 1.277 - <action>refresh:RESULT_INSTALLED</action> 1.278 - <action>refresh:RESULT_MIRROR</action> 1.279 - </button> 1.280 - <button> 1.281 - <label>Search Files</label> 1.282 - <input file icon="system-search"></input> 1.283 - <action>/usr/lib/slitaz/tazpkgbox/search --files</action> 1.284 - <action>refresh:RESULT_INSTALLED</action> 1.285 - <action>refresh:RESULT_MIRROR</action> 1.286 - </button> 1.287 - </hbox> 1.288 - </vbox> 1.289 - 1.290 - <vbox> 1.291 <frame Files and Cache directory> 1.292 <text use-markup="true" width-chars="60" wrap="false"> 1.293 <label>" 1.294 @@ -528,7 +428,7 @@ 1.295 1.296 <hbox> 1.297 <text wrap="false"> 1.298 - <input>installed=`ls /var/lib/tazpkg/installed | wc -l`; mirrored=`cat /var/lib/tazpkg/packages.list | wc -l`; undigest=`cat /var/lib/tazpkg/undigest/*/packages.list 2> /dev/null | wc -l`; blocked=`cat /var/lib/tazpkg/blocked-packages.list 2> /dev/null | wc -l`; installable=$(($mirrored + $undigest - $installed)); [ $installable -lt 0 ] && installable=0; echo "Packages: $installed installed, $blocked blocked, $installable installable, $undigest undigest, $mirrored mirrored, `cat /var/lib/tazpkg/upgradable-packages.list 2> /dev/null | wc -l` to upgrade "</input> 1.299 + <input>installed=`ls /var/lib/tazpkg/installed | wc -l`; mirrored=`cat /var/lib/tazpkg/packages.list | wc -l`; undigest=`cat /var/lib/tazpkg/undigest/*/packages.list 2> /dev/null | wc -l`; blocked=`cat /var/lib/tazpkg/blocked-packages.list 2> /dev/null | wc -l`; installable=$(($mirrored + $undigest - $installed)); [ $installable -lt 0 ] && installable=0; echo "Packages statistics: $installed installed, $blocked blocked, $installable installable, $undigest undigest, $mirrored mirrored, `cat /var/lib/tazpkg/upgradable-packages.list 2> /dev/null | wc -l` to upgrade "</input> 1.300 <variable>PKG_STATS</variable> 1.301 </text> 1.302 </hbox>