in message <[EMAIL PROTECTED]>, wrote Perttu Laine thusly... > > Thank's. work fine. Now I have another question about 7-CURRENT. > portupgrade and portversion are giving this error: > --- > uname(1) could be broken - cannot parse the output: 7-CURRENT-SNAP009 i386 > ** Error occured reading /usr/local/etc/pkgtools.conf: > uninitialized constant PkgConfig::OS_PLATFORM > --- > > So. How can one make those pkgtools working? :)
That seems like a bug in portupgrade (pkgtools.rb is installed as part of portupgrade) due to, most likely, limited set of rules to parse uname(1) output. Please file a problem report via send-pr(1). I can't help myself but look in source; here is the line 982 in pkgtools.rb (portupgrade 2.0.1_1,1) which fails to parse uname(1) output ... 980 uname = `uname -rm`.chomp 981 982 if m = /^(((\d+)(?:\.\d+[^.\-]*?)+)-(\w+)(-\S+)?) (\w+)$/.match(uname) ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ minor ^ version required minor version match 983 OS_RELEASE, OS_REVISION, OS_MAJOR, 984 OS_BRANCH, os_patchlevel, OS_PLATFORM = m[1..-1] 985 OS_PATCHLEVEL = os_patchlevel || "" (I don't know how close Ruby & Perl regular expressions (regexps) are, below analysis is according to Perl rules.) Above regex fails, when there is no minor version since matching of minor version is not optional. To get past that, regex should be ... /^(((\d+)(?:\.\d+[^.\-]*?)?)-(\w+)(-\S+)?) (\w+)$/ ^ ^ optional match - Parv -- _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"