diff --git a/CONTROL/control b/CONTROL/control
index ffcd6e0..4d91bd0 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,9 +1,10 @@
Package: webif
Priority: optional
Section: web
-Version: 1.0.8
+Version: 1.0.8-1
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
-Depends: webif-channelicons(>=1.1.8),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
+Depends: webif-channelicons(>=1.1.8),mongoose(>=3.0-9),jim(>=0.74-4),jim-oo,jim-sqlite3(>=0.74-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)
Suggests:
Description: An evolving web interface for the Humax.
+Tags: http://hummy.tv/forum/threads/webif-version-1-0-8-released.4553/
diff --git a/var/mongoose/html/img/info.png b/var/mongoose/html/img/info.png
new file mode 100644
index 0000000..5c6c313
Binary files /dev/null and b/var/mongoose/html/img/info.png differ
diff --git a/var/mongoose/html/pkg/pkg.jim b/var/mongoose/html/pkg/pkg.jim
index 47c65f0..7c19b9d 100755
--- a/var/mongoose/html/pkg/pkg.jim
+++ b/var/mongoose/html/pkg/pkg.jim
@@ -30,11 +30,28 @@ proc pkgrow {pkg} {
puts "
[$pkg get latest] | "
}
+ puts ""
if {[dict exists $::pkgmeta $name]} {
- puts " | $::pkgmeta($name) | "
+ puts "$::pkgmeta($name)"
} else {
- puts "[$pkg get descr] | "
+ puts "[$pkg get descr]"
}
+ if {$::type eq "upgr"} {
+ $pkg loadraw
+ set url [$pkg get url]
+ set changes [$pkg get changes]
+ if {$changes ne ""} {
+ puts "
- $changes"
+ }
+ if {$url ne ""} {
+ puts "
+
+
+ $url
+ "
+ }
+ }
+ puts ""
if {![$pkg is installed]} {
set type Install
@@ -82,7 +99,7 @@ if {[llength $pkgs] > 0} {
pkgrow [pkg load $pkg]
}
puts ""
- if {$filter} {
+ if {$type ne "upgr" && $filter} {
puts ""
}
} else {
diff --git a/var/mongoose/html/pkg/script.js b/var/mongoose/html/pkg/script.js
index b132fb5..40017d8 100644
--- a/var/mongoose/html/pkg/script.js
+++ b/var/mongoose/html/pkg/script.js
@@ -4,6 +4,7 @@ $(document).ready(function() {
var busy = false;
var tswitch = false;
+ var stick = false;
$('#opkgupdate')
.button()
@@ -94,8 +95,9 @@ $(document).ready(function() {
$('#dresults').text(data);
$('#dspinner').hide('slow');
$('#complete').show('slow');
- if (status == 'success')
+ if (status == 'success' && !stick)
$('#dialogue').dialog('close');
+ stick = false;
}
else
$('#dresults').append(data);
@@ -151,6 +153,7 @@ $(document).ready(function() {
$('a.depends').click(function(e) {
e.preventDefault();
var pkg = $(this).closest('tr').attr('pkg');
+ stick = true;
execopkg(encodeURIComponent('whatdepends ' + pkg),
false);
});
diff --git a/var/mongoose/lib/pkg.class b/var/mongoose/lib/pkg.class
index 36b3a8a..2867fb9 100755
--- a/var/mongoose/lib/pkg.class
+++ b/var/mongoose/lib/pkg.class
@@ -5,7 +5,10 @@ class pkg {
name ""
latest ""
descr ""
+ changes ""
+ url ""
installed ""
+ raw {}
}
set ::pkgmeta {}
@@ -15,14 +18,41 @@ pkg method _load {nm} {
set name $nm
foreach line [split [exec /bin/opkg list $nm] "\n"] {
# betaftpd - 0.0.8pre17-1 - Description...
- regexp {^[^ ]+ - ([^ ]+) - (.*)$} $line x latest descr
+ if {[string match { *} $line]} {
+ append descr $line
+ } else {
+ regexp {^[^ ]+ - ([^ ]+) - (.*)$} $line x latest descr
+ }
}
+ regexp {(.*) \[(.*)\]} $descr x descr changes
set info [exec /bin/opkg list-installed $nm]
- regexp {^([^ ]+) - ([^ ]+)$} $info full xname installed
+ regexp {^([^ ]+) - ([^ ]+)$} $info x x installed
return $self
}
+pkg method loadraw {} {
+ set tag ""
+ set txt ""
+ set raw {}
+
+ foreach line [split [exec /bin/opkg info $name] "\n"] {
+ if {$tag ne "" && [string match { *} $line]} {
+ append raw($tag) $line
+ continue
+ }
+ regexp {^([^:]+): (.*)$} $line x tag txt
+ if {![dict exists $raw $tag]} {
+ set tag [string tolower $tag]
+ set raw($tag) $txt
+ } else {
+ set tag ""
+ }
+ }
+
+ if {[dict exists $raw tags]} { set url $raw(tags) }
+}
+
proc {pkg load} {nm} {
return [[pkg] _load $nm]
}
@@ -47,7 +77,9 @@ proc {pkg avail} {} {
foreach pkg [split [exec /bin/opkg list] "\n"] {
if [regexp {^ } $pkg] { continue }
if {[regexp {^([^ ]+)} $pkg name] == 0} { continue }
- if {$name ni $inst_pkgs} { lappend avail_pkgs $name }
+ if {$name ni $inst_pkgs && $name ni $avail_pkgs} {
+ lappend avail_pkgs $name
+ }
#puts "New: $name
"
}
return $avail_pkgs
@@ -58,7 +90,9 @@ proc {pkg inst} {} {
set inst_pkgs {}
foreach pkg [split [exec /bin/opkg list-installed] "\n"] {
if {[regexp {^([^ ]+)} $pkg name] == 0} { continue }
- lappend inst_pkgs $name
+ if {$name ni $inst_pkgs} {
+ lappend inst_pkgs $name
+ }
#puts "Inst: $name
"
}
return $inst_pkgs