Ask Your Question
0

How to instal a apt source

asked 2018-11-03 21:40:58 -0600

tylerecouture gravatar image

I have instructions for how to add a new source:

ver=$(lsb_release -sr); if [ $ver != "18.10" -a $ver != "18.04" -a $ver != "16.04" ]; then ver=18.04; fi echo "deb http://download.opensuse.org/repositories/home:/strycore/xUbuntu_$ver/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list
wget -q https://download.opensuse.org/repositories/home:/strycore/xUbuntu_$ver/Release.key -O- | sudo apt-key add -

I've tried multiple ways but can't seem to get it to work. Here's my closest attempt:

  apt::source { 'lutris-repo':
    location => 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/',
    repos    => 'non-free',
    key      => {
      'id'     => 'FD5B64B9',
      #'server' => 'https://keyserver.ubuntu.com',
      'source'  => 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/Release.key',
    },
  } ~>
  package { 'lutris':
    ensure  => latest,
  }

But this results in Errors:

Notice:> /Stage[main]/Profile::App_games/Apt::Source[lutris-repo]/Apt::Setting[list-lutris-repo]/File[/etc/apt/sources.list.d/lutris-repo.list]/ensure: defined content as '{md5}157fbd1238bcbcdb9fd2f55ad244a7b7'
Info: /Stage[main]/Profile::App_games/Apt::Source[lutris-repo]/Apt::Setting[list-lutris-repo]/File[/etc/apt/sources.list.d/lutris-repo.list]: Scheduling refresh of Class[Apt::Update] 
Info: Apt::Source[lutris-repo]: Scheduling refresh of Package[lutris] 
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install lutris' returned 100: Reading package lists...

When I do the install manually, with the instructions at the top (and here: https://lutris.net/downloads/)

I get this in /etc/apt/sources.list.d/lutris.list:

deb http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/ ./

But the puppet code gives me this:

deb http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/ xenial non-free

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-11-07 07:53:15 -0600

vicinus gravatar image

It should be possible to adjust the parameters of apt::source to get the result you want:

apt::source { 'lutris-repo':
  location => 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/',
  repos    => '',
  release => './',
  key      => {
    'id'     => 'FD5B64B9',
    #'server' => 'https://keyserver.ubuntu.com',
    'source'  => 'http://download.opensuse.org/repositories/home:/strycore/xUbuntu_16.04/Release.key',
  },
}
edit flag offensive delete link more

Comments

Thanks! It worked. What is the "./" and why does it go in `release`?

tylerecouture gravatar imagetylerecouture ( 2018-11-16 15:23:47 -0600 )edit

The file apt/templates/source.list.epp creates the lutris.list entry with the following code: deb [..] <%= $location %> <%= $release %> <%= $repos %> So you only need to fill the parameters with the values to get the desired result.

vicinus gravatar imagevicinus ( 2018-11-16 16:02:53 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-11-03 21:40:58 -0600

Seen: 35 times

Last updated: Nov 07