[pacman-dev] makepkg3 suggestions/thoughts

Dan McGee dpmcgee at gmail.com
Sun Mar 25 23:11:18 EDT 2007

On 3/24/07, Andrew Fyfe <andrew at neptune-one.net> wrote:
> * Remove the '--usesudo | -S' option.
> Instead always use sudo to calling pacman when an unprivileged user runs
> makepkg and spit out a warning (or error) if sudo is missing. Is sudo
> part of the base Arch Linux system?

It pretty much should be, although I don't think it is installed by
default, that list of packages is kept very short. Like I said before,
I'd really like to discourage use of makepkg as root.

> * Move common functions to a seperate file.
>    plain, msg*, error, warning, in_array, check_*
> This has been brought up a few times, the last time it was suggested
> that the file should go in /usr/lib/archlinux/functions. (I think that
> was it). I'll make a patch if that's where they're going to go.
> Alternatively an autoconf option could be added to set the folder when
> pacman is built.

This path shouldn't be hardcoded, that is for sure. I don't know if
you are familiar with our initscripts, but we already have a set of
message functions in /etc/rc.d/functions. Check out the package for
more details. What would be ideal is to somehow consolidate all of
these into one file, and make them useful for any future application
that wants to use them.

I started this for about a half hour one night and its been sitting
there since, but we'll see where that goes.

> * Move --cleancache into it's own script. (Or remove altogether)
> It's alot of code for 'rm $SRCDEST/*'. Do people use it?

I kinda think it breaks the KISS idea, although pacman has a similar
option (but since it's cache has root permissions, that could be seen
as different). And if you followed the lists and saw a bug that came
up a few weeks ago with that, you would really want to say "let's get
rid of this" (it killed someone's $HOME).

> * Move BUILDSCRIPT="PKGBUILD" and PKGEXT="pkg.tar.gz" into makepkg.conf.
> They're used in a few scripts.

Probably not a bad idea.

> * sha256 sha3.. sha512
> WTFs wrong with md5 and sha1? Do we REALLY need these? If they must
> remain I demand the inclusion of CRC :p

Patch it for CRC then. :P
The idea was just that it is now extensible. I currently generate both
md5 AND sha1 sums and stick them in my PKGBUILDs. We are trying to
slowly reduce the amount of Arch decisions made directly in the pacman
codebase, and I guess this is one of them.

> * Remove '--nocolor | -m' option.
> If you don't like colour switch it off in makepkg.conf :p
> Is it used?

I know it is used in a few wrapper scripts of pacman, in order to not
corrupt the display. We'd like to switch to some more
terminal-agnostic ways of doing colors, so they are cleanly handled
everywhere including pipes. The 'tput' utility was brought up a while
back, and that looked quite promising. It would allow someone using a
bold/underline only terminal to still get some contrast in their
output. This directly applies to that whole functions discussion


More information about the pacman-dev mailing list