From a036e00f179c4b97d9647ae2111881208757394d Mon Sep 17 00:00:00 2001 From: Gordon GECOS Date: Wed, 22 Nov 2023 17:43:56 -0500 Subject: be sure to build all subvolumes --- fsmgr.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fsmgr.hs b/fsmgr.hs index c850d0f..2382f78 100644 --- a/fsmgr.hs +++ b/fsmgr.hs @@ -512,23 +512,26 @@ needSubvolume path = ioUnless (IO.doesDirectoryExist path) $ do cmd_ "chmod" ["--reference="++path++"/.."] [path] cmd_ "chown" ["--reference="++path++"/.."] [path] +needSubvolumes :: Action () +needSubvolumes = mapM_ needSubvolume ["_build", "_filesystem"] + shakeRules :: Rules () shakeRules = do ["_build/*.yaml.canon", "_filesystem/*.yaml.canon"] |%> \out -> do - needSubvolume "_build" + needSubvolumes let yaml = dropDirectory1 $ dropExtension out need [yaml] cfg <- readCfg yaml writeFileChanged out (show cfg) ["_build/*.btrfs", "_filesystem/*.patch.btrfs"] |%> \out -> do - needSubvolume "_build" + needSubvolumes let cfgFile = (out -<.> "yaml.canon") need [cfgFile] cfg <- readEither <$> readFile' cfgFile either (error . (("Error parsing file: " ++ cfgFile ++ ": ") ++)) (flip buildRoot out) cfg priority 2 $ "_filesystem/*.seed.btrfs" %> \out -> do - needSubvolume "_filesystem" + needSubvolumes let inp = ("_build" ) $ dropDirectory1 $ dropExtension out -<.> ".btrfs" tmp = out <.> "tmp" need [inp] -- cgit v1.2.3