summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-08-12 03:18:34 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-08-12 03:18:34 -0500
commit8addb9ec51a7df7f35a0271ef0cc8b523d82213b (patch)
treed97fa51a3149892f08551bd0a6d1bc8195e4223e
parent1499431f4c023eaccdf0aeb94c0bc8000f18ca9c (diff)
Added some base packages to cleansystem and fixed some comments
-rw-r--r--cleansystem3
-rwxr-xr-xfullpkg94
-rwxr-xr-xlibrerelease2
-rwxr-xr-xpkgbuild-check-nonfree11
4 files changed, 39 insertions, 71 deletions
diff --git a/cleansystem b/cleansystem
index 1cf9224..a27643b 100644
--- a/cleansystem
+++ b/cleansystem
@@ -122,3 +122,6 @@ wpa_supplicant
xfsprogs
xz
zlib
+libgssglue
+libtirpc
+
diff --git a/fullpkg b/fullpkg
index 6fb580c..6cdae31 100755
--- a/fullpkg
+++ b/fullpkg
@@ -86,69 +86,50 @@ find_deps() {
local repo=${repo:-$(guess_repo)}
local pkgbase=${pkgbase:-${pkgname[0]}}
-# Provide a default 0 to epoch
local epoch=${epoch:-0}
local fullver=$(get_fullver ${epoch} ${pkgver} ${pkgrel})
- if is_built "${pkgbase}>=${fullver}"; then
-# pkg is built and updated
+ if is_built "${pkgbase}>=${fullver}"; then # pkg is built and updated
exit 0
fi
-# greater levels are built first
- echo "${level}:${pkgbase}" >> "${build_dir}/BUILDORDER"
-# PKGBUILD is already there
- if [ -d "${build_dir}/${pkgbase}" ]; then
+ echo "${level}:${pkgbase}" >> "${build_dir}/BUILDORDER" # greater levels are built first
+ if [ -d "${build_dir}/${pkgbase}" ]; then # PKGBUILD is already there
exit 0
-
-# Copy dir to build_dir
- else
-
+ else # Copy dir to build_dir
cp -r ../${pkgbase}/ ${build_dir}/
-
-# to identify repo later
- echo "repo=$repo" > "${build_dir}/${pkgbase}/.INFO"
+ echo "repo=$repo" > "${build_dir}/${pkgbase}/.INFO" # to identify repo later
fi
-# current package plus a space for every level
- msg2 "%${level}s${pkgbase}-${fullver}"
+ msg2 "%${level}s${pkgbase}-${fullver}" # current package plus a space for every level
-## Check next levels
- declare -i next_level=$level+1
+ declare -i next_level=$level+1 ## Check next levels
-# All deps in separate line, only once, without version.
deps=$(echo "${depends[@]} ${makedepends[@]}" | \
sed "s/[=<>]\+[^ ]\+//g" | \
tr ' ' "\n" | \
- sort -u)
+ sort -u) # All deps in separate line, only once, without version.
for _dep in ${deps[@]}; do
local found=false
-# TODO ask toru where the pkgbuild is
- for _repo in ${REPOS[@]}; do
+ for _repo in ${REPOS[@]}; do # TODO ask toru where the pkgbuild is
-# ABSROOT/repo/package
- if [ -e "${ABSROOT}/${_repo}/${_dep}/PKGBUILD" ]; then
+ if [ -e "${ABSROOT}/${_repo}/${_dep}/PKGBUILD" ]; then # ABSROOT/repo/package
pushd "${ABSROOT}/${_repo}/${_dep}" > /dev/null
-# run this cmd on dep's PKGBUILD dir
- $0 -c -d ${build_dir} -l ${next_level}
-# probable circular deps
- [ $? -eq 20 ] && return 20
+ $0 -c -d ${build_dir} -l ${next_level} # run this cmd on dep's PKGBUILD dir
+ [ $? -eq 20 ] && return 20 # probable circular deps
popd > /dev/null
local found=true
-# found, end cycle
- break 1
+ break 1 # found, end cycle
fi
done
-
- if ( ${found} ); then
-# go to next dep
+ if ${found}; then # go to next dep
continue 1
else
echo "dep_not_found:$_dep" >> $build_dir/log
@@ -168,8 +149,7 @@ find_deps() {
__build() {
pushd ${build_dir} > /dev/null
-# greater levels must be built first
- build_packages=($(sort -gr $buildorder | cut -d: -f2))
+ build_packages=($(sort -gr $buildorder | cut -d: -f2)) # greater levels must be built first
while [ ${#build_packages[@]} -ge 1 ]; do
pushd $build_dir/${build_packages[0]} > /dev/null
@@ -179,34 +159,27 @@ __build() {
msg2 "Checking for non free deps"
pkgbuild-check-nonfree || {
-# this error means nonfree others means fail.
- if [ $? -eq 15 ]; then
+
+ if [ $? -eq 15 ]; then # this error means nonfree others means fail.
echo "nonfree:$(basename $PWD)" >> $build_dir/log
-# take out package from $buildorder
- remove_buildorder "$(basename $PWD)" $buildorder
+ remove_buildorder "$(basename $PWD)" $buildorder # take out package from $buildorder
-# build next package
- continue
+ continue # build next package
fi
}
msg2 "Building $(basename $PWD)"
-# this buildcmd is on libretools.conf
- $FULLBUILDCMD; r=$?
-
+ $FULLBUILDCMD; r=$? # this buildcmd is on libretools.conf
case $r in
-## Succesfull build
- 0)
-
+ 0) ## Succesfull build
plain "The build was succesful."
if source .INFO && [ -n $repo ]; then
-# Calls a local release script if it's used
- if [ ! -z $HOOKLOCALRELEASE ]; then
+ if [ ! -z $HOOKLOCALRELEASE ]; then # Calls a local release script
find -name "*.pkg.tar.?z" -print0 | xargs -0 $HOOKLOCALRELEASE $repo
fi
@@ -220,8 +193,7 @@ __build() {
echo "built:$(basename $PWD)" >> $build_dir/log
;;
-## Build failed
- *)
+ *) ## Build failed
error "There were errors while trying to build the package."
echo "failed:$(basename $PWD)" >> $build_dir/log
;;
@@ -229,8 +201,7 @@ __build() {
remove_buildorder "${build_packages[0]}" $buildorder || true
-# which is next package?
- build_packages=($(sort -gr $buildorder | cut -d: -f2))
+ build_packages=($(sort -gr $buildorder | cut -d: -f2)) # find out next package
popd > /dev/null
done
@@ -306,10 +277,9 @@ while getopts 'ha:b:cCd:l:nm:r:' arg; do
esac
done
-if [[ ! ${build_only} ]]; then
+if ! (( ${build_only} )); then
-# Check if we are actually on a build directory. Do this early.
- if [ ! -r PKGBUILD ]; then
+ if [ ! -r PKGBUILD ]; then # Check if we are actually on a build directory. Do this early.
error "This isn't a build directory"
usage
fi
@@ -322,19 +292,15 @@ fi
if [ $level -eq 0 ]; then
-# use -d option or else mktemp
- build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)}
+ build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp
-# in case of custom -d option
- if [ ! -d ${build_dir} ]; then
+ if [ ! -d ${build_dir} ]; then # in case of custom -d option
mkdir -p ${build_dir}
else
-# files already there can screw find_deps
- cleanup
+ cleanup # files already there can screw find_deps
fi
-# make files for log and buildorder
- touch ${build_dir}/{log,BUILDORDER} ${ban_file}
+ touch ${build_dir}/{log,BUILDORDER} ${ban_file} # make files for log and buildorder
buildorder=${build_dir}/BUILDORDER
if ! (( noupdate )); then
diff --git a/librerelease b/librerelease
index 7df5184..5283114 100755
--- a/librerelease
+++ b/librerelease
@@ -61,7 +61,7 @@ while getopts 'hlc' arg; do
case $arg in
h) usage; exit 0 ;;
l) list_packages; exit 0 ;;
- c) clean_packages; exit $? ;;
+ c) clean; exit $? ;;
esac
done
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree
index 55976a8..fd7b69e 100755
--- a/pkgbuild-check-nonfree
+++ b/pkgbuild-check-nonfree
@@ -19,6 +19,8 @@
# You should have received a copy of the GNU General Public License
# along with Parabola. If not, see <http://www.gnu.org/licenses/>.
+source /etc/libretools.conf
+
function in_array { # usage : in_array( $needle, $haystack )
[[ $2 ]] || return 1 # Not found
@@ -30,10 +32,9 @@ function in_array { # usage : in_array( $needle, $haystack )
return 1 # Not Found
}
-
function get_blacklist { # Download the blacklist.
- pushd $XDG_CONFIG_HOME/libretools/ >/dev/null
+ 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 ] || {
@@ -47,7 +48,7 @@ function get_blacklist { # Download the blacklist.
function check_deps { # Check wheter a package depends on non-free
- pushd $XDG_CONFIG_HOME/libretools/ >/dev/null
+ pushd "$XDG_CONFIG_HOME/libretools/" >/dev/null
local unfree=($(cut -d: -f1 blacklist.txt)) # pkgname:free-replacement:comments
local freerep=($(cut -d: -f2 blacklist.txt)) # pkgname:free-replacement:comments
popd >/dev/null
@@ -72,8 +73,6 @@ function check_deps { # Check wheter a package depends on non-free
done
}
-source /etc/libretools.conf
-
if [ -e $XDG_CONFIG_HOME/libretools/libretools.conf ]; then
source $XDG_CONFIG_HOME/libretools/libretools.conf
fi
@@ -89,7 +88,7 @@ else
fi
if [ ! -d "$XDG_CONFIG_HOME/libretools" ]; then
- mkdir -p $XDG_CONFIG_HOME/libretools
+ mkdir -p "$XDG_CONFIG_HOME/libretools"
fi
get_blacklist