FS#78108 - [toolchain] leftover pkgs in in base-devel group breaks some ansible scenarios

Attached to Project: Arch Linux
Opened by Dan Ivy (divy) - Tuesday, 04 April 2023, 03:07 GMT
Last edited by freswa (frederik) - Tuesday, 04 April 2023, 09:51 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
On Feb 2nd, the base-devel group was converted to a meta package. But the binutils, gcc, and libtool packages never were removed from the group, which is causing automation tools, like Ansible, to think that base-devel is already installed when these 3 packages are already installed. Please remove these packages from the base-devel group so that Ansible will stop confusing base-devel for a group instead of a meta package.

Additional info:
* base-devel group: https://archlinux.org/groups/x86_64/base-devel/
* Ansible pacman module using "pacman --query --groups" to determine installed groups: https://github.com/ansible-collections/community.general/blob/cee5f31b70bff5e874ac6083c708c27c112e2bea/plugins/modules/pacman.py#L718


Steps to reproduce (querying with pacman):
0. Install binutils, gcc, and libtool packages
1. pacman --sync --group base-devel

Expected output:
```
$ pacman --sync --group base-devel
* No output *
```

Actual output:
```
$ pacman --sync --group base-devel
base-devel binutils
base-devel gcc
base-devel libtool
```



Steps to reproduce (installing base-devel with Ansible):
0. Install ansible, binutils, gcc, and libtool packages
1. ansible --become --ask-become-pass --module-name package --args 'name=base-devel use=pacman' localhost
2. pacman --query | grep base-devel

Expected output:
```
$ ansible --become --ask-become-pass --module-name package --args 'name=base-devel use=pacman' localhost
* ansible installing base-devel *
$ pacman --query | grep base-devel
base-devel 1-1
```

Actual output:
```
$ ansible --become --ask-become-pass --module-name package --args 'name=base-devel use=pacman' localhost
localhost | SUCCESS => {
"changed": false,
"msg": "packages(s) already installed",
"packages": []
}
$ pacman --query | grep base-devel
* no output *
```
This task depends upon

Closed by  freswa (frederik)
Tuesday, 04 April 2023, 09:51 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Will be fixed with next gcc release - see comment
Comment by Toolybird (Toolybird) - Tuesday, 04 April 2023, 03:35 GMT
Fixed in SVN...just waiting for new pkg uploads which takes time...because....toolchain.
Comment by Doug Newgard (Scimmia) - Tuesday, 04 April 2023, 03:36 GMT
If ansible is looking for the group, that's an ansible problem
Comment by Dan Ivy (divy) - Tuesday, 04 April 2023, 04:02 GMT
@Toolybird - Thank you! No worries about time here, writing a workaround script is trivial for something like this.

@Scimmia - I 100% agree with you. But given the limited interface that pacman provides, namely in that it doesn't have a first-class method of listing installed groups that I'm aware of (see https://bbs.archlinux.org/viewtopic.php?id=251788), using pacman -Sg or similar is the best option Ansible has at its disposal. So as soon as pacman grants a reliable way of outputting a list of installed/available groups, I would be happy to work with the Ansible community to make the package module more resilient. In the meantime though, let's address the false information that's causing pacman to advertise groups that don't actually exist.
Comment by freswa (frederik) - Tuesday, 04 April 2023, 09:51 GMT
GCC 13 release will probably happen in the next weeks and as already mentioned by Toolybird, the fix applied to SVN trunk will be available in the upcoming packages.
I won't pull a rebuild until then so this is a won't fix. Feel free to rebuild the toolchain for the systems affected locally :)

Loading...