[pacman-dev] [patch] makepkg3 -- cleanup dep check functions
Roman Kyrylych
roman.kyrylych at gmail.com
Fri Jun 1 13:42:07 EDT 2007
2007/6/1, Andrew Fyfe <andrew at neptune-one.net>:
> >> - replace the exit calls with a call to a clean up function eg
> >> die() {
> >> local EXIT_CODE=$1; shift
> >> if [ $EXIT_CODE -gt 0 ]; then
> >> error "$@"
> >> fi
> >>
> >> if [ RMDEPS && DEPS_INSTALLED ]; then
> >> remove_deps
> >> fi
> >>
> >> ...
> >>
> >> exit $EXIT_CODE
> >> }
> > Probably not a bad idea, although let's get some other opinions. die
> > is an awfully harsh name, perhaps just cleanup. :P
> But cleanup doesn't sound as eViL as die :p. I prefer something like
> do_exit, cleanup is a little misleading people reading the code need to
> know the script will exit after {die,cleanup,do_exit}.
+1 for do_exit (though I always use die in PHP :-P)
>
> >> - Remove '--log', Always create a build log.
> > Some people may not want logs cluttering their build area, so lets get
> > some opinions.
I'm surely will not be pleasured with any clutter, but that's not too
critical to me.
> >> - Remove '--nocolor', This depends on the new isatty in initscripts
> > I know a lot of scripts use it now, so wait for now.
>
> The last 2 should have had a ? next to them. On second thoughts --log
> should stay. nocolor is dependent on the new isatty going into
> initscripts so it's a long term idea.
>
--
Roman Kyrylych (Роман Кирилич)
More information about the pacman-dev
mailing list