[Lsb-messages] /var/www/bzr/lsb/devel/repogen r207: Identical packages are equivalent, but we don't want to clean them up.
Jeff Licquia
licquia at linuxfoundation.org
Mon Jun 17 20:41:44 UTC 2013
------------------------------------------------------------
revno: 207
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: repogen
timestamp: Mon 2013-06-17 13:41:44 -0700
message:
Identical packages are equivalent, but we don't want to clean them up.
modified:
migrate-pkg.hs
-------------- next part --------------
=== modified file 'migrate-pkg.hs'
--- a/migrate-pkg.hs 2013-06-17 20:01:18 +0000
+++ b/migrate-pkg.hs 2013-06-17 20:41:44 +0000
@@ -68,6 +68,11 @@
putStrLn $ "removing " ++ f
removeFile f
+-- Identical packages are equivalent, but we don't want to pick them up.
+
+equivalentButNotIdentical :: Package -> Package -> Bool
+equivalentButNotIdentical x y = (equivalent x y) && (x /= y)
+
-- Given a Package, look for previous versions of that package in the
-- same directory, and archive them.
@@ -75,7 +80,7 @@
archiveOldPkgs pkg = do
let pkgPath = takeDirectory $ path pkg
pkgDirContents <- liftM (map (combine pkgPath)) $ getDirectoryContents pkgPath
- mapM_ (\f -> when (maybe False (equivalent pkg) (packageFromPath f)) $ archiveFile f) pkgDirContents
+ mapM_ (\f -> when (maybe False (equivalentButNotIdentical pkg) (packageFromPath f)) $ archiveFile f) pkgDirContents
main :: IO ()
main = do
More information about the lsb-messages
mailing list