summaryrefslogtreecommitdiff
path: root/src/xbs-abslibre/helper-abslibre
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-22 17:54:57 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-11-29 18:20:46 -0500
commit3793e4fac9d1d853251e84838caa2b8849d1f32b (patch)
tree58e08ef846ce924ac0e6d0c56e72533eb2f817c1 /src/xbs-abslibre/helper-abslibre
parent7f78dc3a2f09dafebe06f775c5611f1b7554115b (diff)
work on xbs-abslibre/helper-abslibre
Diffstat (limited to 'src/xbs-abslibre/helper-abslibre')
-rwxr-xr-xsrc/xbs-abslibre/helper-abslibre22
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