puppetlabs-apt/ppa.pp on Ubuntu 15.10 unless always fails

60 views
Skip to first unread message

Michael Allen

unread,
Nov 16, 2015, 6:42:14 AM11/16/15
to Puppet Users
Hi, 

I'm on Ubuntu 15.10 using the https://github.com/puppetlabs/puppetlabs-apt Apt module to add PPAs to the system. I'm finding that the exec which performs the add-apt-repository call is always executing due to the test -s always failing.

From what I can see Apt is adding the expected `provider-release.list` file but leaving it empty. It's also adding a `provider-distro-reponame-release.list` file and listing the deb calls in it instead. I'll give an example: 

I've used apt::ppa to add ppa:git-core/ppa:
```
apt::ppa { 'ppa:git-core/ppa': }
```

In `/etc/apt/sources.list.d/` I see: 
```
-rw-r--r-- 1 root root    0 Nov 14 22:26 git-core-ppa-wily.list
-rw-r--r-- 1 root adm  1879 Nov 16 10:07 git-core-ubuntu-ppa-wily.list
-rw-r--r-- 1 root adm  1814 Nov 16 10:07 git-core-ubuntu-ppa-wily.list.save
```

As you can see the git-core-ppa-wily.list file is 0 bytes.

The second run of puppet the unless in apt::ppa::exec[add-apt-repository] is running:
```
/usr/bin/test -s /etc/apt/sources.list.d/git-core-ppa-wily.list
```

This command always fails since `git-core-ppa-wily.list` is 0 bytes.

As I see it the unless should be looking for `git-core-ubuntu-ppa-wily.list` or `add-apt-repository` shouldn't be adding the distro name to the list file. Is this a quirk of Apt on Wily? or is there a genuine bug here?

I'm perfectly happy to write the fix and submit a PR, just thought there's probably more underneath this than I know.

Thanks,
Michael
Reply all
Reply to author
Forward
0 new messages