ports/184426: ports-mgmt/portupgrade-devel date range of pkg_glob doesn't work as expected
Yoshiaki Kasahara
kasahara at nc.kyushu-u.ac.jp
Mon Dec 2 05:30:02 UTC 2013
>Number: 184426
>Category: ports
>Synopsis: ports-mgmt/portupgrade-devel date range of pkg_glob doesn't work as expected
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Dec 02 05:30:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Yoshiaki Kasahara
>Release: FreeBSD 9.2-PRERELEASE amd64
>Organization:
Kyushu University
>Environment:
System: FreeBSD elvenbow.cc.kyushu-u.ac.jp 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r255506: Fri Sep 13 16:09:51 JST 2013 root at elvenbow.cc.kyushu-u.ac.jp:/usr/obj/usr/src/sys/ELVENBOW amd64
>Description:
A date range specification for pkg_glob has no effect because date_installed()
in pkginfo.rb always returns Time.at(0) when $pkgdb.with_pkgng? is false.
Actually "pkgname" is not needed and undefined here, but "rescue" hides
the actual bug.
>How-To-Repeat:
pkg_glob '>2000-01-01' returns empty list.
>Fix:
--- pkginfo.rb 2013-12-02 14:04:23.000000000 +0900
+++ pkginfo.rb.fix 2013-12-02 14:04:02.012831037 +0900
@@ -195,9 +195,9 @@
if $pkgdb.with_pkgng?
Time.at(get_info(:mtime).to_i)
else
- File.mtime(pkg_comment(pkgname)) ||
- File.mtime(pkg_descr(pkgname)) ||
- File.mtime(pkg_contents(pkgname)) rescue Time.at(0)
+ File.mtime(pkg_comment) ||
+ File.mtime(pkg_descr) ||
+ File.mtime(pkg_contents) rescue Time.at(0)
end
end
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list