summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfullpkg1
-rw-r--r--mips64el/mips-add1
-rw-r--r--mips64el/mips64el.conf2
-rwxr-xr-xpkgbuild-check-nonfree11
-rwxr-xr-xprtools/prfullpkg15
-rwxr-xr-xtoru2
6 files changed, 15 insertions, 17 deletions
diff --git a/fullpkg b/fullpkg
index ff01507..6fb580c 100755
--- a/fullpkg
+++ b/fullpkg
@@ -32,7 +32,6 @@ usage() {
echo " -a absdir : set absdir as ABSROOT."
echo " -b build_dir : use a fullpkg build_dir and only build."
echo " -c : check deps only, do not build."
- echo " -C : cleanup the build_dir."
echo " -d build_dir : use this dir to build. Defaults to mktemp."
echo " -n : don't update pacman db."
echo " -m max_level : check deps until this level"
diff --git a/mips64el/mips-add b/mips64el/mips-add
index 0d4e494..da9b431 100644
--- a/mips64el/mips-add
+++ b/mips64el/mips-add
@@ -1,4 +1,5 @@
#!/bin/bash
+source /etc/libretools.conf
if ! grep mips64el PKGBUILD >/dev/null; then # Add mips64el in ${arch} array if it isn't 'any'
warning "Adding mips64el arch"
sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" "PKGBUILD"
diff --git a/mips64el/mips64el.conf b/mips64el/mips64el.conf
index 48674b2..0825fad 100644
--- a/mips64el/mips64el.conf
+++ b/mips64el/mips64el.conf
@@ -2,7 +2,7 @@
## Run a command for PKGBUILD modifications before building
## Like adding 'mips64el' to arch if it's not there
-HOOKPKGBUILDMOD="mipsadd"
+HOOKPKGBUILDMOD="mips-add"
## Run a command for local releasing of packages
# Useful for mass packaging (ie. mips port)
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree
index b7c1237..55976a8 100755
--- a/pkgbuild-check-nonfree
+++ b/pkgbuild-check-nonfree
@@ -33,6 +33,7 @@ function in_array { # usage : in_array( $needle, $haystack )
function get_blacklist { # Download the blacklist.
+ pushd $XDG_CONFIG_HOME/libretools/ >/dev/null
msg "Downloading the blacklist of proprietary software packages."
wget -N -q -O blacklist.txt "${BLACKLIST}" 2>/dev/null || {
[ -e $XDG_CONFIG_HOME/libretools/blacklist.txt ] || {
@@ -41,6 +42,7 @@ function get_blacklist { # Download the blacklist.
}
warning "Using local copy of blacklist"
}
+ popd > /dev/null
}
function check_deps { # Check wheter a package depends on non-free
@@ -68,15 +70,11 @@ function check_deps { # Check wheter a package depends on non-free
fi
fi
done
-
- return $ev
}
source /etc/libretools.conf
-if [ -z $XDG_CONFIG_HOME ]; then # Avoid /libretools dir doesn't exist errors
- error "There's no XDG_CONFIG_HOME var set"; exit 1
-elif [ -e $XDG_CONFIG_HOME/libretools/libretools.conf ]; then
+if [ -e $XDG_CONFIG_HOME/libretools/libretools.conf ]; then
source $XDG_CONFIG_HOME/libretools/libretools.conf
fi
@@ -98,5 +96,4 @@ get_blacklist
check_deps
-exit $?
-
+exit $ev
diff --git a/prtools/prfullpkg b/prtools/prfullpkg
index e3a022b..dd2ba3a 100755
--- a/prtools/prfullpkg
+++ b/prtools/prfullpkg
@@ -67,11 +67,13 @@ function get_fullver { # return : full version spec, including epoch (if necessa
function cleanup { # Cleans the build_dir.
- [[ "${do_cleanup}" = "n" || ! -d ${build_dir} ]] && return 0 # Do nothing or already cleaned.
+ [ ! -d "${build_dir}" -o "${build_only}" = 'y' ] && return 0 # Do nothing or already cleaned.
- msg "Cleaning up..."
- [ $level -eq 0 ] && rm -rf $build_dir/* # Only do cleanup on level 0.
+ if [ $level -eq 0 ]; then # Only do cleanup on level 0.
+ msg "Cleaning up ${build_dir}"
+ rm -rf "$build_dir/*"
+ fi
}
function find_deps { # Checks ABSROOT and look for target pkg deps. Adds them if not built or outdated.
@@ -166,7 +168,7 @@ function find_deps { # Checks ABSROOT and look for target pkg deps. Adds them i
unset next_level dir
# unset PKGBUILD variables
- unset pkgname pkgver pkgrel epoch pkgdesc arch url license groups depends \
+ unset pkgbase pkgname pkgver pkgrel epoch pkgdesc arch url license groups depends \
makedepens checkdepends optdepends provides conflicts replaces backup \
options install changelog source noextract md5sums build check package
}
@@ -264,7 +266,6 @@ function trap_exit { # End inmediately but print a useful message
# Trap signals from makepkg
set -E
-trap 'cleanup' 0
trap 'trap_exit "(prfullpkg:${level}) TERM signal caught. Exiting..."' TERM HUP QUIT
trap 'trap_exit "(prfullpkg:${level}) Aborted by user! Exiting..."' INT
trap 'trap_exit "(prfullpkg:${level}) An unknown error has occurred. Exiting..."' ERR
@@ -314,14 +315,14 @@ fi
if [ $level -eq 0 ]; then
- build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp
-
if [ ! -d ${build_dir} ]; then # in case of custom -d option
mkdir -p ${build_dir}
else
cleanup # files already there can screw find_deps
fi
+ build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp
+
touch ${build_dir}/{log,BUILDORDER} ${ban_file} # make files for log and buildorder
buildorder=${build_dir}/BUILDORDER
diff --git a/toru b/toru
index 153d825..a9f0be7 100755
--- a/toru
+++ b/toru
@@ -50,7 +50,7 @@ lastsync() {
# Saves contents on a named cache
# $1 cache name (repo)
# $2+ contents
-store_cache() {
+function store_cache {
cache=$1; shift
[ -z "$cache" ] && return 1