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

slackpkg: fix matching some special cases in package names. #505

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

majekw
Copy link
Contributor

@majekw majekw commented Jun 13, 2020

SUMMARY

There are some special cases in Slackware package naming which are not covered by $ARCH|noarch condition:

  • package kernel-headers has architecture set to x86 on x86_64
  • there are also some firmware packages with architecture set to fw

This PR adds check for kernel-headers special case and adds fw to other expected architectures.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

slackpkg.py

ADDITIONAL INFORMATION

For example, try to install package kernel-headers.
Module runs slackpkg install kernel-headers (installs it if package is not present), then check is run if package is installed, but it can't find it because architecture part of package name is different (x86 instead of expected x86_64) and task fails.

Similar thing for firmware files, for example zd1211-firmware-1.4-fw-1. It fails because architecture part is set to fw and doesn't match current condition.

Example output from system where kernel-headers are already installed

$ansible mii -m slackpkg -a "name=kernel-headers"
mii | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "msg": "failed to install kernel-headers: \nLooking for kernel-headers in package list. Please wait... DONE\n\nNo packages match the pattern for install. Try:\n\n\t/usr/sbin/slackpkg reinstall|upgrade \n\n\n",
    "stderr": "",
    "stderr_lines": []
}

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug module module labels Jun 13, 2020
@felixfontein
Copy link
Collaborator

Looks good to me. @KimNorgaard could you please take a look?

@ansibullbot ansibullbot added community_review small_patch Hopefully easy to review labels Jun 16, 2020
…ses_in_package_names.yml

Co-authored-by: Andrew Klychkov <[email protected]>
@felixfontein
Copy link
Collaborator

@majekw do you want to continue to work on this, or should we merge it?

@majekw
Copy link
Contributor Author

majekw commented Jun 16, 2020

It's ready to merge.
I force pushed as Github choose wrong e-mail for commit, so I corrected it, but nothing more was changed. Sorry for making confusion.

@felixfontein
Copy link
Collaborator

I'll wait a bit more so that @KimNorgaard can take a look when possible.

@KimNorgaard
Copy link

Looks good

@felixfontein felixfontein merged commit 736f2ec into ansible-collections:master Jun 17, 2020
@felixfontein
Copy link
Collaborator

@majekw @Andersson007 @KimNorgaard thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review module module small_patch Hopefully easy to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants