Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
salt.21002
fix-aptpkg.normalize_name-when-package-arch-is-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-aptpkg.normalize_name-when-package-arch-is-all.patch of Package salt.21002
From 763d63b72b9a20f22555b665033899e10f091b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= <psuarezhernandez@suse.com> Date: Mon, 11 Jan 2021 15:45:28 +0000 Subject: [PATCH] Fix aptpkg.normalize_name when package arch is 'all' Add test case of DEB package where arch is 'all' --- salt/modules/aptpkg.py | 2 +- tests/unit/modules/test_aptpkg.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py index e001d2f11c..03e99af733 100644 --- a/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py @@ -208,7 +208,7 @@ def normalize_name(name): pkgname = name pkgarch = __grains__["osarch"] - return pkgname if pkgarch in (__grains__["osarch"], "any") else name + return pkgname if pkgarch in (__grains__["osarch"], "all", "any") else name def parse_arch(name): diff --git a/tests/unit/modules/test_aptpkg.py b/tests/unit/modules/test_aptpkg.py index 51dfce29eb..eb3f9e2da7 100644 --- a/tests/unit/modules/test_aptpkg.py +++ b/tests/unit/modules/test_aptpkg.py @@ -808,6 +808,8 @@ class AptPkgTestCase(TestCase, LoaderModuleMockMixin): assert result == "foo", result result = aptpkg.normalize_name("foo:any") assert result == "foo", result + result = aptpkg.normalize_name("foo:all") + assert result == "foo", result result = aptpkg.normalize_name("foo:i386") assert result == "foo:i386", result -- 2.29.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor