Skip to content
This repository has been archived by the owner. It is now read-only.

apt_repository: Relax PPA check and add basename parameter #5432

Merged
merged 1 commit into from Nov 3, 2016

Conversation

Projects
None yet
3 participants
@ribbons
Copy link
Contributor

commented Oct 29, 2016

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

apt_repository

ANSIBLE VERSION
ansible 2.3.0 (devel 4a067c3f50) last updated 2016/10/28 19:17:11 (GMT +100)
  lib/ansible/modules/core: (relax-apt-repository-checks a180327552) last updated 2016/10/29 15:44:44 (GMT +100)
  lib/ansible/modules/extras: (detached HEAD 8bd40fb622) last updated 2016/10/28 19:19:09 (GMT +100)
SUMMARY

This PR solves a problem I encountered on KDE neon (not being able to install PPA repositories), while also aiming to resolve related issues under Mint and improve functionality under Debian. This is inspired by PR #190, but I've attempted to make this much simpler.

The main change allows installation of PPA repositories on non-Ubuntu Debian derived distribution targets (e.g. neon, Mint, Debian itself) by removing the specific check for UbuntuDistribution before allowing PPA: format sources. Removing this check fixes the addition of PPA repositories under KDE neon (as the code names match the base Ubuntu distribution). To enable installing PPAs under Mint and Debian which have different code names to their Ubuntu upstream / downstream releases, this also adds a codename option to override the default used in the PPA source entry.

This should resolve #4282, but would appreciate it if someone could test it under Mint before I add that to the commit message. I've tested the change under KDE neon.

This also applies to these (closed) issues raised in the main Ansible repository:

apt_repository: Relax PPA checks and add basename
Allow installation of PPA repositories on non-Ubuntu Debian derived
distribution targets (e.g. neon, Mint, Debian itself) by removing the
specific check for UbuntuDistribution before allowing PPA: format
sources. This fixes the addition of PPA repositories under KDE neon (as
the codenames match the base Ubuntu distribution).

To make the functionality also useful under Mint and Debian which have
different codenames to their Ubuntu upstream / downstream releases, add
a 'codename' option to override the default used in the PPA source
entry.
@abadger

This comment has been minimized.

Copy link
Member

commented Nov 3, 2016

Brief look at the code looks okay but I'm not using these distros so I'm not sure about whether it actually works or not.

@sashka (or @resmo since I see you assigned this to yourself) please test and merge if you think appropriate.

@resmo

This comment has been minimized.

Copy link
Member

commented Nov 3, 2016

LGTM

@resmo resmo merged commit 69e3aa1 into ansible:devel Nov 3, 2016

1 check passed

Shippable Run 2110 status is SUCCESS.
Details

gdelpierre added a commit to gdelpierre/ansible-modules-core that referenced this pull request Nov 9, 2016

apt_repository: Relax PPA checks and add basename (ansible#5432)
Allow installation of PPA repositories on non-Ubuntu Debian derived
distribution targets (e.g. neon, Mint, Debian itself) by removing the
specific check for UbuntuDistribution before allowing PPA: format
sources. This fixes the addition of PPA repositories under KDE neon (as
the codenames match the base Ubuntu distribution).

To make the functionality also useful under Mint and Debian which have
different codenames to their Ubuntu upstream / downstream releases, add
a 'codename' option to override the default used in the PPA source
entry.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.