pkgtools chokes on the new version name :-/

Hiten Pandya hmp at backplane.com
Thu Jul 15 13:03:49 PDT 2004


Use http://leaf.dragonflybsd.org/pkgtools.rb.diff

It was fixed yesterday when 1.0A-RELEASE came out; and the change was 
already pushed up to the maintainer.

Cheers.

	-Hiten

walt wrote:
When I run pkgdb -F the program halts with this message:
uname(1) could be broken - cannot parse the output: 1.0A-RELEASE i386
** Error occured reading /usr/local/etc/pkgtools.conf:
        uninitialized constant PkgConfig::OS_PLATFORM
This is the code from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb
Anyone know enough ruby to decipher this?
  uname = `uname -rm`.chomp
  if m = /^(((\d+)(?:\.\d+)+)-(\w+)(-\S+)?) (\w+)$/.match(uname)
    OS_RELEASE, OS_REVISION, OS_MAJOR,
      OS_BRANCH, os_patchlevel, OS_PLATFORM = m[1..-1]
    OS_PATCHLEVEL = os_patchlevel || ""
    case OS_BRANCH
    when /^CURRENT$/    # <n>-current
      OS_PKGBRANCH = sprintf('%s-%s', OS_MAJOR, OS_BRANCH.downcase)
    when /^RELEASE$/    # <n>.<m>-release
      OS_PKGBRANCH = sprintf('%s-%s', OS_REVISION, OS_BRANCH.downcase)
    else                # <n>-stable
      # when /^(PRERELEASE|RC\d*|ALPHA|BETA)$/
      OS_PKGBRANCH = sprintf('%s-%s', OS_MAJOR, 'stable')
    end
  else
    STDERR.puts "uname(1) could be broken - cannot parse the output: 
#{uname}"
  end





More information about the Bugs mailing list