handle transfer repository bootstrapping
When there's just 1 client repo, and a transfer repo is created, its preferred content will now make it prefer all content in the client, even though there's no other client yet to transfer it to. Presumably, another client will be created eventually. It might even already exist, and the transfer repo will be used to connect up with it.
This commit is contained in:
parent
2aacae3ebb
commit
27ea68ac6e
2 changed files with 8 additions and 2 deletions
|
@ -32,6 +32,6 @@ descStandardGroup BackupGroup = "backup: collects all files"
|
|||
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
|
||||
preferredContent :: StandardGroup -> String
|
||||
preferredContent ClientGroup = "exclude=*/archive/*"
|
||||
preferredContent TransferGroup = "not inallgroup=client and " ++ preferredContent ClientGroup
|
||||
preferredContent TransferGroup = "not (inallgroup=client or not copies=client:2) and " ++ preferredContent ClientGroup
|
||||
preferredContent ArchiveGroup = "not copies=archive:1"
|
||||
preferredContent BackupGroup = "" -- all content is preferred
|
||||
|
|
|
@ -61,7 +61,13 @@ USB drive used in a sneakernet.
|
|||
The preferred content expression for these causes them to get and retain
|
||||
data until all clients have a copy.
|
||||
|
||||
`not inallgroup=client and exclude=*/archive/*`
|
||||
`not (inallgroup=client or not copies=client:2) and exclude=*/archive/*`
|
||||
|
||||
The "not copies=client:2" part of the above handles the case where
|
||||
there is only one client repository. It makes a transfer repository
|
||||
speculatively prefer content in this case, even though it as of yet
|
||||
has nowhere to transfer it to. Presumably, another client repository
|
||||
will be added later.
|
||||
|
||||
### archive
|
||||
|
||||
|
|
Loading…
Reference in a new issue