tazpkg diff tazpkgbox @ rev 187
Add undigest support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Oct 27 23:12:36 2008 +0000 (2008-10-27) |
parents | 7a68f9b5e1c2 |
children | 145e4d5def86 |
line diff
1.1 --- a/tazpkgbox Sun Oct 26 21:56:15 2008 +0000 1.2 +++ b/tazpkgbox Mon Oct 27 23:12:36 2008 +0000 1.3 @@ -6,7 +6,7 @@ 1.4 # 1.5 # (C) GNU gpl v3 - SliTaz GNU/Linux 2008. 1.6 # 1.7 -VERSION=2.3 1.8 +VERSION=2.5 1.9 1.10 # Tazpkgbox is only for root. 1.11 if test $(id -u) != 0 ; then 1.12 @@ -25,6 +25,7 @@ 1.13 echo "all" > /tmp/tazpkgbox/installed-category 1.14 echo "all" > /tmp/tazpkgbox/installable-category 1.15 echo "all" > /tmp/tazpkgbox/mirrored-category 1.16 +echo "all" > /tmp/tazpkgbox/undigest-category 1.17 echo "" > /tmp/tazpkgbox/search-installed 1.18 echo "" > /tmp/tazpkgbox/search-mirrored 1.19 1.20 @@ -97,6 +98,58 @@ 1.21 </window> 1.22 ' 1.23 1.24 +export SETUP_UNDIGEST=' 1.25 +<window title="undigest mirrors" icon-name="tazpkg"> 1.26 + <vbox> 1.27 + <tree> 1.28 + <width>560</width><height>160</height> 1.29 + <variable>UNDIGEST_LIST</variable> 1.30 + <label>Name | URL</label> 1.31 + <input>tazpkg list-undigest --box</input> 1.32 + <action>xterm -T "Remove undigest" -geometry 80x16+120+120 -e "tazpkg remove-undigest $UNDIGEST_LIST; sleep 2"</action> 1.33 + </tree> 1.34 + <hbox> 1.35 + <text> 1.36 + <label>URL:</label> 1.37 + </text> 1.38 + <entry> 1.39 + <variable>UNDIGEST_URL</variable> 1.40 + </entry> 1.41 + </hbox> 1.42 + <hbox> 1.43 + <text> 1.44 + <label>Name:</label> 1.45 + </text> 1.46 + <entry> 1.47 + <variable>UNDIGEST_NAME</variable> 1.48 + </entry> 1.49 + <button> 1.50 + <label>Add</label> 1.51 + <input file icon="gtk-add"></input> 1.52 + <action>tazpkg add-undigest "$UNDIGEST_NAME" $UNDIGEST_URL</action> 1.53 + <action>refresh:UNDIGEST_LIST</action> 1.54 + </button> 1.55 + <button> 1.56 + <label>Remove</label> 1.57 + <input file icon="gtk-remove"></input> 1.58 + <action>xterm -T "Remove undigest" -geometry 80x16+120+120 -e "tazpkg remove-undigest $UNDIGEST_NAME; sleep 2"</action> 1.59 + <action>refresh:UNDIGEST_LIST</action> 1.60 + </button> 1.61 + <button> 1.62 + <label>Update</label> 1.63 + <input file icon="reload"></input> 1.64 + <action>tazpkg setup-undigest "$UNDIGEST_NAME" $UNDIGEST_URL</action> 1.65 + <action>refresh:UNDIGEST_LIST</action> 1.66 + </button> 1.67 + <button> 1.68 + <input file icon="gtk-close"></input> 1.69 + <action type="closewindow">SETUP_UNDIGEST</action> 1.70 + </button> 1.71 + </hbox> 1.72 + </vbox> 1.73 +</window> 1.74 +' 1.75 + 1.76 # Main dialog 1.77 export TAZPKG_DIALOG=' 1.78 <window title="SliTaz Packages Manager" icon-name="package-x-generic"> 1.79 @@ -111,7 +164,7 @@ 1.80 </pixmap> 1.81 </hbox> 1.82 1.83 - <notebook labels="Installed|Installable|Mirrored|Blocked|Search|Configuration"> 1.84 + <notebook labels="Installed|Installable|Mirrored|Undigest|Blocked|Search|Configuration"> 1.85 1.86 <vbox> 1.87 <tree> 1.88 @@ -122,6 +175,7 @@ 1.89 <action>echo "$PKG" > /tmp/tazpkgbox/pkg</action> 1.90 <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.91 <action>refresh:PKG</action> 1.92 + <action>refresh:GETIT</action> 1.93 <action>refresh:PKG_STATS</action> 1.94 <action>refresh:CACHE_STATS</action> 1.95 </tree> 1.96 @@ -209,6 +263,8 @@ 1.97 <label>Recharge list</label> 1.98 <input file icon="system-software-update"></input> 1.99 <action>xterm -T "Recharge" -geometry 80x16+120+120 -e "tazpkg recharge; sleep 2" 2>/dev/null</action> 1.100 + <action>refresh:DEV</action> 1.101 + <action>refresh:GET</action> 1.102 <action>refresh:GETIT</action> 1.103 <action>refresh:PKG_STATS</action> 1.104 </button> 1.105 @@ -224,6 +280,7 @@ 1.106 <action>echo "$GET" > /tmp/tazpkgbox/pkg</action> 1.107 <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.108 <action>refresh:PKG</action> 1.109 + <action>refresh:GETIT</action> 1.110 <action>refresh:PKG_STATS</action> 1.111 <action>refresh:CACHE_STATS</action> 1.112 </tree> 1.113 @@ -259,7 +316,9 @@ 1.114 <label>Recharge list</label> 1.115 <input file icon="system-software-update"></input> 1.116 <action>xterm -T "Recharge" -geometry 80x16+120+120 -e "tazpkg recharge; sleep 2" 2>/dev/null</action> 1.117 + <action>refresh:DEV</action> 1.118 <action>refresh:GET</action> 1.119 + <action>refresh:GETIT</action> 1.120 <action>refresh:PKG_STATS</action> 1.121 </button> 1.122 </hbox> 1.123 @@ -268,6 +327,73 @@ 1.124 <vbox> 1.125 <tree> 1.126 <width>620</width><height>240</height> 1.127 + <variable>DEV</variable> 1.128 + <label>Package name|Version|Description</label> 1.129 + <input>/usr/lib/slitaz/tazpkgbox/list undigest</input> 1.130 + <action>echo "$DEV" > /tmp/tazpkgbox/pkg</action> 1.131 + <action>/usr/lib/slitaz/tazpkgbox/package_infos</action> 1.132 + <action>refresh:PKG</action> 1.133 + <action>refresh:GETIT</action> 1.134 + <action>refresh:PKG_STATS</action> 1.135 + <action>refresh:CACHE_STATS</action> 1.136 + </tree> 1.137 + <hbox> 1.138 + <button> 1.139 + <label>Setup undigest mirrors</label> 1.140 + <input file icon="go-next"></input> 1.141 + <action type="launch">SETUP_UNDIGEST</action> 1.142 + </button> 1.143 + <button> 1.144 + <label>Recharge list</label> 1.145 + <input file icon="system-software-update"></input> 1.146 + <action>xterm -T "Recharge" -geometry 80x16+120+120 -e "tazpkg recharge; sleep 2" 2>/dev/null</action> 1.147 + <action>refresh:DEV</action> 1.148 + <action>refresh:GET</action> 1.149 + <action>refresh:GETIT</action> 1.150 + <action>refresh:PKG_STATS</action> 1.151 + </button> 1.152 + </hbox> 1.153 + <hbox> 1.154 + <text> 1.155 + <label>"Undigest:"</label> 1.156 + </text> 1.157 + <combobox> 1.158 + <variable>UNDIGEST_ENTRY</variable> 1.159 + <input>echo all; ls /var/lib/tazpkg/undigest 2> /dev/null</input> 1.160 + </combobox> 1.161 + <text> 1.162 + <label>"Category:"</label> 1.163 + </text> 1.164 + <combobox> 1.165 + <variable>UNDIGEST_CAT</variable> 1.166 + <item>all</item> 1.167 + <item>base-system</item> 1.168 + <item>x-window</item> 1.169 + <item>utilities</item> 1.170 + <item>network</item> 1.171 + <item>graphics</item> 1.172 + <item>multimedia</item> 1.173 + <item>office</item> 1.174 + <item>development</item> 1.175 + <item>system-tools</item> 1.176 + <item>security</item> 1.177 + <item>games</item> 1.178 + <item>misc</item> 1.179 + <item>meta</item> 1.180 + <item>non-free</item> 1.181 + </combobox> 1.182 + <button> 1.183 + <label>List</label> 1.184 + <input file icon="reload"></input> 1.185 + <action>echo "$UNDIGEST_CAT $UNDIGEST_ENTRY" > /tmp/tazpkgbox/undigest-category</action> 1.186 + <action>refresh:DEV</action> 1.187 + </button> 1.188 + </hbox> 1.189 + </vbox> 1.190 + 1.191 + <vbox> 1.192 + <tree> 1.193 + <width>620</width><height>240</height> 1.194 <variable>BLOCKED</variable> 1.195 <label>Package name|Version|Available|Description</label> 1.196 <input>/usr/lib/slitaz/tazpkgbox/list blocked</input> 1.197 @@ -430,7 +556,7 @@ 1.198 1.199 <hbox> 1.200 <text wrap="false"> 1.201 - <input>installed=`ls /var/lib/tazpkg/installed | wc -l`; mirrored=`cat /var/lib/tazpkg/packages.list | wc -l`; blocked=`cat /var/lib/tazpkg/blocked-packages.list | wc -l`; installable=$(($mirrored - $installed)); [ $installable -lt 0 ] && installable=0; echo "Packages: $installed installed, $blocked blocked, $installable installable, $mirrored mirrored, `cat /var/lib/tazpkg/upgradable-packages.list 2> /dev/null | wc -l` to upgrade "</input> 1.202 + <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.203 <variable>PKG_STATS</variable> 1.204 </text> 1.205 </hbox>