fix install of debootstrap from source
This commit is contained in:
parent
35648961dd
commit
00ab240164
|
@ -2,7 +2,9 @@ module Propellor.Property.Debootstrap (
|
|||
Url,
|
||||
DebootstrapConfig(..),
|
||||
built,
|
||||
built',
|
||||
installed,
|
||||
sourceInstall,
|
||||
programPath,
|
||||
) where
|
||||
|
||||
|
@ -54,11 +56,14 @@ toParams (c1 :+ c2) = toParams c1 <> toParams c2
|
|||
-- Note that reverting this property does not stop any processes
|
||||
-- currently running in the chroot.
|
||||
built :: FilePath -> System -> DebootstrapConfig -> RevertableProperty
|
||||
built target system@(System _ arch) config =
|
||||
built = built' (toProp installed)
|
||||
|
||||
built' :: Property -> FilePath -> System -> DebootstrapConfig -> RevertableProperty
|
||||
built' installprop target system@(System _ arch) config =
|
||||
RevertableProperty setup teardown
|
||||
where
|
||||
setup = check (unpopulated target <||> ispartial) setupprop
|
||||
`requires` toProp installed
|
||||
`requires` installprop
|
||||
|
||||
teardown = check (not <$> unpopulated target) teardownprop
|
||||
|
||||
|
|
|
@ -78,7 +78,10 @@ cleanInstallOnce confirmation = check (not <$> doesFileExist flagfile) $
|
|||
(Just u@(System (Ubuntu _) _)) -> debootstrap u
|
||||
_ -> error "os is not declared to be Debian or Ubuntu"
|
||||
debootstrap targetos = ensureProperty $ toProp $
|
||||
Debootstrap.built newOSDir targetos Debootstrap.DefaultConfig
|
||||
-- Ignore the os setting, and install debootstrap from
|
||||
-- source, since we don't know what OS we're running in yet.
|
||||
Debootstrap.built' Debootstrap.sourceInstall
|
||||
newOSDir targetos Debootstrap.DefaultConfig
|
||||
|
||||
flipped = property (newOSDir ++ " moved into place") $ liftIO $ do
|
||||
-- First, unmount most mount points, lazily, so
|
||||
|
|
Loading…
Reference in New Issue