Date: Mon, 2 Sep 2002 04:49:30 -0700 (PDT) From: HM Lim <hm@eaglet.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/42322: portupgrade pkgtools.rb OS_PLATFORM error Message-ID: <200209021149.g82BnUvN008012@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 42322 >Category: ports >Synopsis: portupgrade pkgtools.rb OS_PLATFORM error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 02 04:50:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: HM Lim >Release: 4.5-20020428-STABLE i386 >Organization: >Environment: FreeBSD myhostname 4.5-20020402-STABLE FreeBSD 4.5-20020402-STABLE #0: Wed Jul 3 00:38:04 GMT 2002 root@myhostname:/usr/obj/usr/src/sys/myhostname i386 >Description: the the post processing of "uname -rn" function at lib/pkgtools.rb can't parse a result like "4.5-20020428-STABLE i386" ---line 702 pkgtools.rb---- if m = /^(((\d+)(?:\.\d+)+)-(\w+)(-p\d+)?) (\w+)$/.match(uname) OS_RELEASE, OS_REVISION, OS_MAJOR, OS_BRANCH, os_patchlevel, OS_PLATFORM = m[1..-1] OS_PATCHLEVEL = os_patchlevel || "" else STDERR.puts "uname(1) could be broken - cannot parse the output: #{uname}" end ----END SNIP---- >How-To-Repeat: install FreeBSD from the STABLE branch via data timestamp use current portupgrade tools and the following will appear in the STDERR ---SNIP-- uname(1) could be broken - cannot parse the output: 4.5-20020402-STABLE i386 ** Error occured reading /usr/local/etc/pkgtools.conf: uninitialized constant OS_PLATFORM at PkgConfig ---SNIP-- >Fix: revert back to the portupgrade-20020429_1 version of similar regex as below to get it working. This will break other RELEASE/PATCHLEVEL formats. ----START SNIP--- if m = /^(((\d+)(?:\.\d+)+)-(\w+)(?:\S*)) (\w+)$/.match(uname) OS_RELEASE, OS_REVISION, OS_MAJOR, OS_BRANCH, OS_PLATFORM = m[1..-1] else STDERR.puts "uname(1) could be broken - cannot parse the output: #{uname}" end ----END SNIP---- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209021149.g82BnUvN008012>