Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pop!_OS 20.04 not using aptpkg #58443

Merged
merged 1 commit into from Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/58395.fixed
@@ -0,0 +1 @@
Pop!_OS 20.04 and 20.10 now support using pkg.* / aptpkg.*
2 changes: 2 additions & 0 deletions salt/grains/core.py
Expand Up @@ -1556,6 +1556,7 @@ def id_():
"slesexpand": "RES",
"linuxmint": "Mint",
"neon": "KDE neon",
"pop": "Pop",
}

# Map the 'os' grain to the 'os_family' grain
Expand Down Expand Up @@ -1628,6 +1629,7 @@ def id_():
"Funtoo": "Gentoo",
"AIX": "AIX",
"TurnKey": "Debian",
"Pop": "Debian",
}

# Matches any possible format:
Expand Down
40 changes: 40 additions & 0 deletions tests/unit/grains/test_core.py
Expand Up @@ -726,6 +726,46 @@ def test_ubuntu_artful_os_grains(self):
}
self._run_os_grains_tests("ubuntu-17.10", _os_release_map, expectation)

@skipIf(not salt.utils.platform.is_linux(), "System is not Linux")
def test_pop_focal_os_grains(self):
"""
Test if OS grains are parsed correctly in Pop!_OS 20.04 "Focal Fossa"
"""
_os_release_map = {
"_linux_distribution": ("Pop", "20.04", "focal"),
}
expectation = {
"os": "Pop",
"os_family": "Debian",
"oscodename": "focal",
"osfullname": "Pop",
"osrelease": "20.04",
"osrelease_info": (20, 4),
"osmajorrelease": 20,
"osfinger": "Pop-20",
}
self._run_os_grains_tests("pop-20.04", _os_release_map, expectation)

@skipIf(not salt.utils.platform.is_linux(), "System is not Linux")
def test_pop_groovy_os_grains(self):
"""
Test if OS grains are parsed correctly in Pop!_OS 20.10 "Groovy Gorilla"
"""
_os_release_map = {
"_linux_distribution": ("Pop", "20.10", "groovy"),
}
expectation = {
"os": "Pop",
"os_family": "Debian",
"oscodename": "groovy",
"osfullname": "Pop",
"osrelease": "20.10",
"osrelease_info": (20, 10),
"osmajorrelease": 20,
"osfinger": "Pop-20",
}
self._run_os_grains_tests("pop-20.10", _os_release_map, expectation)

@skipIf(not salt.utils.platform.is_windows(), "System is not Windows")
def test_windows_platform_data(self):
"""
Expand Down