summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-25 18:25:33 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-25 18:25:33 +0000
commit436739598d8a30acdcd74a1ac24e4783ce8110cf (patch)
tree447897975f6aa66c94d54cb6ae7e7f9c6e332fc4 /yarns
parente1bc54aebce156815a617a079c03b7689b832066 (diff)
downloadobnam-436739598d8a30acdcd74a1ac24e4783ce8110cf.tar.gz
Convert no-roots-from-old-gens into yarn
Diffstat (limited to 'yarns')
-rw-r--r--yarns/0030-basics.yarn15
-rw-r--r--yarns/9000-implements.yarn10
2 files changed, 25 insertions, 0 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
index 5d563f0b..92304a50 100644
--- a/yarns/0030-basics.yarn
+++ b/yarns/0030-basics.yarn
@@ -136,3 +136,18 @@ directory `L`.
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
+
+Changing backup roots
+---------------------
+
+When we change the backup roots, i.e., the directories we want backed
+up, we do not want the any dropped backup roots to be included in the
+new backup.
+
+ SCENARIO replace backup root with new one
+ GIVEN 1k of new data in directory L1
+ AND 1k of new data in directory L2
+ WHEN user U backs up directory L1 to repository R
+ AND user U backs up directory L2 to repository R
+ AND user U lists latest generation in repository R into F
+ THEN nothing in F matches L1
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index f70ccd07..aeb253d1 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -352,6 +352,16 @@ Do all lines match?
IMPLEMENTS THEN all lines in (\S+) match (\S+)
! grep -E -v -e "$MATCH_2" -- "$DATADIR/$MATCH_1"
+Does no line match?
+
+ IMPLEMENTS THEN nothing in (\S+) matches (\S+)
+ if grep -E -e "$MATCH_2" -- "$DATADIR/$MATCH_1" | grep '.*'
+ then
+ echo "At least one line matches, when none may!" 1>&2
+ exit 1
+ fi
+
+
Check on user group membership
------------------------------