[pacman-dev] [PATCH v3 1/2] makepkg: Move parseopts from library to libmakepkg

Eli Schwartz eschwartz93 at gmail.com
Sun Oct 9 01:04:17 UTC 2016

On 10/08/2016 01:34 PM, Alad Wenter wrote:
> parseopts is used in makepkg and other scripts such as pacman-key as a
> getopt replacement.
> Instead of including it in those scripts via a macro, move it to
> libmakepkg/util/option.sh and have scripts source libmakepkg where
> appropriate.

Is it necessary for all those scripts to source the entirety of
libmakepkg? In fact, many parts of libmakepkg source a specific file
that that libmakepkg component needs.

I also don't think it should go in util/option.sh which doesn't have
anything to do with getopt/parseopts/any sort of command-line opts at all.
The header states:

option.sh - functions to test if build/packaging options are enabled

Why not move it to util/parseopts.sh if it should be moved into libmakepkg?

Eli Schwartz

More information about the pacman-dev mailing list