clean up url removal presence update
* rmurl: Fix a case where removing the last url left git-annex thinking content was still present in the web special remote. * SETURLPRESENT, SETURIPRESENT, SETURLMISSING, and SETURIMISSING used to update the presence information of the external special remote that called them; this was not documented behavior and is no longer done. Done by making setUrlPresent and setUrlMissing only update presence info for the web, and only when the url is a web url. See the comment for reasoning about why that's the right thing to do. In AddUrl, had to make it update location tracking, to handle the non-web-url case. This commit was sponsored by Ewen McNeill on Patreon.
This commit is contained in:
parent
ca66e7b66a
commit
451171b7c1
14 changed files with 77 additions and 26 deletions
|
@ -83,7 +83,7 @@ startDistributionDownload d = go =<< liftIO . newVersionLocation d =<< liftIO ol
|
|||
where
|
||||
go Nothing = debug ["Skipping redundant upgrade"]
|
||||
go (Just dest) = do
|
||||
liftAnnex $ setUrlPresent webUUID k u
|
||||
liftAnnex $ setUrlPresent k u
|
||||
hook <- asIO1 $ distributionDownloadComplete d dest cleanup
|
||||
modifyDaemonStatus_ $ \s -> s
|
||||
{ transferHook = M.insert k hook (transferHook s) }
|
||||
|
@ -100,7 +100,7 @@ startDistributionDownload d = go =<< liftIO . newVersionLocation d =<< liftIO ol
|
|||
}
|
||||
cleanup = liftAnnex $ do
|
||||
lockContentForRemoval k removeAnnex
|
||||
setUrlMissing webUUID k u
|
||||
setUrlMissing k u
|
||||
logStatus k InfoMissing
|
||||
|
||||
{- Called once the download is done.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue