[pacman-dev] [PATCH v3 3/4] Moved dependencies of download functions into a library
Allan McRae
allan at archlinux.org
Wed Oct 9 00:40:48 EDT 2013
On 22/09/13 20:25, Ashley Whetter wrote:
> Moved functions out in preparation for splitting out download functions.
> scripts/libmakepkg/*.sh files only import the files from their relevant
> directory.
> All libmakepkg files have an inclusion guard.
> Also added libmakepkg targets to Makefile.am.
>
> Signed-off-by: Ashley Whetter <ashley at awhetter.co.uk>
> ---
Patch is fine but copyright years are excessive in some cases. As far
as I can tell, no line has been left untouch by contributors not covered
by the "Pacman Development Team" banner (apart form function names,
brackets and whitespace. So we don not need to propegate those to the
new files. Changes I will make while pulling this are noted below.
> scripts/.gitignore | 4 +
> scripts/Makefile.am | 38 +++++++-
> scripts/libmakepkg/util.sh.in | 30 +++++++
> scripts/libmakepkg/util/message.sh | 55 ++++++++++++
> scripts/libmakepkg/util/url.sh.in | 145 ++++++++++++++++++++++++++++++
> scripts/libmakepkg/util/util.sh.in | 58 ++++++++++++
> scripts/makepkg.sh.in | 180 ++-----------------------------------
> 7 files changed, 333 insertions(+), 177 deletions(-)
> create mode 100644 scripts/libmakepkg/util.sh.in
> create mode 100644 scripts/libmakepkg/util/message.sh
> create mode 100644 scripts/libmakepkg/util/url.sh.in
> create mode 100644 scripts/libmakepkg/util/util.sh.in
>
<snip>
>
> # vim:set ts=2 sw=2 noet:
> diff --git a/scripts/libmakepkg/util.sh.in b/scripts/libmakepkg/util.sh.in
> new file mode 100644
> index 0000000..11626bd
> --- /dev/null
> +++ b/scripts/libmakepkg/util.sh.in
> @@ -0,0 +1,30 @@
> +#!/bin/bash
> +#
> +# util.sh
> +#
> +# Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
Copyright (c) 2013
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; either version 2 of the License, or
> +# (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +
> +[ -n "$LIBMAKEPKG_UTIL_SH" ] && return
> +LIBMAKEPKG_UTIL_SH=1
> +
> +LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
> +
> +for lib in "$LIBRARY/util/"*.sh; do
> + source "$lib"
> +done
> +
> +# vim: set ts=2 sw=2 noet:
> diff --git a/scripts/libmakepkg/util/message.sh b/scripts/libmakepkg/util/message.sh
> new file mode 100644
> index 0000000..ad134fe
> --- /dev/null
> +++ b/scripts/libmakepkg/util/message.sh
> @@ -0,0 +1,55 @@
> +#!/bin/bash
> +#
> +# message.sh
> +#
> +# Copyright (c) 2006-2013 Pacman Development Team <pacman-dev at archlinux.org>
Just this line. The rest are unnneeded.
> +# Copyright (c) 2002-2006 by Judd Vinet <jvinet at zeroflux.org>
> +# Copyright (c) 2005 by Aurelien Foret <orelien at chez.com>
> +# Copyright (c) 2006 by Miklos Vajna <vmiklos at frugalware.org>
> +# Copyright (c) 2005 by Christian Hamar <krics at linuxforum.hu>
> +# Copyright (c) 2006 by Alex Smith <alex at alex-smith.me.uk>
> +# Copyright (c) 2006 by Andras Voroskoi <voroskoi at frugalware.org>
> +#
The rest I will keep the same. We could probably trim from the
2006-2013 range for libmakepkg/util/url.sh.in, but it is good enough.
Allan
More information about the pacman-dev
mailing list