package management improvements
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1778 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
ea2f231ad8
commit
0cfc8f233a
@ -1,9 +1,10 @@
|
|||||||
Package: webif
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 1.0.8
|
Version: 1.0.8-1
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
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:
|
Suggests:
|
||||||
Description: An evolving web interface for the Humax.
|
Description: An evolving web interface for the Humax.
|
||||||
|
Tags: http://hummy.tv/forum/threads/webif-version-1-0-8-released.4553/
|
||||||
|
BIN
var/mongoose/html/img/info.png
Normal file
BIN
var/mongoose/html/img/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -30,11 +30,28 @@ proc pkgrow {pkg} {
|
|||||||
puts "<td nowrap>[$pkg get latest]</td>"
|
puts "<td nowrap>[$pkg get latest]</td>"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
puts "<td>"
|
||||||
if {[dict exists $::pkgmeta $name]} {
|
if {[dict exists $::pkgmeta $name]} {
|
||||||
puts "<td>$::pkgmeta($name)</td>"
|
puts "$::pkgmeta($name)"
|
||||||
} else {
|
} else {
|
||||||
puts "<td>[$pkg get descr]</td>"
|
puts "[$pkg get descr]"
|
||||||
}
|
}
|
||||||
|
if {$::type eq "upgr"} {
|
||||||
|
$pkg loadraw
|
||||||
|
set url [$pkg get url]
|
||||||
|
set changes [$pkg get changes]
|
||||||
|
if {$changes ne ""} {
|
||||||
|
puts "<br> - <i>$changes</i>"
|
||||||
|
}
|
||||||
|
if {$url ne ""} {
|
||||||
|
puts "
|
||||||
|
<br>
|
||||||
|
<a class=va href=\"$url\" target=_blank style=\"color: darkblue\">
|
||||||
|
<img class=va height=18 width=18 src=/img/info.png> $url
|
||||||
|
</a>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
puts "</td>"
|
||||||
|
|
||||||
if {![$pkg is installed]} {
|
if {![$pkg is installed]} {
|
||||||
set type Install
|
set type Install
|
||||||
@ -82,7 +99,7 @@ if {[llength $pkgs] > 0} {
|
|||||||
pkgrow [pkg load $pkg]
|
pkgrow [pkg load $pkg]
|
||||||
}
|
}
|
||||||
puts "</table>"
|
puts "</table>"
|
||||||
if {$filter} {
|
if {$type ne "upgr" && $filter} {
|
||||||
puts "<font class=footnote>This is a filtered package list. To show all packages, enable the <i>Show development and advanced packages</i> in the settings screen.</font>"
|
puts "<font class=footnote>This is a filtered package list. To show all packages, enable the <i>Show development and advanced packages</i> in the settings screen.</font>"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,6 +4,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
var busy = false;
|
var busy = false;
|
||||||
var tswitch = false;
|
var tswitch = false;
|
||||||
|
var stick = false;
|
||||||
|
|
||||||
$('#opkgupdate')
|
$('#opkgupdate')
|
||||||
.button()
|
.button()
|
||||||
@ -94,8 +95,9 @@ $(document).ready(function() {
|
|||||||
$('#dresults').text(data);
|
$('#dresults').text(data);
|
||||||
$('#dspinner').hide('slow');
|
$('#dspinner').hide('slow');
|
||||||
$('#complete').show('slow');
|
$('#complete').show('slow');
|
||||||
if (status == 'success')
|
if (status == 'success' && !stick)
|
||||||
$('#dialogue').dialog('close');
|
$('#dialogue').dialog('close');
|
||||||
|
stick = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$('#dresults').append(data);
|
$('#dresults').append(data);
|
||||||
@ -151,6 +153,7 @@ $(document).ready(function() {
|
|||||||
$('a.depends').click(function(e) {
|
$('a.depends').click(function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var pkg = $(this).closest('tr').attr('pkg');
|
var pkg = $(this).closest('tr').attr('pkg');
|
||||||
|
stick = true;
|
||||||
execopkg(encodeURIComponent('whatdepends ' + pkg),
|
execopkg(encodeURIComponent('whatdepends ' + pkg),
|
||||||
false);
|
false);
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,10 @@ class pkg {
|
|||||||
name ""
|
name ""
|
||||||
latest ""
|
latest ""
|
||||||
descr ""
|
descr ""
|
||||||
|
changes ""
|
||||||
|
url ""
|
||||||
installed ""
|
installed ""
|
||||||
|
raw {}
|
||||||
}
|
}
|
||||||
|
|
||||||
set ::pkgmeta {}
|
set ::pkgmeta {}
|
||||||
@ -15,14 +18,41 @@ pkg method _load {nm} {
|
|||||||
set name $nm
|
set name $nm
|
||||||
foreach line [split [exec /bin/opkg list $nm] "\n"] {
|
foreach line [split [exec /bin/opkg list $nm] "\n"] {
|
||||||
# betaftpd - 0.0.8pre17-1 - Description...
|
# betaftpd - 0.0.8pre17-1 - Description...
|
||||||
|
if {[string match { *} $line]} {
|
||||||
|
append descr $line
|
||||||
|
} else {
|
||||||
regexp {^[^ ]+ - ([^ ]+) - (.*)$} $line x latest descr
|
regexp {^[^ ]+ - ([^ ]+) - (.*)$} $line x latest descr
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
regexp {(.*) \[(.*)\]} $descr x descr changes
|
||||||
set info [exec /bin/opkg list-installed $nm]
|
set info [exec /bin/opkg list-installed $nm]
|
||||||
regexp {^([^ ]+) - ([^ ]+)$} $info full xname installed
|
regexp {^([^ ]+) - ([^ ]+)$} $info x x installed
|
||||||
|
|
||||||
return $self
|
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} {
|
proc {pkg load} {nm} {
|
||||||
return [[pkg] _load $nm]
|
return [[pkg] _load $nm]
|
||||||
}
|
}
|
||||||
@ -47,7 +77,9 @@ proc {pkg avail} {} {
|
|||||||
foreach pkg [split [exec /bin/opkg list] "\n"] {
|
foreach pkg [split [exec /bin/opkg list] "\n"] {
|
||||||
if [regexp {^ } $pkg] { continue }
|
if [regexp {^ } $pkg] { continue }
|
||||||
if {[regexp {^([^ ]+)} $pkg name] == 0} { 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<br>"
|
#puts "New: $name<br>"
|
||||||
}
|
}
|
||||||
return $avail_pkgs
|
return $avail_pkgs
|
||||||
@ -58,7 +90,9 @@ proc {pkg inst} {} {
|
|||||||
set inst_pkgs {}
|
set inst_pkgs {}
|
||||||
foreach pkg [split [exec /bin/opkg list-installed] "\n"] {
|
foreach pkg [split [exec /bin/opkg list-installed] "\n"] {
|
||||||
if {[regexp {^([^ ]+)} $pkg name] == 0} { continue }
|
if {[regexp {^([^ ]+)} $pkg name] == 0} { continue }
|
||||||
|
if {$name ni $inst_pkgs} {
|
||||||
lappend inst_pkgs $name
|
lappend inst_pkgs $name
|
||||||
|
}
|
||||||
#puts "Inst: $name<br>"
|
#puts "Inst: $name<br>"
|
||||||
}
|
}
|
||||||
return $inst_pkgs
|
return $inst_pkgs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user