remove old rpms

Don't want a mass of old versions of git-annex in rpm form cluttering up
my server.

Also, makerepo falls over when confronted with a dangling symlink.
This commit is contained in:
Joey Hess 2019-12-18 14:27:47 -04:00
parent c4e34cf55d
commit c9a3336235
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -220,7 +220,11 @@ virusFree f
buildrpms :: FilePath -> [(FilePath, Version)] -> Annex ()
buildrpms topdir l = do
liftIO $ createDirectoryIfMissing True rpmrepo
liftIO $ do
createDirectoryIfMissing True rpmrepo
oldrpms <- filter (".rpm" `isSuffixOf`)
<$> getDirectoryContents rpmrepo
mapM_ nukeFile oldrpms
forM_ tarrpmarches $ \(tararch, rpmarch) ->
forM_ (filter (isstandalonetarball tararch . fst) l) $ \(tarball, v) ->
void $ liftIO $ boolSystem script