tazpkg diff oldstuff/tazpkgbox @ rev 787

tazpkg: Add minor changes to grab wanted.txt, depends.txt, and libraries.txt if they exist in repo.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Apr 18 17:43:23 2015 +0000 (2015-04-18)
parents 185778056b84
children 1c61f2488440
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/oldstuff/tazpkgbox	Sat Apr 18 17:43:23 2015 +0000
     1.3 @@ -0,0 +1,636 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# GTKdialog interface to SliTaz Packages Manager aka Tazpkg. Note:
     1.7 +# Notebook tabs are <vbox>. Tabs are used to indent and functions are
     1.8 +# split and found in libtazpkgbox.
     1.9 +#
    1.10 +# (C) GNU gpl v3 - SliTaz GNU/Linux 2010-2011.
    1.11 +#
    1.12 +
    1.13 +# Functions path.
    1.14 +export LIB=/usr/lib/slitaz/libtazpkgbox
    1.15 +
    1.16 +# Tazpkgbox is only for root.
    1.17 +if test $(id -u) != 0 ; then
    1.18 +	exec subox tazpkgbox
    1.19 +	exit 0
    1.20 +fi
    1.21 +
    1.22 +# Include gettext helper script.
    1.23 +. /usr/bin/gettext.sh
    1.24 +
    1.25 +# Export package name for gettext.
    1.26 +TEXTDOMAIN='tazpkgbox'
    1.27 +export TEXTDOMAIN
    1.28 +
    1.29 +# We need at least a mirror URL.
    1.30 +if [ ! -f /var/lib/tazpkg/mirror ]; then
    1.31 +	tazpkg >/dev/null
    1.32 +fi
    1.33 +
    1.34 +RELEASE=$(cat /etc/slitaz-release)
    1.35 +case "$1" in
    1.36 +dliso)
    1.37 +	echo "Downloading packages-$RELEASE.iso into $2..."
    1.38 +	cd $2
    1.39 +	for i in $(cat /var/lib/tazpkg/mirror) ; do
    1.40 +		wget ${i%packages*}/iso/$RELEASE/packages-$RELEASE.iso && break
    1.41 +	done
    1.42 +	exit 0;;
    1.43 +instiso)
    1.44 +	PKGSIGN="LABEL=\"packages-$RELEASE\" TYPE=\"iso9660\""
    1.45 +	PKGDEV=$(blkid $2 | grep "$PKGSIGN" | cut -d: -f1)
    1.46 +	[ -z "$PKGDEV$2" -a -L /dev/cdrom ] && PKGDEV=$(blkid /dev/cdrom | grep "$PKGSIGN" | cut -d: -f1)
    1.47 +	if [ -n "$PKGDEV" ]; then
    1.48 +		mkdir /packages 2> /dev/null
    1.49 +		mount -t iso9660 -o ro $PKGDEV /packages
    1.50 +		/packages/install.sh
    1.51 +	fi
    1.52 +	exit 0;;
    1.53 +esac
    1.54 +# Tmp dir and files used to get pkgs info on the fly. Clean also
    1.55 +# lists and searches for files to load less data and have a faster start.
    1.56 +mkdir -p /tmp/tazpkgbox
    1.57 +echo "all" > /tmp/tazpkgbox/status
    1.58 +echo "all" > /tmp/tazpkgbox/category
    1.59 +echo "all" > /tmp/tazpkgbox/undigest-category
    1.60 +echo "" > /tmp/tazpkgbox/search
    1.61 +
    1.62 +# English/French help dialog.
    1.63 +export HELP='
    1.64 +<window title="Tazpkgbox Help" icon-name="help">
    1.65 +<vbox>
    1.66 +	<text use-markup="true" width-chars="54">
    1.67 +		<label>"
    1.68 +<b>Tazpkgbox - Packages Manager Help</b>"
    1.69 +		</label>
    1.70 +	</text>
    1.71 +
    1.72 +	<frame English>
    1.73 +		<text wrap="false">
    1.74 +			<label>"
    1.75 +Tazpkgbox is a simple and easy to use interface to the SliTaz
    1.76 +package manager - aka Tazpkg. You can install, remove, repack or 
    1.77 +get packages by double-clicking on the package item. A Search 
    1.78 +engine allows you to find and install new applications in a few 
    1.79 +mouse clicks."
    1.80 +			</label>
    1.81 +		</text>
    1.82 +	</frame>
    1.83 +
    1.84 +	<frame Français>
    1.85 +		<text wrap="false">
    1.86 +			<label>"
    1.87 +Tazpkgbox est une interface graphique au gestionnaire de paquet
    1.88 +de Slitaz aka Tazpkg. Simple et facile à utiliser, vous pouvez
    1.89 +installer, télécharger ou supprimer des paquets en double-cliquant
    1.90 +sur sa ligne. La fonction de recherche permet de facilement trouver
    1.91 +et installer des logiciels ou fichiers."
    1.92 +			</label>
    1.93 +		</text>
    1.94 +	</frame>
    1.95 +
    1.96 +	<hbox>
    1.97 +		<button ok>
    1.98 +			<action type="closewindow">HELP</action>
    1.99 +		</button>
   1.100 +	</hbox>
   1.101 +</vbox>
   1.102 +</window>
   1.103 +'
   1.104 +
   1.105 +FILES="$2"
   1.106 +[ "$1" = "list_config" ] || FILES=""
   1.107 +
   1.108 +export SETUP_DVD="
   1.109 +<window title=\"Packages archive\" icon-name=\"media-cdrom\">
   1.110 +<vbox>
   1.111 +	<text use-markup=\"true\" width-chars=\"54\">
   1.112 +		<label>\"
   1.113 +<b>Tazpkgbox - Packages Archive Manager</b>\"
   1.114 +		</label>
   1.115 +	</text>
   1.116 +	<frame English>
   1.117 +		<text wrap=\"false\">
   1.118 +			<label>\"
   1.119 +An ISO image with all $(cat /etc/slitaz-release) packages is available on Slitaz mirrors.
   1.120 +You can burn it onto a DVD or install it on an USB key and each
   1.121 +package becomes installable without an Internet connection.\"
   1.122 +			</label>
   1.123 +		</text>
   1.124 +	</frame>
   1.125 +
   1.126 +	<frame Français>
   1.127 +		<text wrap=\"false\">
   1.128 +			<label>\"
   1.129 +Une image ISO installable sur clé USB ou gravable sur DVD est
   1.130 +disponible sur les mirroirs Slitaz. Elle contient tous les paquets
   1.131 +de la version $(cat /etc/slitaz-release) pour pouvoir installer des paquets sans
   1.132 +connexion Internet.\"
   1.133 +			</label>
   1.134 +		</text>
   1.135 +	</frame>
   1.136 +	<frame>
   1.137 +	<hbox>
   1.138 +		<text use-markup=\"true\">
   1.139 +			<label>\"<b>ISO image : </b>\"</label>
   1.140 +		</text>
   1.141 +		<entry>
   1.142 +			<variable>PKGISO</variable>
   1.143 +		</entry>
   1.144 +		<button>
   1.145 +			<input file stock=\"gtk-open\"></input>
   1.146 +			<action type=\"fileselect\">PKGISO</action>
   1.147 +		</button>
   1.148 +		<button>
   1.149 +			<label>Install ISO</label>
   1.150 +			<input file icon=\"go-jump\"></input>
   1.151 +			<action>xterm -T \"Install ISO\" -geometry 80x16+120+120 -e \"tazpkgbox instiso \$PKGISO; sleep 2\" 2>/dev/null</action>
   1.152 +			<action>refresh:PKG</action>
   1.153 +			<action>refresh:PKG_STATS</action>
   1.154 +			<action>refresh:CACHE_STATS</action>
   1.155 +		</button>
   1.156 +	</hbox>
   1.157 +	</frame>
   1.158 +	<hbox>
   1.159 +		<button>
   1.160 +			<label>Download ISO</label>
   1.161 +			<input file icon=\"system-software-update\"></input>
   1.162 +			<action>xterm -T \"Download ISO\" -geometry 80x16+120+120 -e \"tazpkgbox dliso /tmp; sleep 2\" 2>/dev/null</action>
   1.163 +		</button>
   1.164 +		<button>
   1.165 +			<input file icon=\"media-cdrom\"></input>
   1.166 +			<label>Burn DVD</label>
   1.167 +			<action>burnbox</action>
   1.168 +		</button>
   1.169 +		<button>
   1.170 +			<label>Install DVD/USB key</label>
   1.171 +			<input file icon=\"go-jump\"></input>
   1.172 +			<action>xterm -T \"Install DVD/USB key\" -geometry 80x16+120+120 -e \"tazpkgbox instiso; sleep 2\" 2>/dev/null</action>
   1.173 +			<action>refresh:PKG</action>
   1.174 +			<action>refresh:PKG_STATS</action>
   1.175 +			<action>refresh:CACHE_STATS</action>
   1.176 +		</button>
   1.177 +		<button>
   1.178 +			<input file icon=\"gtk-close\"></input>
   1.179 +			<action type=\"closewindow\">SETUP_DVD</action>
   1.180 +		</button>
   1.181 +	</hbox>
   1.182 +</vbox>
   1.183 +</window>
   1.184 +"
   1.185 +
   1.186 +export LIST_CONFIG_FILES="
   1.187 +<window title=\"configuration files\" icon-name=\"system-file-manager\">
   1.188 +  <vbox>
   1.189 +	<tree exported_column=\"5\">
   1.190 +		<width>560</width><height>160</height>
   1.191 +		<variable>CONF_FILE</variable>
   1.192 +		<label>Access | User | Group | Size | Update Date | Name</label>
   1.193 +		<input>tazpkg list-config --box $FILES</input>
   1.194 +		<action>leafpad \$CONF_FILE</action>
   1.195 +	</tree>
   1.196 +	<hbox>
   1.197 +		<text wrap=\"false\">
   1.198 +			<label>
   1.199 +\"Only files with Update Date have been modified after package installation\"
   1.200 +			</label>
   1.201 +		</text>
   1.202 +		<button>
   1.203 +			<input file icon=\"gtk-close\"></input>
   1.204 +			<action type=\"closewindow\">INSTALLED_PACKAGE_ACTIONS</action>
   1.205 +		</button>
   1.206 +	</hbox>
   1.207 +  </vbox>
   1.208 +</window>
   1.209 +"
   1.210 +if [ "$1" = "list_config" ]; then
   1.211 +	gtkdialog --center --program=LIST_CONFIG_FILES >/dev/null
   1.212 +	exit 0
   1.213 +fi
   1.214 +
   1.215 +export SETUP_UNDIGEST='
   1.216 +<window title="undigest mirrors" icon-name="tazpkg">
   1.217 +  <vbox>
   1.218 +	<tree>
   1.219 +		<width>560</width><height>160</height>
   1.220 +		<variable>UNDIGEST_LIST</variable>
   1.221 +		<label>Name | URL</label>
   1.222 +		<input>tazpkg list-undigest --box</input>
   1.223 +		<action>xterm -T "Remove undigest" -geometry 80x16+120+120 -e "tazpkg remove-undigest $UNDIGEST_LIST; sleep 2"</action>
   1.224 +	</tree>
   1.225 +	<hbox>
   1.226 +		<text>
   1.227 +			<label>URL:</label>
   1.228 +		</text>
   1.229 +		<entry>
   1.230 +			<variable>UNDIGEST_URL</variable>
   1.231 +		</entry>
   1.232 +	</hbox>
   1.233 +	<hbox>
   1.234 +		<text>
   1.235 +			<label>Name:</label>
   1.236 +		</text>
   1.237 +		<entry>
   1.238 +			<variable>UNDIGEST_NAME</variable>
   1.239 +		</entry>
   1.240 +		<button>
   1.241 +			<label>Add</label>
   1.242 +			<input file icon="gtk-add"></input>
   1.243 +			<action>tazpkg add-undigest "$UNDIGEST_NAME" $UNDIGEST_URL</action>
   1.244 +			<action>refresh:UNDIGEST_LIST</action>
   1.245 +		</button>
   1.246 +		<button>
   1.247 +			<label>Remove</label>
   1.248 +			<input file icon="gtk-remove"></input>
   1.249 +			<action>xterm -T "Remove undigest" -geometry 80x16+120+120 -e "tazpkg remove-undigest $UNDIGEST_NAME; sleep 2"</action>
   1.250 +			<action>refresh:UNDIGEST_LIST</action>
   1.251 +		</button>
   1.252 +		<button>
   1.253 +			<label>Update</label>
   1.254 +			<input file icon="reload"></input>
   1.255 +			<action>tazpkg setup-undigest "$UNDIGEST_NAME" $UNDIGEST_URL</action>
   1.256 +			<action>refresh:UNDIGEST_LIST</action>
   1.257 +		</button>
   1.258 +		<button>
   1.259 +			<input file icon="gtk-close"></input>
   1.260 +			<action type="closewindow">SETUP_UNDIGEST</action>
   1.261 +		</button>
   1.262 +	</hbox>
   1.263 +  </vbox>
   1.264 +</window>
   1.265 +'
   1.266 +
   1.267 +# Scan notification
   1.268 +desktopbox notify "Scanning packages database" 6 &
   1.269 +
   1.270 +# Main dialog
   1.271 +export TAZPKG_DIALOG='
   1.272 +<window title="SliTaz Packages Manager" icon-name="package-x-generic">
   1.273 +<vbox>
   1.274 +
   1.275 +	<hbox>
   1.276 +		<text use-markup="true">
   1.277 +			<label>"<b>Packages Manager</b>"</label>
   1.278 +		</text>
   1.279 +		<pixmap>
   1.280 +			<input file>/usr/share/pixmaps/tazpkg.png</input>
   1.281 +		</pixmap>
   1.282 +	</hbox>
   1.283 +
   1.284 +	<notebook labels="Packages|Search|Undigest|Configuration">
   1.285 +
   1.286 +	<vbox>
   1.287 +		<tree>
   1.288 +			<width>620</width><height>240</height>
   1.289 +			<variable>PKG</variable>
   1.290 +			<label>Name|Version|Description</label>
   1.291 +			<input icon_column="0">$LIB list-all</input>
   1.292 +			<action>echo "$PKG" > /tmp/tazpkgbox/pkg</action>
   1.293 +			<action>$LIB package-infos</action>
   1.294 +			<action>refresh:PKG</action>
   1.295 +			<action>refresh:PKG_STATS</action>
   1.296 +			<action>refresh:CACHE_STATS</action>
   1.297 +		</tree>
   1.298 +		<hbox>
   1.299 +			<text>
   1.300 +				<label>"Status:"</label>
   1.301 +			</text>
   1.302 +			<combobox>
   1.303 +				<variable>STATUS</variable>
   1.304 +				<item>all</item>
   1.305 +				<item>installed</item>
   1.306 +				<item>installable</item>
   1.307 +				<item>blocked</item>
   1.308 +				<item>upgradeable</item>
   1.309 +				<item>linkable</item>
   1.310 +			</combobox>
   1.311 +			<text>
   1.312 +				<label>"Category:"</label>
   1.313 +			</text>
   1.314 +			<combobox>
   1.315 +				<variable>CAT</variable>
   1.316 +				<item>all</item>
   1.317 +				<item>base-system</item>
   1.318 +				<item>x-window</item>
   1.319 +				<item>utilities</item>
   1.320 +				<item>network</item>
   1.321 +				<item>graphics</item>
   1.322 +				<item>multimedia</item>
   1.323 +				<item>office</item>
   1.324 +				<item>development</item>
   1.325 +				<item>system-tools</item>
   1.326 +				<item>security</item>
   1.327 +				<item>games</item>
   1.328 +				<item>misc</item>
   1.329 +				<item>meta</item>
   1.330 +				<item>non-free</item>
   1.331 +			</combobox>
   1.332 +			<button>
   1.333 +				<label>List Packages</label>
   1.334 +				<input file icon="reload"></input>
   1.335 +				<action>echo "$CAT" > /tmp/tazpkgbox/category</action>
   1.336 +				<action>echo "$STATUS" > /tmp/tazpkgbox/status</action>
   1.337 +				<action>refresh:PKG</action>
   1.338 +			</button>
   1.339 +		</hbox>
   1.340 +	</vbox>
   1.341 +
   1.342 +	<vbox>
   1.343 +		<tree>
   1.344 +			<width>620</width><height>120</height>
   1.345 +			<variable>RESULT</variable>
   1.346 +			<label>Packages Name|Version|Description / File</label>
   1.347 +			<input icon_column="0">cat /tmp/tazpkgbox/search</input>
   1.348 +			<action>echo "$RESULT" > /tmp/tazpkgbox/pkg</action>
   1.349 +			<action>$LIB package-infos</action>
   1.350 +			<action>$LIB search-packages</action>
   1.351 +			<action>refresh:RESULT</action>
   1.352 +			<action>refresh:PKG</action>
   1.353 +			<action>refresh:PKG_STATS</action>
   1.354 +			<action>refresh:CACHE_STATS</action>
   1.355 +		</tree>
   1.356 +		<hbox>
   1.357 +			<text>
   1.358 +				<label>" Search: "</label>
   1.359 +			</text>
   1.360 +			<entry activates-default="true">
   1.361 +				<variable>SEARCH</variable>
   1.362 +			</entry>
   1.363 +			<button can-default="true" has-default="true">
   1.364 +				<label>Packages/Description</label>
   1.365 +				<input file icon="system-search"></input>
   1.366 +				<action>$LIB search-packages</action>
   1.367 +				<action>refresh:RESULT</action>
   1.368 +			</button>
   1.369 +			<button>
   1.370 +				<label>Files</label>
   1.371 +				<input file icon="system-search"></input>
   1.372 +				<action>$LIB search-files</action>
   1.373 +				<action>refresh:RESULT</action>
   1.374 +			</button>
   1.375 +'
   1.376 +tmp='
   1.377 +			<button>
   1.378 +				<label>Tags</label>
   1.379 +				<input file icon="system-search"></input>
   1.380 +				<action>$LIB search-tags</action>
   1.381 +				<action>refresh:RESULT</action>
   1.382 +			</button>
   1.383 +'
   1.384 +[ -d /home/slitaz/wok ] && TAZPKG_DIALOG="$TAZPKG_DIALOG $tmp"
   1.385 +tmp='
   1.386 +		</hbox>
   1.387 +	</vbox>
   1.388 +
   1.389 +	<vbox>
   1.390 +		<tree>
   1.391 +			<width>620</width><height>240</height>
   1.392 +			<variable>DEV</variable>
   1.393 +			<label>Name|Version|Description</label>
   1.394 +			<input icon_column="0">$LIB list-undigest</input>
   1.395 +			<action>echo "$DEV" > /tmp/tazpkgbox/pkg</action>
   1.396 +			<action>$LIB package-infos</action>
   1.397 +			<action>refresh:PKG</action>
   1.398 +			<action>refresh:PKG_STATS</action>
   1.399 +			<action>refresh:CACHE_STATS</action>
   1.400 +		</tree>
   1.401 +		
   1.402 +		<hbox>
   1.403 +			
   1.404 +			<button>
   1.405 +				<label>Setup/Add undigest mirrors</label>
   1.406 +				<input file icon="go-next"></input>
   1.407 +				<action type="launch">SETUP_UNDIGEST</action>
   1.408 +			</button>
   1.409 +		</hbox>
   1.410 +		<frame List packages on undigest (unofficial or private) mirrors>
   1.411 +			<hbox> 
   1.412 +				<text>
   1.413 +					<label>"Undigest:"</label>
   1.414 +				</text>
   1.415 +				<combobox>
   1.416 +					<variable>UNDIGEST_ENTRY</variable>
   1.417 +'
   1.418 +TAZPKG_DIALOG="$TAZPKG_DIALOG $tmp"
   1.419 +for i in all $(ls /var/lib/tazpkg/undigest 2> /dev/null); do
   1.420 +	TAZPKG_DIALOG="$TAZPKG_DIALOG <item>$i</item> "
   1.421 +done
   1.422 +tmp='			</combobox>		
   1.423 +            			
   1.424 +				<text>
   1.425 +					<label>"Status:"</label>
   1.426 +				</text>
   1.427 +				<combobox>
   1.428 +					<variable>UNDIGEST_STATUS</variable>
   1.429 +					<item>all</item>
   1.430 +					<item>installed</item>
   1.431 +					<item>installable</item>
   1.432 +					<item>blocked</item>
   1.433 +					<item>upgradeable</item>
   1.434 +				</combobox>
   1.435 +			</hbox>
   1.436 +			<hbox>	
   1.437 +				<text>
   1.438 +					<label>"Category:"</label>
   1.439 +				</text>
   1.440 +				<combobox>
   1.441 +					<variable>UNDIGEST_CAT</variable>
   1.442 +					<item>all</item>
   1.443 +					<item>base-system</item>
   1.444 +					<item>x-window</item>
   1.445 +					<item>utilities</item>
   1.446 +					<item>network</item>
   1.447 +					<item>graphics</item>
   1.448 +					<item>multimedia</item>
   1.449 +					<item>office</item>
   1.450 +					<item>development</item>
   1.451 +					<item>system-tools</item>
   1.452 +					<item>security</item>
   1.453 +					<item>games</item>
   1.454 +					<item>misc</item>
   1.455 +					<item>meta</item>
   1.456 +					<item>non-free</item>
   1.457 +				</combobox>
   1.458 +				<text>
   1.459 +					<label>"          "</label>
   1.460 +				</text>
   1.461 +				<button>
   1.462 +					<label>"      List Packages            "</label>
   1.463 +					<input file icon="reload"></input>
   1.464 +					<action>echo "$UNDIGEST_CAT $UNDIGEST_ENTRY $UNDIGEST_STATUS" > /tmp/tazpkgbox/undigest-category</action>
   1.465 +					<action>refresh:DEV</action>
   1.466 +				</button>
   1.467 +				</hbox>	
   1.468 +		</frame>		
   1.469 +			
   1.470 +	</vbox>
   1.471 +
   1.472 +	<vbox>
   1.473 +		<frame Files and Cache directory>
   1.474 +			<text use-markup="true" width-chars="60" wrap="false">
   1.475 +				<label>"
   1.476 +Lists, mirror URL and installed packages: <b>/var/lib/tazpkg</b>
   1.477 +The cache directory is used to store downloaded or repacked packages.
   1.478 +				"</label>
   1.479 +			</text>
   1.480 +			<hbox>
   1.481 +				<entry editable="false">
   1.482 +					<input>cd /var/cache/tazpkg; echo "Packages: `ls | wc -l`, size: `du -sh $PWD`"</input>
   1.483 +					<variable>CACHE_STATS</variable>
   1.484 +				</entry>
   1.485 +				<button>
   1.486 +					<label>Clean cache</label>
   1.487 +					<input file icon="go-next"></input>
   1.488 +					<action>rm -rf /var/cache/tazpkg/*</action>
   1.489 +					<action>refresh:CACHE_STATS</action>
   1.490 +				</button>
   1.491 +			</hbox>
   1.492 +		</frame>
   1.493 +		<frame Filesystem link (to install packages as a soft link from another mounted Slitaz)>
   1.494 +			<hbox>
   1.495 +				<entry>
   1.496 +					<input>readlink /var/lib/tazpkg/fslink</input>
   1.497 +					<variable>FSLINK</variable>
   1.498 +				</entry>
   1.499 +				<button>
   1.500 +					<label>Setup</label>
   1.501 +					<input file icon="go-next"></input>
   1.502 +					<action>rm -f /var/lib/tazpkg/fslink ; [ "$FSLINK" != "/" -a -d $FSLINK/var/lib/tazpkg ] && ln -s $FSLINK /var/lib/tazpkg/fslink</action>
   1.503 +					<action>clear:FSLINK</action>
   1.504 +					<action>refresh:FSLINK</action>
   1.505 +				</button>
   1.506 +				<button>
   1.507 +					<label>Mountbox</label>
   1.508 +					<input file icon="media-flash"></input>
   1.509 +					<action>mountbox</action>
   1.510 +				</button>
   1.511 +			</hbox>
   1.512 +		</frame>
   1.513 +		<hbox>
   1.514 +		<frame Mirror URL>
   1.515 +			<hbox>
   1.516 +				<entry>
   1.517 +					<input>head -n 1 /var/lib/tazpkg/mirror</input>
   1.518 +					<variable>MIRROR</variable>
   1.519 +				</entry>
   1.520 +				<button>
   1.521 +					<label>Setup</label>
   1.522 +					<input file icon="go-next"></input>
   1.523 +					<action>echo "$MIRROR" > /var/lib/tazpkg/mirror</action>
   1.524 +					<action>clear:MIRROR</action>
   1.525 +					<action>refresh:MIRROR</action>
   1.526 +				</button>
   1.527 +				<button>
   1.528 +					<label>Add</label>
   1.529 +					<input file icon="gtk-add"></input>
   1.530 +					<action>echo "$MIRROR" >> /var/lib/tazpkg/mirror</action>
   1.531 +					<action>clear:MIRROR</action>
   1.532 +					<action>refresh:MIRROR</action>
   1.533 +				</button>
   1.534 +			</hbox>
   1.535 +		</frame>
   1.536 +		<frame Mirror Packages>
   1.537 +				<hbox>	
   1.538 +				<button>
   1.539 +					<input file icon="media-cdrom"></input>
   1.540 +					<label>DVD Box</label>
   1.541 +					<action type="launch">SETUP_DVD</action>
   1.542 +				</button>
   1.543 +				</hbox>
   1.544 +		</frame>
   1.545 +		</hbox>
   1.546 +		<hbox>
   1.547 +			<frame Install Logs>
   1.548 +				<hbox>
   1.549 +				<button>
   1.550 +					<label>View Logs</label>
   1.551 +					<input file icon="find"></input>
   1.552 +					<action>xterm -fa MiscFixed -fs 11 -T "$(ls -l /var/log/tazpkg.log | while read mod links user grep remain ; do echo $remain ; done) (q to quit)" -geometry 80x25+120+120 -e "cat /var/log/tazpkg.log | less"</action>
   1.553 +				</button>
   1.554 +				</hbox>
   1.555 +			</frame>
   1.556 +			<frame Configuration files>
   1.557 +				<hbox>
   1.558 +				<button>
   1.559 +					<label>Repack config</label>
   1.560 +					<input file icon="edit-redo"></input>
   1.561 +					<action>xterm -fa MiscFixed -fs 11 -T "Repack configs" -geometry 80x25+120+120 -e "tazpkg repack-config ; sleep 5" 2> /dev/null</action>
   1.562 +				</button>
   1.563 +				<button>
   1.564 +					<label>View Files</label>
   1.565 +					<input file icon="tazpkg"></input>
   1.566 +					<action type="launch">LIST_CONFIG_FILES</action>
   1.567 +				</button>
   1.568 +				</hbox>
   1.569 +			</frame>
   1.570 +			<frame Packages check>
   1.571 +			<hbox>
   1.572 +				<button>
   1.573 +					<label>Quick check</label>
   1.574 +					<input file icon="system-search"></input>
   1.575 +					<action>xterm -fa MiscFixed -fs 11 -T "Check packages (q to quit)" -geometry 80x25+120+120 -e "tazpkg check | less " 2> /dev/null</action>
   1.576 +				</button>
   1.577 +				<button>
   1.578 +					<label>Full check</label>
   1.579 +					<input file icon="system-search"></input>
   1.580 +					<action>xterm -fa MiscFixed -fs 11 -T "Check packages (q to quit)" -geometry 80x25+120+120 -e "tazpkg check --full | less " 2> /dev/null</action>
   1.581 +				</button>
   1.582 +				</hbox>
   1.583 +			</frame>
   1.584 +		</hbox>
   1.585 +	</vbox>
   1.586 +
   1.587 +	</notebook>
   1.588 +
   1.589 +	<hbox>
   1.590 +		<text wrap="false" width-chars="82">
   1.591 +			<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 -n "Packages statistics: $installed installed, $blocked blocked, $installable installable, $undigest undigest, $mirrored mirrored, `cat /var/lib/tazpkg/upgradeable-packages.list 2> /dev/null | wc -l` to upgrade "</input>
   1.592 +			<variable>PKG_STATS</variable>
   1.593 +		</text>
   1.594 +	</hbox>
   1.595 +
   1.596 +	<hbox>
   1.597 +		<button>
   1.598 +			<label>Recharge lists</label>
   1.599 +			<input file icon="system-software-update"></input>
   1.600 +			<action>xterm -T "Recharge" -geometry 80x16+120+120 -e "tazpkg recharge ; tazpkg upgradeable" 2>/dev/null</action>
   1.601 +			<action>refresh:DEV</action>
   1.602 +			<action>refresh:PKG</action>
   1.603 +			<action>refresh:PKG_STATS</action>
   1.604 +			<action>refresh:CACHE_STATS</action>
   1.605 +		</button>
   1.606 +		<button>
   1.607 +			<label>Upgrade all</label>
   1.608 +			<input file icon="system-software-update"></input>
   1.609 +			<action>xterm -T "Package upgrade" -geometry 80x16+120+120 -e "tazpkg upgrade; sleep 2" 2>/dev/null</action>
   1.610 +			<action>refresh:PKG</action>
   1.611 +			<action>refresh:DEV</action>
   1.612 +			<action>refresh:PKG_STATS</action>
   1.613 +			<action>refresh:CACHE_STATS</action>
   1.614 +		</button>
   1.615 +		<button>
   1.616 +			<label> View Wok</label>
   1.617 +			<input file icon="gtk-open"></input>
   1.618 +			<action>browser http://hg.slitaz.org/wok/file/</action>
   1.619 +		</button>
   1.620 +		<button help>
   1.621 +			<label>Help</label>
   1.622 +			<action type="launch">HELP</action>
   1.623 +		</button>
   1.624 +		<button>
   1.625 +			<label>Exit</label>
   1.626 +			<input file icon="exit"></input>
   1.627 +			<action type="exit">Exit</action>
   1.628 +		</button>
   1.629 +	</hbox>
   1.630 +
   1.631 +</vbox>
   1.632 +
   1.633 +</window>
   1.634 +'
   1.635 +TAZPKG_DIALOG="$TAZPKG_DIALOG$tmp"
   1.636 +
   1.637 +gtkdialog --center --program=TAZPKG_DIALOG #>/dev/null
   1.638 +
   1.639 +exit 0