Merge pull request #493 from mhaskel/remove_mint
authorHunter Haugen <hunter@puppetlabs.com>
Mon, 13 Apr 2015 20:38:40 +0000 (13:38 -0700)
committerHunter Haugen <hunter@puppetlabs.com>
Mon, 13 Apr 2015 20:38:40 +0000 (13:38 -0700)
Remove default support for Linux Mint and Cumulus Networks

manifests/params.pp
manifests/ppa.pp
spec/classes/params_spec.rb
spec/defines/ppa_spec.rb

index ef9904df87a5c5d2b1899dd5220ad8a6a93277d1..abc7536eabc2be7f6119be19645fc41689e6fb50 100644 (file)
@@ -88,39 +88,8 @@ class apt::params {
   }
 
   case $xfacts['lsbdistid'] {
-    'ubuntu', 'debian': {
-      $distid = $xfacts['lsbdistid']
-      $distcodename = $xfacts['lsbdistcodename']
-    }
-    'linuxmint': {
-      if $xfacts['lsbdistcodename'] == 'debian' {
-        $distid = 'debian'
-        $distcodename = 'wheezy'
-      } else {
-        $distid = 'ubuntu'
-        $distcodename = $xfacts['lsbdistcodename'] ? {
-          'qiana'  => 'trusty',
-          'petra'  => 'saucy',
-          'olivia' => 'raring',
-          'nadia'  => 'quantal',
-          'maya'   => 'precise',
-        }
-      }
-    }
-    'Cumulus Networks': {
-      $distid = 'debian'
-      $distcodename = $::lsbdistcodename
-    }
-    undef: {
-      fail('Unable to determine lsbdistid, is lsb-release installed?')
-    }
-    default: {
-      fail("Unsupported lsbdistid (${::lsbdistid})")
-    }
-  }
-  case $distid {
     'debian': {
-      case $distcodename {
+      case $xfacts['lsbdistcodename'] {
         'squeeze': {
           $backports = {
             'location' => 'http://backports.debian.org/debian-backports',
@@ -144,7 +113,7 @@ class apt::params {
         'repos'    => 'main universe multiverse restricted',
       }
 
-      case $distcodename {
+      case $xfacts['lsbdistcodename'] {
         'lucid': {
           $ppa_options        = undef
           $ppa_package        = 'python-software-properties'
@@ -163,7 +132,10 @@ class apt::params {
         }
       }
     }
-    '', default: {
+    undef: {
+      fail('Unable to determine lsbdistid, is lsb-release installed?')
+    }
+    default: {
       $ppa_options = undef
       $ppa_package = undef
       $backports   = undef
index 5d4c8903d5c6d9968c64e255f63cc61466554326..808c9751a042b32196dfc8c918216699f5085748 100644 (file)
@@ -10,8 +10,8 @@ define apt::ppa(
     fail('lsbdistcodename fact not available: release parameter required')
   }
 
-  if $::apt::distid != 'ubuntu' {
-    fail('apt::ppa is currently supported on Ubuntu and LinuxMint only.')
+  if $::apt::xfacts['lsbdistid'] == 'Debian' {
+    fail('apt::ppa is not currently supported on Debian.')
   }
 
   $filename_without_slashes = regsubst($name, '/', '-', 'G')
index f8ca89f2a33f9ec04e73dc459dfaa85e204ba194..f8599b36998d0fb3f6629c8118f6d6ee5dc5bca6 100644 (file)
@@ -12,19 +12,6 @@ describe 'apt::params', :type => :class do
     expect(subject.resources.size).to eq(4)
   end
 
-  describe "With unknown lsbdistid" do
-
-    let(:facts) { { :lsbdistid => 'CentOS', :osfamily => 'Debian' } }
-    let (:title) { 'my_package' }
-
-    it do
-      expect {
-       is_expected.to compile
-      }.to raise_error(Puppet::Error, /Unsupported lsbdistid/)
-    end
-
-  end
-
   describe "With lsb-release not installed" do
     let(:facts) { { :lsbdistid => '', :osfamily => 'Debian' } }
     let (:title) { 'my_package' }
index 7903e470377410d2df8320148c066970bb331445..521b42ba2b47897fc99b9c8b59f5769b73dfac59 100644 (file)
@@ -298,7 +298,7 @@ describe 'apt::ppa' do
       it do
         expect {
           is_expected.to compile
-        }.to raise_error(Puppet::Error, /supported on Ubuntu and LinuxMint only/)
+        }.to raise_error(Puppet::Error, /not currently supported on Debian/)
       end
     end
   end