fail('$pin_priority must be an integer')
}
- $release_real = downcase($release)
- $key = $::lsbdistid ? {
+ if $::lsbdistid == 'LinuxMint' {
+ $distid = $::lsbdistcodename ? {
+ 'debian' => 'debian',
+ default => 'ubuntu',
+ }
+ $release_real = $::lsbdistcodename ? {
+ 'debian' => 'wheezy',
+ 'qiana' => 'trusty',
+ 'petra' => 'saucy',
+ 'olivia' => 'raring',
+ 'nadia' => 'quantal',
+ 'maya' => 'precise',
+ }
+ } else {
+ $distid = $::lsbdistid
+ $release_real = downcase($release)
+ }
+
+ $key = $distid ? {
'debian' => '46925553',
'ubuntu' => '437D05B5',
}
- $repos = $::lsbdistid ? {
+ $repos = $distid ? {
'debian' => 'main contrib non-free',
'ubuntu' => 'main universe multiverse restricted',
}
$preferences_d = "${root}/preferences.d"
case $::lsbdistid {
+ 'linuxmint': {
+ $distid = $::lsbdistcodename ? {
+ 'debian' => 'debian',
+ default => 'ubuntu',
+ }
+ $distcodename = $::lsbdistcodename ? {
+ 'debian' => 'wheezy',
+ 'qiana' => 'trusty',
+ 'petra' => 'saucy',
+ 'olivia' => 'raring',
+ 'nadia' => 'quantal',
+ 'maya' => 'precise',
+ }
+ }
+ 'ubuntu', 'debian': {
+ $distid = $::lsbdistid
+ $distcodename = $::lsbdistcodename
+ }
+ '': {
+ fail('Unable to determine lsbdistid, is lsb-release installed?')
+ }
+ default: {
+ fail("Unsupported lsbdistid (${::lsbdistid})")
+ }
+ }
+ case $distid {
'debian': {
- case $::lsbdistcodename {
+ case $distcodename {
'squeeze': {
$backports_location = 'http://backports.debian.org/debian-backports'
$legacy_origin = true
}
}
'ubuntu': {
- case $::lsbdistcodename {
+ case $distcodename {
'lucid': {
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
$ppa_options = undef
}
}
}
- '': {
- fail('Unable to determine lsbdistid, is lsb-release installed?')
- }
- default: {
- fail("Unsupported lsbdistid (${::lsbdistid})")
- }
}
}
}
end
+ describe "when turning on backports for linux mint debian edition" do
+
+ let :facts do
+ {
+ 'lsbdistcodename' => 'debian',
+ 'lsbdistid' => 'LinuxMint',
+ }
+ end
+
+ it { should contain_apt__source('backports').with({
+ 'location' => 'http://ftp.debian.org/debian/',
+ 'release' => 'wheezy-backports',
+ 'repos' => 'main contrib non-free',
+ 'key' => '46925553',
+ 'key_server' => 'pgp.mit.edu',
+ 'pin' => 200,
+ })
+ }
+ end
+
+ describe "when turning on backports for linux mint 17 (ubuntu-based)" do
+
+ let :facts do
+ {
+ 'lsbdistcodename' => 'qiana',
+ 'lsbdistid' => 'LinuxMint',
+ }
+ end
+
+ it { should contain_apt__source('backports').with({
+ 'location' => 'http://us.archive.ubuntu.com/ubuntu',
+ 'release' => 'trusty-backports',
+ 'repos' => 'main universe multiverse restricted',
+ 'key' => '437D05B5',
+ 'key_server' => 'pgp.mit.edu',
+ 'pin' => 200,
+ })
+ }
+ end
+
describe "when turning on backports for debian squeeze but using your own mirror" do
let :facts do