[pacman-dev] [PATCH] scripts/*.sh.in: Clean up and fix a few bugs

Dan McGee dpmcgee at gmail.com
Tue Sep 4 07:53:56 EDT 2007


On 8/29/07, Andrew Fyfe <andrew at neptune-one.net> wrote:
> Ignore this patch there's a small bug in repo-add, I'm sending the fixed
> patch in a second.
>
> Andrew

A few comments on this patch:
1. If we use the message functions in repo-add/repo-remove and
friends, then we should honor the color preference set in makepkg.conf
since we source it (correct me if I'm wrong).
2. At some point we should put all these shell script functions we
reuse (msg2, error, etc.) into wherever the FHS says they belong so we
aren't duplicating so much code, and have each script source them.
(Similar to the initscripts /etc/rc.d/functions file).
3. In repo-add, you used both error() and the text "ERROR". This will
result in it getting printed twice.
4. This didn't look quite right (missing an '%s'):
-	printf "$(gettext "ERROR: /etc/makepkg.conf not found. Can not
continue.")\n" >&2
+	error "$(gettext "/etc/makepkg.conf not found. Can not continue.")"
"@sysconfdir@/makepkg.conf"

-Dan




More information about the pacman-dev mailing list