From ab2be5794de8a57426ec3fc0f631cc766a0b8227 Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Fri, 22 Sep 2017 13:01:09 -0500 Subject: makepkg: implement error codes For your convenience, makepkg now has 16 distinct ways to fail. Also closes FS#54204. Signed-off-by: Ivy Foster Signed-off-by: Allan McRae --- scripts/libmakepkg/util/error.sh.in | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/libmakepkg/util/error.sh.in (limited to 'scripts/libmakepkg') diff --git a/scripts/libmakepkg/util/error.sh.in b/scripts/libmakepkg/util/error.sh.in new file mode 100644 index 00000000..1ddc214d --- /dev/null +++ b/scripts/libmakepkg/util/error.sh.in @@ -0,0 +1,41 @@ +#!/bin/bash +# +# error.sh.in - error variable definitions for makepkg +# +# Copyright (c) 2006-2017 Pacman Development Team +# Copyright (c) 2002-2006 by Judd Vinet +# +# 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 . +# + +[[ -n "$LIBMAKEPKG_UTIL_ERROR_SH" ]] && return +LIBMAKEPKG_UTIL_ERROR_SH=1 + +E_OK=0 +E_FAIL=1 # Generic error +E_CONFIG_ERROR=2 +E_INVALID_OPTION=3 +E_USER_FUNCTION_FAILED=4 +E_PACKAGE_FAILED=5 +E_MISSING_FILE=6 +E_MISSING_PKGDIR=7 +E_INSTALL_DEPS_FAILED=8 +E_REMOVE_DEPS_FAILED=9 +E_ROOT=10 +E_FS_PERMISSIONS=11 +E_PKGBUILD_ERROR=12 +E_ALREADY_BUILT=13 +E_INSTALL_FAILED=14 +E_MISSING_MAKEPKG_DEPS=15 +E_PRETTY_BAD_PRIVACY=16 -- cgit v1.2.3-24-g4f1b