Usage of pacman within devtools
Hi,
this question inquires whether the developers of devtools
find it appropriate to make use of pacutils
as a substitute for pacman
within the chroot, in order to provide cause for inclusion of pacutils
within base-devel
.
See also !205 (closed) and archlinux/packaging/packages/base-devel#3
Background
While most packaging related matters are delegated to makepkg
, there are some instances where devtools
needs features of libalpm
not exposed by makepkg
, mostly dealing with package installation. Since devtools
is bash-based, the natural choice to use is the pacman
command, owing to the fact that it's used by Arch users everywhere and conveniently included in the same package as makepkg
and libalpm
, aptly named pacman
.
pacman
, the command, isn't a perfect choice, which is exemplified by the issue of #163 (closed). This issue occurs due to b7893a2c which itself is a workaround to behaviour not implemented by pacman
. So what, just implement it?
The issue over at pacman/pacman#60 sought to do just that. While there were many suggestions of how to solve it, @allan made the following comment:
It has been the historical position of the developers that support for using pacman in scripting (or otherwise unattended) should not be added.
It is clear that the issue above won't be solved within pacman. In a separate statement, @andrew added:
As the second most senior pacman dev and developer of pacutils, I can tell you pacutils is the preferred solution for scripting.
I actually made an MR (!205 (closed)) utilizing pacutils as suggested. Due to working within the chroot, the MR doesn't look nice, as devtools
cannot assume pacutils
to be installed, only base-devel
. Accordingly, archlinux/packaging/packages/base-devel#3 asks to add pacutils
to base-devel
.
There, @foxboron made this request:
You are better off figuring out if devtools even wants to use pacutils before adding it into base-devel.
The question
@anthraxx @jelle @gromit @foxboron
As indicated above, the developers of pacman
won't support scripting use cases which is arguably the exact use case for it within devtools
. A replacement developed by one of them is pacutils
, specifically supporting scripting.
Within the context of devtools, do you want to use pacutils
?
This doesn't mean that any change has to happen immediately, rather it's a long-term goal with clear applications. In addition, approval of pacutils
might prove sufficient to add it to base-devel
.
The other option
In the pacman thread, another option is --ask=4
for the particular problem at hand. It is - to quote Allan - "entirely undocumented" and only exists for testing purposes, but also solves the problem in case pacutils
is not an option. It's the only workable alternative that came up in the context of that discussion.
Conclusion
Please consider this question and write a response as a comment below. I believe that pacutils
is a suitable replacement, especially once it's included in base-devel
.
-- Vekhir