[Git][haskell-team/tools][master] 3 commits: binNMUs: Generalise fetchArchiveHTTP to not hardcode two suites

Ilias Tsitsimpis (@iliastsi) gitlab at salsa.debian.org
Thu Nov 16 18:09:50 GMT 2023



Ilias Tsitsimpis pushed to branch master at Debian Haskell Group / tools


Commits:
9707f718 by Jessica Clarke at 2023-11-16T12:25:51+00:00
binNMUs: Generalise fetchArchiveHTTP to not hardcode two suites

This is in preparation for the next commit which will (conditionally)
add a third suite to fetch packages from.

- - - - -
6f321c2d by Jessica Clarke at 2023-11-16T12:25:51+00:00
binNMUs: Overlay unreleased on sid for ports architectures

This is an additional suite for ports that provides packages for sid
that can't be uploaded to ftp-master (often due to containing patches
applied by a porter rather than a maintainer which have not (yet) been
accepted by the maintainer). Normally Haskell packages aren't uploaded
there, but loong64 and sparc64 have recently hit this case.

- - - - -
91e644b6 by Ilias Tsitsimpis at 2023-11-16T18:09:46+00:00
Merge branch 'binnmus-unreleased' into 'master'

binNMUs: Overlay unreleased on sid for ports architectures

See merge request haskell-team/tools!4
- - - - -


1 changed file:

- binnmus/binNMUs.hs


Changes:

=====================================
binnmus/binNMUs.hs
=====================================
@@ -497,14 +497,18 @@ fetchArchive c | sql c     = fetchArchiveSQL c
                | otherwise = fetchArchiveHTTP c
 
 
--- | Fetches packages for this arch, overlaying sid with buildd-sid
+-- | Fetches packages for this arch, overlaying sid with buildd-sid (and
+-- unreleased for ports architectures)
 fetchArchiveHTTP :: Conf -> Arch -> IO [Binary]
 fetchArchiveHTTP conf a = do
-    pkgs1 <- acquirePackagesHTTP conf ("buildd-" ++ distribution conf) a
-    let pkg1_names = S.fromList (map bPkgName pkgs1)
-    pkgs2 <- acquirePackagesHTTP conf (distribution conf) a
-    let pkgs2' = [ p | p <- pkgs2 , bPkgName p `S.notMember` pkg1_names ]
-    return $ pkgs1 ++ pkgs2'
+    let d = distribution conf
+    let suites = [d, "buildd-" ++ d] ++
+                 (if d == "sid" && a `elem` portsArches then ["unreleased"] else [])
+    pkglists <- sequence $ map (\s -> acquirePackagesHTTP conf s a) suites
+    return $ foldr (\pkgs2 pkgs1 ->
+        let pkg1_names = S.fromList (map bPkgName pkgs1) in
+        let pkgs2' = [ p | p <- pkgs2 , bPkgName p `S.notMember` pkg1_names ] in
+        pkgs1 ++ pkgs2') [] pkglists
 
 acquireFile' :: Conf -> String -> IO B.ByteString
 acquireFile' conf url = do



View it on GitLab: https://salsa.debian.org/haskell-team/tools/-/compare/5c4520a8c5f3067d87319f7262f5623d3b5d1f5d...91e644b619f8cade3f3a40e7c89c6d3afc10974e

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/tools/-/compare/5c4520a8c5f3067d87319f7262f5623d3b5d1f5d...91e644b619f8cade3f3a40e7c89c6d3afc10974e
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20231116/f43c91bd/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list