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

tdnf 3.5.2 does not respect excludepkgs with globbing on a custom repo #505

Open
ScriptAutomate opened this issue Nov 27, 2024 · 0 comments
Labels

Comments

@ScriptAutomate
Copy link

ScriptAutomate commented Nov 27, 2024

Describe the bug

When using excludepkgs or exclude in tdnf, with a custom repo configuration on Photon OS 5, I am unable to get tdnf to properly acknowledge globbing like dnf does on other operating systems (ex. Rocky Linux).

exclude seems to not be supported by tdnf, even though it is supported by yum and by dnf.

Reproduction steps

I have the following repo file: /etc/yum.repos.d/salt.repo

[salt-repo-3006-lts]
name=Salt Repo for Salt v3006 LTS
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=1
enabled_metadata=1
gpgcheck=1
excludepkgs=*3007* *3008* *3009* *3010*
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public

[salt-repo-3007-sts]
name=Salt Repo for Salt v3007 STS
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=0
enabled_metadata=1
gpgcheck=1
excludepkgs=*3006* *3008* *3009* *3010*
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public

[salt-repo-latest]
name=Salt Repo for Salt LATEST release
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=0
enabled_metadata=1
gpgcheck=1
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public

salt-repo-3006-lts is enabled by default, but excludepkgs (or exclude, as an alternative) doesn't look to work as expected.

# Will install salt-minion 3007.1 (latest *3007* release), when *3007* should be excluded
# This is essentially the same as "salt-repo-latest" repo being used instead
tdnf install salt-minion

Expected behavior

Expected to work like when using dnf:

# Will install salt-minion 3006.9 (current latest *3006*), as *3007* should be excluded
tdnf install salt-minion

Details from docs on DNF conf options:

excludepkgs
list

Exclude packages of this repository, specified by a name
or a glob and separated by a comma, from all operations.
Can be disabled using --disableexcludes command line
switch. Defaults to [].

With a list being defined as:

list
It is an option that could represent one or more strings
separated by space or comma characters.

Originally, I was using exclude because dnf supports it - perhaps so that repo files can be recognized both by systems using yum and dnf. Details from docs on YUM conf settings, where users may have repos using these YUM configs:

exclude=package_name [more_package_names]
This option allows you to exclude packages by keyword during installation/updates. Listing multiple packages for exclusion can be accomplished by quoting a space-delimited list of packages. Shell globs using wildcards (for example, * and ?) are allowed.

Additional context

Can try doing the same on Rocky Linux, via dnf, or other operating systems that are using yum (with exclude instead of excludepkgs). The functionality will differ from tdnf in both cases.

  • Best case scenario: Support both excludepkgs and exclude properly filtering out packages via globbing (has most universal benefit for repo config files)
  • Second best case scenario: Support excludepkgs properly filtering out packages via globbing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant