From 3793e4fac9d1d853251e84838caa2b8849d1f32b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 22 Sep 2013 17:54:57 -0400 Subject: work on xbs-abslibre/helper-abslibre --- src/xbs-abslibre/helper-abslibre | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/xbs-abslibre') diff --git a/src/xbs-abslibre/helper-abslibre b/src/xbs-abslibre/helper-abslibre index d8ef6ee..d023dc3 100755 --- a/src/xbs-abslibre/helper-abslibre +++ b/src/xbs-abslibre/helper-abslibre @@ -15,6 +15,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Here's the idea: +# We have two sources of abslibre: +# - git - does not include packages imported directly from Arch Linux +# - rsync - is read-only +# They should be identical, except for the mentioned differences. +# + status() { [[ -z $(git status -s .) ]] } @@ -47,12 +54,11 @@ release() { local repo=$1 local arch=$2 - local lookupfile= - . libremessages . $(librelib conf) load_files libretools check_vars libretools WORKDIR || return 1 + local lookupfile="${WORKDIR}/abslibre.xbs-lookup" read mode type sha1 file <<<"$(git ls-tree -d --full-tree HEAD "$(pwd)")" @@ -70,6 +76,12 @@ unrelease() { local repo=$2 local arch=$3 + . libremessages + . $(librelib conf) + load_files libretools + check_vars libretools WORKDIR || return 1 + local lookupfile="${WORKDIR}/abslibre.xbs-lookup" + lock 9 "$lookupfile.lock" "Waiting for lock on %s" "$lookupfile" sed -i "/^$repo $arch $pkgbase /d" "$lookupfile" lock_close 9 @@ -80,6 +92,12 @@ move() { local repo_to=$2 local pkgbase=$3 + . libremessages + . $(librelib conf) + load_files libretools + check_vars libretools WORKDIR || return 1 + local lookupfile="${WORKDIR}/abslibre.xbs-lookup" + lock 9 "$lookupfile.lock" "Waiting for lock on %s" "$lookupfile" sed -ri "s/^${repo_from} (\S+) $pkgbase /${repo_to} \1 $pkgbase/" "$lookupfile" # TODO -- cgit v1.2.3-54-g00ecf