[pacman-dev] [PATCH v2 1/2] makepkg: move config loading into libmakepkg

Eli Schwartz eschwartz at archlinux.org
Wed May 8 05:32:50 UTC 2019

On 5/8/19 1:08 AM, Allan McRae wrote:
> On 17/4/19 3:17 am, Eli Schwartz wrote:
>> Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
>> ---
> Comments from v1 indicate this will be useful for (e.g.) devtools to
> read a makepkg.conf.  But devtools uses a custom makepkg.conf plus info
> from a users ~/.makepkg.conf.   This patch will allow reading the custom
> makepkg.conf, but as it is not the system makepkg.conf it would then not
> parse the ~/. one.  So does this patch achieve its purpose?
In devtools, there is one "pristine" makepkg.conf used for configuring
the chroot, but we also want to extract certain variables from "whatever
plain old makepkg would see". MAKEFLAGS and PACKAGER as well as the
*DEST settings. As per makepkg, these could be set in /etc/makepkg.conf
or in ~/. -- so the objective would be to use this function and load the
default /etc/makepkg.conf + user-specific ones, and then eventually

echo "MAKEFLAGS='$MAKEFLAGS'" >> $chrootdir/etc/makepkg.conf

It would also be useful in another script, to obtain the $PKGDEST -- the
script will run makechrootpkg on a remote build server, then scp the
files back to the local machine, and it would be nice to scp it into the
same directory makepkg would have used if run locally.

I expect there are other programs out there which also desire to do
high-level things around makepkg, while still using makepkg's
configuration directories.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20190508/8af8b933/attachment-0001.sig>

More information about the pacman-dev mailing list