diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/xbs-abslibre/helper-abslibre | 22 |
1 files changed, 20 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>. +# 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 |