]> dgit.raspbian.org Git - git-annex.git/commitdiff
handle upgrading repositories initialized with --version=9
authorJoey Hess <joeyh@joeyh.name>
Mon, 25 Jul 2022 20:13:46 +0000 (16:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 25 Jul 2022 20:23:09 +0000 (16:23 -0400)
There is nothing in upgrade.log because it was never upgraded to version
9. Before, it would have never autoupgraded to 10, but it's entirely
safe to upgrade to 10 immediately.

Of course, annex.autoupgraderepository = false will prevent that
upgrade. So if someone for some reason really wants v9, they can set
that. I can't think of a reason someone would actually want v9 rather
than v10 though.

Sponsored-by: k0ld on Patreon
Upgrade/V9.hs

index 61f256e24c8c8aa4207b38bc5d300cfdbba9bc3a..f2878856a9227d5b699ca0698c445157c6343ff4 100644 (file)
@@ -40,12 +40,13 @@ upgrade automatic
         - and it is not safe for such to still be running after
         - this upgrade. -}
        oldprocessesdanger = timeOfUpgrade (RepoVersion 9) >>= \case
-               Nothing -> pure True
                Just t -> do
                        now <- liftIO getPOSIXTime
                        if now < t + 365*24*60*60
                                then return True
                                else assistantrunning
+               -- Initialized at v9, so no old process danger exists.
+               Nothing -> return False
 
        {- Skip upgrade when git-annex assistant (or watch) is running,
         - because these are long-running daemons that could conceivably