packages feed

fedora-repoquery 0.7.2 → 0.7.3

raw patch · 7 files changed

+48/−24 lines, 7 files

Files

ChangeLog.md view
@@ -1,5 +1,11 @@ # Revision history for fedora-repoquery +## 0.7.3 (2025-06-03)+- fix the naming of koji dnf repos+- flip the --dl and --debug short options+- add --queryformat "n" abbreviation+- support riscv64 repoqueries in fedora.riscv.rocks+ ## 0.7.2 (2025-05-08) - warn when no release specified - add support for epel10.x minor releases
README.md view
@@ -10,7 +10,7 @@ `$ fedora-repoquery rawhide firefox`  ```-firefox-138.0.1-1.fc43.x86_64 (fedora-rawhide)+firefox-139.0-1.fc43.x86_64 (fedora-rawhide) ```  `$ fedora-repoquery 42 --requires filesystem`@@ -34,7 +34,7 @@ `$ fedora-repoquery eln kernel`  ```-kernel-6.15.0-0.rc5.250507g0d8d44db295c.45.eln148.x86_64 (eln-BaseOS)+kernel-6.16.0-0.rc0.250530gf66bc387efbe.7.eln148.x86_64 (eln-BaseOS) ```  Without a release argument, the system yum repo configuration is used:@@ -69,8 +69,8 @@ `$ fedora-repoquery 42`  ```-2025-04-15 01:43:43 +08 <https://mirror.freedif.org/fedora/fedora/linux/releases/42/>-2025-05-08 12:18:02 +08 <https://mirror.freedif.org/fedora/fedora/linux/updates/42/>+2025-04-14 19:43:43 CEST <https://mirror.karneval.cz/pub/linux/fedora/linux/releases/42/>+2025-06-03 07:16:05 CEST <https://mirror.karneval.cz/pub/linux/fedora/linux/updates/42/> ```  One can also query multiple releases (or arch's):@@ -97,13 +97,13 @@ ``` fedora-repoquery tool for querying Fedora repos for packages. -Usage: fedora-repoquery [--version] [-4|--dnf4] [(-q|--quiet) | (-v|--verbose)]-                        [--dynamic] [-T|--time] [-K|--koji]-                        [(-m|--mirror URL) | (-D|--dl)]-                        [(-s|--source) | (-A|--all-archs) | [-a|--arch ARCH]]-                        [-t|--testing] [-d|--debug]-                        ((-z|--cache-size) | (-e|--cache-clean-empty) |-                          (-l|--list) |+Usage: fedora-repoquery [--version] [-4|--dnf4] [(-q|--quiet) | (-v|--verbose)] +                        [--dynamic] [-T|--time] [-K|--koji] +                        [(-m|--mirror URL) | (-d|--dl)] +                        [(-s|--source) | (-A|--all-archs) | [-a|--arch ARCH]] +                        [-t|--testing] [-D|--debug] +                        ((-z|--cache-size) | (-e|--cache-clean-empty) | +                          (-l|--list) |                            [RELEASE|--]... [REPOQUERY_OPTS]... [PACKAGE]...)    where RELEASE is {fN or N (fedora), 'rawhide', epelN, epelN-next, cN (centos@@ -121,12 +121,12 @@   -K,--koji                Use Koji buildroot   -m,--mirror URL          Fedora mirror [default:                            https://download.fedoraproject.org/pub]-  -D,--dl                  Use dl.fp.o+  -d,--dl                  Use dl.fp.o   -s,--source              Query source repos   -A,--all-archs           Query all (64 bit) arch repos   -a,--arch ARCH           Specify arch [default: x86_64]   -t,--testing             Fedora updates-testing-  -d,--debug               Show some debug output+  -D,--debug               Show some debug output   -z,--cache-size          Show total dnf repo metadata cache disksize   -e,--cache-clean-empty   Remove empty dnf caches   -l,--list                List Fedora versions
fedora-repoquery.cabal view
@@ -1,5 +1,5 @@ name:                fedora-repoquery-version:             0.7.2+version:             0.7.3 synopsis:            Fedora release repos package query tool description:         A CLI tool for repoquerying Fedora and Centos Stream release packages:@@ -9,7 +9,7 @@ license-file:        COPYING author:              Jens Petersen <petersen@redhat.com> maintainer:          Jens Petersen <petersen@redhat.com>-copyright:           2021-2024  Jens Petersen <petersen@redhat.com>+copyright:           2021-2025  Jens Petersen <petersen@redhat.com> category:            Utility homepage:            https://github.com/juhp/fedora-repoquery bug-reports:         https://github.com/juhp/fedora-repoquery/issues@@ -17,14 +17,13 @@ extra-doc-files:     README.md                      ChangeLog.md cabal-version:       2.0-tested-with:         GHC == 8.4-                     ||  == 8.6-                     ||  == 8.8+tested-with:         GHC == 8.10                      ||  == 9.0                      ||  == 9.2                      ||  == 9.4                      ||  == 9.6                      ||  == 9.8+                     ||  == 9.10  source-repository head   type:                git
src/Arch.hs view
@@ -17,6 +17,7 @@           | PPC64LE           | S390X           | I386+          | RISCV64   deriving Eq  allArchs :: [Arch]@@ -32,6 +33,7 @@     "s390x" -> Right S390X     "ppc64le" -> Right PPC64LE     "i386" -> Right I386+    "riscv64" -> Right RISCV64     _ -> Left $ "unknown arch: " ++ s  readArch :: String -> Arch@@ -46,6 +48,7 @@ showArch S390X = "s390x" showArch PPC64LE = "ppc64le" showArch I386 = "i386"+showArch RISCV64 = "riscv64"  getSystemArch :: IO Arch getSystemArch =
src/Main.hs view
@@ -50,12 +50,12 @@     <*> (RepoSource           <$> switchWith 'K' "koji" "Use Koji buildroot"           <*> ((Mirror <$> strOptionWith 'm' "mirror" "URL" ("Fedora mirror [default: " ++ downloadServer ++ "]")) <|>-               flagWith DownloadFpo DlFpo 'D' "dl" "Use dl.fp.o"))+               flagWith DownloadFpo DlFpo 'd' "dl" "Use dl.fp.o"))     <*> (flagWith' [Source] 's' "source" "Query source repos" <|>          flagWith' allArchs 'A' "all-archs" "Query all (64 bit) arch repos" <|>          many (optionWith (eitherReader eitherArch) 'a' "arch" "ARCH" ("Specify arch [default:" +-+ showArch sysarch ++ "]")))     <*> switchWith 't' "testing" "Fedora updates-testing"-    <*> switchWith 'd' "debug" "Show some debug output"+    <*> switchWith 'D' "debug" "Show some debug output"     <*> (flagWith' CacheSize 'z' "cache-size" "Show total dnf repo metadata cache disksize"          <|> flagWith' CacheEmpties 'e' "cache-clean-empty" "Remove empty dnf caches"          <|> flagWith' List 'l' "list" "List Fedora versions"
src/Query.hs view
@@ -97,6 +97,7 @@          expandQf qf =           case lower qf of+            "n" -> "%{name}"             "nv" -> "%{name}-%{version}"             "nvr" -> expandQf "nv" ++ "-%{release}"             "nvra" -> expandQf "nvr" <.> "%{arch}"
src/Release.hs view
@@ -40,8 +40,10 @@   let urlpath = url +//+ path   when debug $ print $ renderUrl Dir urlpath   (basicrepos,morerepos) <-+    if koji+    then return ([("koji",urlpath)],[])+    else     case release of-      -- RepoKoji -> ["koji-fedora"]       Centos n -> return ([("BaseOS",urlpath)],                           [("AppStream",url),(if n >= 9 then "CRB" else "PowerTools",url)])       ELN -> return ([("BaseOS",urlpath)],@@ -178,9 +180,13 @@               postbeta = releasePostBeta rel               rawhide = pending && releaseBranch rel == "rawhide"               releasestr = if rawhide then "rawhide" else show n-          in getFedoraServer debug dynredir reposource fedoraTop-             [if pending || postbeta then "development" else "releases",-              releasestr]+          in+            if arch == RISCV64+            then return (URL "http://fedora.riscv.rocks",[])+            else+              getFedoraServer debug dynredir reposource fedoraTop+              [if pending || postbeta then "development" else "releases",+               releasestr]     Rawhide -> getFedoraServer debug dynredir reposource fedoraTop ["development", "rawhide"]     System -> error' "getURL: system unsupported"   where@@ -192,6 +198,15 @@  repoConfigArgs :: RepoSource -> Arch -> Maybe Arch -> Natural -> Release                -> (String,URL) -> (String,(URL,[String]))+repoConfigArgs (RepoSource False _mirror) sysarch (Just RISCV64) _rawhide release (repo,url) =+  let (compose,path) =+        case release of+          Rawhide -> (["repos-dist", show release, "latest"],"")+          _ -> (["repos-dist", show release, "latest"],"")+      arch = RISCV64+      reponame = repo ++ "-" ++ show release +++                 if arch == sysarch then "" else "-" ++ showArch arch+  in (reponame, (url +//+ compose, [path, showArch arch, ""])) -- non-koji repoConfigArgs (RepoSource False mirror) sysarch march rawhide release (repo,url) =   let arch = fromMaybe sysarch march