From e45761f4049a7732242aa9572e3f6d87e60d391c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 4 Aug 2012 14:13:31 -0300 Subject: Be more helpful --- librerelease | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librerelease b/librerelease index c113572..a03ea98 100755 --- a/librerelease +++ b/librerelease @@ -116,7 +116,7 @@ clean_non_packages if [ ! -z "${SIGID}" ]; then sign_packages else - error "Package signing is *required*" + error "Package signing is *required*, please set SIGID on your libretools.conf" exit 1 fi -- cgit v1.2.3 From 7e50ae7becc4ee9b89664a8ec4eca4193cc74482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 4 Aug 2012 14:16:53 -0300 Subject: Only remove synced files, avoids removing packages added by librestage during sync --- librerelease | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/librerelease b/librerelease index a03ea98..82a6ab4 100755 --- a/librerelease +++ b/librerelease @@ -91,7 +91,7 @@ function clean_non_packages { # Clean everything if not on dry-run mode function clean { [ -z ${dryrun} ] && \ - find ${WORKDIR}/staging/ -type f -delete + rm -f $@ } if [ -w / ]; then @@ -126,6 +126,9 @@ fi find ${WORKDIR}/staging -type f -exec chmod 644 {} \; find ${WORKDIR}/staging -type d -exec chmod 755 {} \; +# Get the synced files +SYNCED_FILES=($(find ${WORKDIR}/staging -type f)) + msg "Uploading packages..." rsync --recursive \ ${dryrun} \ @@ -144,8 +147,8 @@ rsync --recursive \ exit 1 } -msg "Removing packages from local [staging]" -clean +msg "Removing ${#SYNCED_FILES[@]} packages from local [staging]" +clean ${SYNCED_FILES[@]} msg "Running db-update on repos" ssh ${PARABOLAHOST} dbscripts/db-update -- cgit v1.2.3 From 660b32b7bb06d80e81ae7da41efde6f80fd073d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 4 Aug 2012 14:18:50 -0300 Subject: Actually resign when signature failed --- librerelease | 2 -- 1 file changed, 2 deletions(-) diff --git a/librerelease b/librerelease index 82a6ab4..3820a12 100755 --- a/librerelease +++ b/librerelease @@ -66,8 +66,6 @@ function sign_packages { if ! gpg --quiet --verify "${package}${SIGEXT}" >/dev/null 2>&1; then error "Failed! Resigning..." rm -f "${package}${SIGEXT}" - else - continue fi fi -- cgit v1.2.3 From 0a7e0e2866dd5a3b8c794b1aefcec58c15cbe9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Fri, 10 Aug 2012 14:40:31 -0300 Subject: Not all removed files are packages --- librerelease | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librerelease b/librerelease index 3820a12..c4d97c1 100755 --- a/librerelease +++ b/librerelease @@ -145,7 +145,7 @@ rsync --recursive \ exit 1 } -msg "Removing ${#SYNCED_FILES[@]} packages from local [staging]" +msg "Removing ${#SYNCED_FILES[@]} files from local [staging]" clean ${SYNCED_FILES[@]} msg "Running db-update on repos" -- cgit v1.2.3 From fe138085ad889447942f03b969f1a3abb862cb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 15 Aug 2012 15:25:59 -0300 Subject: Toru-where is an utility to find PKGBUILD dirs on toru's path cache Use with toru-path --- toru-path | 5 +++++ toru-utils | 5 ----- toru-where | 11 +++++++++++ treepkg | 13 ++----------- 4 files changed, 18 insertions(+), 16 deletions(-) create mode 100755 toru-where diff --git a/toru-path b/toru-path index 5065a30..9bfc3ff 100755 --- a/toru-path +++ b/toru-path @@ -2,6 +2,11 @@ source $(dirname $(command -v $0))/toru-utils +if [ ! -w "$TORUPATH" ]; then + error "Toru's path isn't writable. Please check $TORUPATH" + exit 1 +fi + LASTSYNCFILE=${TORUPATH}/lastsync.paths # TODO pass other paths via flags diff --git a/toru-utils b/toru-utils index 0818aa6..c0918ae 100755 --- a/toru-utils +++ b/toru-utils @@ -5,11 +5,6 @@ source /etc/abs.conf source /etc/libretools.conf -if [ ! -w "$TORUPATH" ]; then - error "Toru's path isn't writable. Please check $TORUPATH" - exit 1 -fi - LASTSYNCFILE=${TORUPATH}/lastsync FORCE=false QUIET=false diff --git a/toru-where b/toru-where new file mode 100755 index 0000000..02a7a88 --- /dev/null +++ b/toru-where @@ -0,0 +1,11 @@ +#!/bin/bash +# Locates a PKGBUILD dir on toru's path cache + +source $(dirname $(command -v $0))/toru-utils + +# Look in all cached but pick the last one +grep "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \ + tail -n1 2>/dev/null|\ + cut -d: -f2 2>/dev/null + +exit $? diff --git a/treepkg b/treepkg index 8dab83a..fcb9d29 100755 --- a/treepkg +++ b/treepkg @@ -81,17 +81,8 @@ bury() { } || return 1 } -# Finds a PKGBUILD on toru's path cache -# Look in all caches but pick the first one -# TODO move to a toru flag (-p?) -where_is() { - grep "^${1}:" "${TORUPATH}/paths" 2>/dev/null| \ - tail -n1 2>/dev/null|\ - cut -d: -f2 2>/dev/null -} - # Guess the repo from the pkgbase path -# $1 path, pwd or where_is +# $1 path, pwd or toru-where guess_repo() { basename "$(dirname "${1}")" } @@ -176,7 +167,7 @@ if ! ${BUILDNOW}; then egrep -q ";${_dep};" "${BUILDORDER}" && bury "${_dep}" ${NEXTDEPTH} # Ask toru where's a PKGBUILD - depdir="$(where_is ${_dep})" + depdir="$(toru-where ${_dep})" if [ -z "${depdir}" -o ! -d "${depdir}" ]; then # We specify the pkgname because we can't source the dep PKGBUILD -- cgit v1.2.3 From b3b52d5c4a3cbcdeb505b099230107b830290e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Wed, 15 Aug 2012 15:28:35 -0300 Subject: TODO was implemented already --- treepkg | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/treepkg b/treepkg index fcb9d29..00ec0e0 100755 --- a/treepkg +++ b/treepkg @@ -157,13 +157,10 @@ if ! ${BUILDNOW}; then # NOTE: getting depends from package() is a PITA for _dep in ${deps[@]}; do -# Ignore if already in build order -# TODO move deps deeper in the tree if +# Move deps deeper in the tree if # pkgbase - dep1 # \ dep2 - dep1 # dep1 should be depth + 1 -# probably sed -i buildorder and increase dep's dep depth :D -# remember to change dir name from xxx_pkgbase to xxx+1_pkgbase egrep -q ";${_dep};" "${BUILDORDER}" && bury "${_dep}" ${NEXTDEPTH} # Ask toru where's a PKGBUILD -- cgit v1.2.3