From f0f010772d651e09f957f9b47057e81e7737ad45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Thu, 2 Jun 2011 13:31:17 -0500 Subject: fullpkg shows guessed dir libretools.conf has reordered repos before community --- fullpkg | 7 ++++--- libretools.conf | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fullpkg b/fullpkg index 14c4e9f..a95f59d 100755 --- a/fullpkg +++ b/fullpkg @@ -161,11 +161,12 @@ function find_deps { # if search pkgname in repo doesn't work # this should find pkgsplits - elif _dir=($(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 | \ - "xargs" -0 -e grep -HEw "pkgname=|pkgbase=|provides=" | grep $_dep 2>&1)); + elif _dir=($(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 2>/dev/null | \ + "xargs" -0 -e grep -HEw "pkgname=|pkgbase=|provides=" | grep -w "$_dep" 2>&1)); then + _dir=$(dirname $(echo $_dir | cut -d: -f1)) plain "guess for $_dep -> $_dir" - pushd $(dirname $(echo $_dir | cut -d: -f1)) > /dev/null + pushd $_dir > /dev/null $0 -c -d ${build_dir} -l ${next_level} # Circular deps must fail [ $? -eq 20 ] && return 20 diff --git a/libretools.conf b/libretools.conf index 4badc5c..c4ac606 100644 --- a/libretools.conf +++ b/libretools.conf @@ -10,7 +10,7 @@ WORKDIR=/home/$USER/packages # Tip: As early repos take precedence on $REPOS loops, you can use this as # inverted order of precedence. Put testing repos first so fullpkg find new # PKGBUILDs first, for instance. -REPOS=('libre' 'libre-testing' 'core' 'community' 'extra' 'social' 'sugar') +REPOS=('core' 'extra' 'community' 'libre' 'libre-testing' 'social' 'sugar') # The architectures ARCHES=('i686' 'x86_64' 'mips64el' 'any') -- cgit v1.2.3 From 49850f2ba4494956e31b9d8474903e9ab3dd9b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Thu, 2 Jun 2011 14:29:14 -0500 Subject: librestage can find packages with epoch --- librestage | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/librestage b/librestage index f074672..917c9bf 100755 --- a/librestage +++ b/librestage @@ -77,7 +77,9 @@ staged='n' for _arch in ${ARCHES[@]}; do for pkg in ${pkgname[@]}; do - pkgpath=$(find ${PKGDEST}/ -type f -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}") + pkgpath=$(find ${PKGDEST}/ -type f \ + -name "${pkg}-${pkgver}-${pkgrel}-${_arch}${PKGEXT}" -or \ + -name "${pkg}-${epoch}:${pkgver}-${pkgrel}-${_arch}${PKGEXT}") [[ -z ${pkgpath} ]] && continue -- cgit v1.2.3 From f42a4c74f8d9422c3ef5101dda199ed988dffd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Sun, 5 Jun 2011 15:58:50 -0500 Subject: * [ ! -w "/" ] expression to check root failed. --- libremakepkg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libremakepkg b/libremakepkg index b02b778..b0e1371 100755 --- a/libremakepkg +++ b/libremakepkg @@ -60,13 +60,15 @@ while getopts ${libremakepkgargs} arg ; do esac done -if [ !-w / ]; then +if [ $UID -ne 0 ]; then error "This script must be run as root" exit 1 fi msg "Checking PKGBUILD for non-free issues" pkgbuild-check-nonfree ||{ +# pkgbuild-check-nonfree uses 15 for nonfree and +# other errors if something failed. if [[ $? -eq 15 ]]; then error "PKGBUILD contains non-free issues" exit 15 @@ -75,7 +77,7 @@ pkgbuild-check-nonfree ||{ if [ $update_first = y ]; then msg "Updating the main chroot" - # -c option in mkarchroot indicates cache +# -c option in mkarchroot indicates cache mkarchroot -c ${CACHEDIR} -u "${CHROOTDIR}/${CHROOT}" fi -- cgit v1.2.3 From 407d3f31705ce09a6b2f0623205de2cd8c991400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Ismael=20Haase=20Hern=C3=A1ndez?= Date: Sun, 5 Jun 2011 18:06:39 -0500 Subject: * remove_queue to use "grep -E" --- fullpkg | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/fullpkg b/fullpkg index a95f59d..410584a 100755 --- a/fullpkg +++ b/fullpkg @@ -10,7 +10,7 @@ source /usr/bin/libremessages [ -r $XDG_CONFIG_HOME/libretools/libretools.conf ] && \ source $XDG_CONFIG_HOME/libretools/libretools.conf -## START FUNCTIONS ## +##### START FUNCTIONS ##### function usage { echo "cd to a dir containing a PKGBUILD and run:" @@ -67,7 +67,7 @@ update_queue() { remove_queue() { get_queue - grep -vw "^$(basename $PWD)" $queue_file > $queue_file.2 + grep -Evw "^$(basename $PWD)" $queue_file > $queue_file.2 mv $queue_file.2 $queue_file put_queue && return 0 || return $? @@ -238,20 +238,21 @@ function _pkg_build () { # this buildcmd is on libretools.conf $FULLBUILDCMD; r=$? case $r in - 0) plain "The build was succesful." - source .INFO && [ -n $repo ] && { - librestage $repo || { - echo "unstaged:$(basename $PWD)" >> $build_dir/log +###### Succesfull Build ###### + 0) + plain "The build was succesful." + source .INFO && [ -n $repo ] && { + librestage $repo || { + echo "unstaged:$(basename $PWD)" >> $build_dir/log + } } - } - echo "built:$(basename $PWD)" >> $build_dir/log - cleanup "$(basename $PWD)" - ;; - 1) error "There were errors while trying to build the package." - echo "failed:$(basename $PWD)" >> $build_dir/log + echo "built:$(basename $PWD)" >> $build_dir/log + cleanup "$(basename $PWD)" ;; - 2) error "The build failed." - echo "failed:$(basename $PWD)" >> $build_dir/log +###### Failed Build ###### + *) + error "There were errors while trying to build the package." + echo "failed:$(basename $PWD)" >> $build_dir/log ;; esac -- cgit v1.2.3 From 3505f337fcabdc51c1c165587ae77b70a0161614 Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Tue, 7 Jun 2011 13:29:32 -0300 Subject: fullpkg still needs local releasing --- fullpkg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fullpkg b/fullpkg index 410584a..a668b45 100755 --- a/fullpkg +++ b/fullpkg @@ -242,6 +242,10 @@ function _pkg_build () { 0) plain "The build was succesful." source .INFO && [ -n $repo ] && { +# Release locally + mipsrelease *.pkg.tar.?z + +# Stage for releasing librestage $repo || { echo "unstaged:$(basename $PWD)" >> $build_dir/log } -- cgit v1.2.3 From 6d20859e305d5998358ee61d93741600fafd0b4e Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Tue, 7 Jun 2011 13:39:37 -0300 Subject: fullpkg needs to update the repo dbs after local release --- fullpkg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fullpkg b/fullpkg index a668b45..f281df3 100755 --- a/fullpkg +++ b/fullpkg @@ -249,6 +249,9 @@ function _pkg_build () { librestage $repo || { echo "unstaged:$(basename $PWD)" >> $build_dir/log } + + msg "Updating pacman db and packages" + sudo pacman -Syu --noconfirm } echo "built:$(basename $PWD)" >> $build_dir/log cleanup "$(basename $PWD)" -- cgit v1.2.3