Skip to content
This repository

LinuxMint 11 support and "no distro" detection #31

Merged
merged 1 commit into from about 2 years ago

3 participants

Trevor Bortins Jason Smith David Sansome
Trevor Bortins

added support for LinuxMint and tested install on LinuxMint 11 (gnome)
also made it raise an error if no distro detected

Jason Smith
Owner

Interesting. Does just rake work, or does the full CouchDB build work?

David Sansome

It's just rake that doesn't work - it fails immediately with:

[david@hoover (master) ~/src/build-couchdb] rake --trace
(in /home/david/src/build-couchdb)
rake aborted!
undefined method `[]' for nil:NilClass
/home/david/src/build-couchdb/tasks/lib/package_dep.rb:23:in `package_dep'
/home/david/src/build-couchdb/tasks/toolchain.rake:13
/home/david/src/build-couchdb/tasks/toolchain.rake:9:in `each'
/home/david/src/build-couchdb/tasks/toolchain.rake:9
/usr/lib/ruby/1.8/rake.rb:1882:in `in_namespace'
/usr/lib/ruby/1.8/rake.rb:910:in `namespace'
/home/david/src/build-couchdb/tasks/toolchain.rake:6
/usr/lib/ruby/1.8/rake.rb:1620:in `load'
/usr/lib/ruby/1.8/rake.rb:1620:in `load'
/usr/lib/ruby/1.8/rake.rb:2451:in `load_imports'
/usr/lib/ruby/1.8/rake.rb:2390:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

detect_distro() returns nil because Linux Mint has both /etc/lsb-release and /etc/debian_version files, but /etc/lsb-release doesn't contain "Ubuntu", so none of the checks in detect_distro() match.

I can confirm that this patch fixes the error for me on Mint 12 - it would be very useful if it was merged.

Jason Smith jhs merged commit 0e22abd into from
Jason Smith jhs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 16, 2012
Trevor Bortins wulftone added support for LinuxMint and tested install on LinuxMint 11 (gnome)
also made it raise an error if no distro detected
fa8e3e2
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 tasks/lib/distros.rb
4 tasks/lib/distros.rb
@@ -17,6 +17,8 @@ def detect_distro
17 17 info = Hash[ *File.new('/etc/lsb-release').lines.map{ |x| x.split('=').map { |y| y.chomp } }.flatten ]
18 18 if info['DISTRIB_ID'] == 'Ubuntu'
19 19 return [:ubuntu, info['DISTRIB_RELEASE']]
  20 + elsif info['DISTRIB_ID'] == 'LinuxMint'
  21 + return [:ubuntu, info['DISTRIB_RELEASE']]
20 22 end
21 23 end
22 24
@@ -72,5 +74,5 @@ def detect_distro
72 74 end
73 75 end
74 76
75   - nil
  77 + raise StandardError, 'could not find distribution, maybe your OS isn\'t supported'
76 78 end

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.