allow removing non-repository packages

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3672 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2017-01-31 23:31:19 +00:00
parent 2bb88ac84d
commit f19dfe65eb
3 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.4.0-2
Version: 1.4.0-3
Architecture: mipsel
Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.25),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.5),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.10),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1)

View File

@ -30,7 +30,11 @@ proc pkgrow {name pkg} {
}
puts "<td>"
if {[dict exists $pkg description]} {
set descr $pkg(description)
} else {
set descr "No longer in package repository."
}
set changes ""
regexp {(.*) \[(.*)\]} $descr x descr changes
if {[dict exists $::pkgmeta $name]} {
@ -79,9 +83,15 @@ proc pkgrow {name pkg} {
}
set pkgdata [pkg getall]
if {[file exists /mod/var/opkg/beta]} {
set pkgdata [dict merge $pkgdata [pkg getall beta]]
foreach {pkg data} [pkg getall beta] {
if {[dict exists $data description]} {
set pkgdata($pkg) $data
}
}
}
pkg loadmeta
set type [cgi_get type "avail"]

View File

@ -52,8 +52,13 @@ proc {pkg getall} {{repo base}} {
if {[catch { set fp [open "/mod/var/opkg/$repo" r] } msg]} {
error "Error opening repository, $msg"
}
set cur ""
foreach {p v} $installed {
set pkglist($p) [list installed $v]
}
set pkg {}
set cur ""
foreach line [split [$fp read] "\n"] {
if {![regexp {^([^:]+): (.*)$} $line x tag val]} {
if {[string equal -length 1 $line " "]} {