-12, fix pkgver

git-svn-id: file:///root/webif/svn/pkg/webif/trunk@3450 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2016-12-30 12:20:24 +00:00
parent 09dd487b60
commit 1c8a3d87da
3 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.3.4-11
Version: 1.3.4-12
Architecture: mipsel
Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.24),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.9),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),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

@ -235,8 +235,13 @@ proc {pkg upgrade} {nm} {
proc {pkg vercompare} {v1 v2} {
if {$v1 eq $v2} { return 0 }
lassign [split $v1 -] v1 r1
lassign [split $v2 -] v2 r2
if {![regexp {^(.*)-([^-]+)$} $v1 x v1 r1]} {
lassign [split $v1 -] v1 r1
}
if {![regexp {^(.*)-([^-]+)$} $v2 x v2 r2]} {
lassign [split $v2 -] v2 r2
}
foreach a [split $v1 .] b [split $v2 .] {
if {$b eq "" || $a > $b} { return 1 }
@ -244,6 +249,6 @@ proc {pkg vercompare} {v1 v2} {
}
if {$r2 eq "" || $r1 > $r2} { return 1 }
if {$r1 eq "" || $r2 > $r1} { return -1 }
return 0
return [string compare $v1 $v2]
}

View File

@ -12,6 +12,9 @@ set verlist {
1.0-1 1.0 1
1.0 1.0-1 -1
2 1.0.1 1
2010-365-4 2010-365-5 -1
2010-365-5 2010-365-4 1
2010-365-5 2010-365-5 0
}
foreach {a b e} $verlist {
@ -19,7 +22,7 @@ foreach {a b e} $verlist {
if {$ret eq $e} {
puts " OK $a $b ($e)"
} else {
puts "BAD $a $b ($e)"
puts "BAD $a $b ($e / $ret)"
}
}