# HG changeset patch
# User Christophe Lincoln DEBUG on
Uptime: `uptime`
diff -r 4c5ad38717a0 -r ab6120f11be4 tazpkg.cgi
--- a/tazpkg.cgi Sat Apr 02 10:23:38 2011 +0200
+++ b/tazpkg.cgi Sat Apr 02 13:55:29 2011 +0200
@@ -65,14 +65,18 @@
# Display a full summary of packages stats
packages_summary() {
- gettext "Installed packages : "
+ gettext "Installed packages : "
ls $INSTALLED | wc -l
- gettext "Mirrored packages : "
+ gettext "Mirrored packages : "
cat $LOCALSTATE/packages.list | wc -l
- gettext "Last recharge : "
+ gettext "Last recharge : "
stat -c %y $LOCALSTATE/packages.list | sed 's/\(:..\):.*/\1/'
- gettext "Installed files : "
+ gettext "Upgradeable packages : "
+ cat $LOCALSTATE/upgradeable-packages.list | wc -l
+ gettext "Installed files : "
cat $INSTALLED/*/files.list | wc -l
+ gettext "Blocked packages : "
+ cat $LOCALSTATE/blocked-packages.list | wc -l
}
#
@@ -99,6 +103,7 @@
EOT
}
+
list_actions() {
cat << EOT
@@ -119,11 +124,17 @@
`gettext "List:"`
`gettext "My packages"` |
- `gettext "Recharge"`
+ `gettext "Recharge"` |
'
fgrep /home /etc/passwd | while read line
do
@@ -29,15 +31,20 @@
done
echo '
' ;;
network)
+ TITLE="- Network"
+ xhtml_header
echo ''
ifconfig
echo '
' ;;
hardware)
+ TITLE="- Hardware"
+ xhtml_header
echo ''
lspci
echo '
' ;;
*)
# Default xHTML content
+ xhtml_header
cat << EOT
+ `gettext "List:"` + `gettext "My packages"` +
++EOT + gettext "Recharging the packages list... please wait"; echo + tazpkg recharge | filter_tazpkg_msgs + echo '' echo '
' - gettext "Recharging the packages lists..." - echo '
' - tazpkg recharge | filter_tazpkg_msgs - echo '
' gettext "Packages lists are up-to-date" echo '
' ;; + upgradeable) + cat << EOT +' ;; do=*) # Do an action on one or some packages cmdline=`echo ${QUERY_STRING#do=} | sed s'/&/ /g'` @@ -205,7 +243,7 @@ echo '' gettext "Executing: tazpkg $cmd $pkg" echo '
' - echo 'y' | tazpkg $cmd $pkg 2>/dev/null | filter_tazpkg_msgs + echo 'y' | tazpkg $cmd $pkg --forced 2>/dev/null | filter_tazpkg_msgs echo '' done ;; info=*) @@ -220,8 +258,8 @@ Name : $PACKAGE Version : $VERSION Description : $SHORT_DESC -Depends : - +Depends : `for i in $DEPENDS; do echo -n \ + "$i "; done` Website : $WEB_SITE Sizes : $PACKED_SIZE/$UNPACKED_SIZE Files : `cat $INSTALLED/$pkg/files.list | wc -l` @@ -238,7 +276,8 @@ cat << EOT `gettext "List:"` `gettext "My packages"` | -`gettext "Recharge"` +`gettext "Recharge"` | +`gettext "Upgradeable"`
`packages_summary`