packages feed

koji-tool 0.8 → 0.8.1

raw patch · 11 files changed

+165/−90 lines, 11 files

Files

ChangeLog.md view
@@ -1,5 +1,11 @@ # Version history of koji-tool +# 0.8.1 (2022-03-21)+- query results ordered by taskid or buildid for speed+- 'builds', 'tasks': argument is now a package otherwise use --pattern (replaces --package)+- 'install': add a --yes option to avoid questions (#2)+- print archs appended with '.' prefix+ # 0.8 (2022-03-02) - rename 'query' to 'tasks' - 'tasks': new '--tail' option to fetch and display tail of build.log
README.md view
@@ -16,7 +16,7 @@  `koji-tool install systemd`: will try to install or update to the newest rpm packages from koji. -`koji-tool builds --package firefox -L -s complete`:+`koji-tool builds -L -s complete firefox`: shows the last successful build with a url and other details.  ## Commands@@ -50,6 +50,8 @@ It uses `date` to parse a specified date string and can use an NVR glob pattern to select builds. +Note results are ordered by build_id (not time) for speed.+ ### Usage  By default lists up to 10 Fedora Koji builds.@@ -60,7 +62,8 @@                         [(-L|--latest) | (-l|--limit INT)] [-s|--state STATE]                         [(-B|--before TIMESTAMP) | (-F|--from TIMESTAMP)]                         [-t|--type TYPE] [-d|--details] [-D|--debug]-                        [(-b|--build BUILD) | (-p|--package PKG) | NVRPATTERN]+                        [(-b|--build NVR/BUILDID) | (-p|--pattern NVRPAT) |+                          PACKAGE]   Query Koji builds (by default lists most recent builds)  Available options:@@ -77,21 +80,21 @@   -t,--type TYPE           Select builds by type: all,image,maven,module,rpm,win   -d,--details             Show more details of builds   -D,--debug               Pretty-print raw XML result-  -b,--build BUILD         Show build details-  -p,--package PKG         Builds of package+  -b,--build NVR/BUILDID   Show build+  -p,--pattern NVRPAT      Builds matching glob pattern   -h,--help                Show this help text ```  Examples:  ```shellsession-$ koji-tool builds --from "last week" -s fail+$ koji-tool builds -M -s fail ```-lists your builds that failed in the last week.+lists your recent builds that failed. -List builds of a package:+List latest build of a package: ```shellsession-$ koji-tool builds redhat-rpm-config*.fc37 --latest+$ koji-tool builds --pattern redhat-rpm-config*.fc37 --latest  redhat-rpm-config-214-1.fc37 BuildComplete https://koji.fedoraproject.org/koji/buildinfo?buildID=1915968@@ -110,6 +113,8 @@ and it uses `date` to parse a specified date string and can filter task results by package or nvr prefix. +Note results are ordered by task id (not time) for speed.+ ### Usage  By default it lists 10 most recent Fedora Koji buildArch tasks.@@ -124,7 +129,7 @@                        [(-P|--only-package PKG) | (-N|--only-nvr PREFIX)]                        [-T|--tail]                        [(-t|--task TASKID) | (-c|--children TASKID) |-                         (-b|--build BUILD) | (-p|--package PKG) | NVRPATTERN]+                         (-b|--build BUILD) | (-p|--pattern NVRPAT) | PACKAGE]   Query Koji tasks (by default lists most recent buildArch tasks)  Available options:@@ -149,32 +154,33 @@   -t,--task TASKID         Show task   -c,--children TASKID     List child tasks of parent   -b,--build BUILD         List child tasks of build-  -p,--package PKG         Build tasks of package+  -p,--pattern NVRPAT      Build tasks of matching pattern   -h,--help                Show this help text ```  Examples:  ```shellsession-$ koji-tool tasks -a aarch64 --from "last week" -s fail+$ koji-tool tasks -M -a aarch64 -s fail ```-lists your arm64 tasks that failed in the last week.+lists your recent arm64 tasks that failed.  Show latest newRepo task: ```shellsession $ koji-tool tasks --method newrepo --latest -module-perl-IO-Socket-SSL-2 newRepo TaskOpen-https://koji.fedoraproject.org/koji/taskinfo?taskID=83561635-Start: Thu Mar  3 00:57:43 +08 2022-current duration: 0h 0m 16s+f37-build-side-52128 newRepo TaskClosed+https://koji.fedoraproject.org/koji/taskinfo?taskID=84527460+Start: Tue Mar 22 08:11:46 +08 2022+End:   Tue Mar 22 08:15:23 +08 2022+duration: 0h 3m 37s ``` -List package build tasks:+List latest package build's tasks: ```shellsession-$ koji-tool tasks --package redhat-rpm-config --latest+$ koji-tool tasks --latest redhat-rpm-config -redhat-rpm-config-214-1.eln114 noarch TaskClosed+redhat-rpm-config-214-1.eln114.noarch TaskClosed https://koji.fedoraproject.org/koji/taskinfo?taskID=82667980 (parent: 82667916) Start: Fri Feb 11 15:08:30 +08 2022 End:   Fri Feb 11 15:10:09 +08 2022@@ -195,14 +201,14 @@  ### Usage -```+```shellsession $ koji-tool install podman ``` will download the latest build for your Fedora version, and try to install it. Use `--disttag` suffix to select a different Fedora version. -```+```shellsession $ koji-tool install TASKID --exclude "*-devel" ``` will install all the non-devel subpackages from the task.@@ -225,7 +231,7 @@ ### Help ```shellsession $ koji-tool install --help-Usage: koji-tool install [-n|--dry-run] [-D|--debug] [-H|--hub HUB]+Usage: koji-tool install [-n|--dry-run] [-D|--debug] [-y|--yes] [-H|--hub HUB]                          [-P|--packages-url URL] [-l|--list] [-L|--latest]                          [(-a|--all) | (-A|--ask) | [-p|--package SUBPKG]                            [-x|--exclude SUBPKG]] [-d|--disttag DISTTAG]@@ -235,6 +241,8 @@ Available options:   -n,--dry-run             Don't actually download anything   -D,--debug               More detailed output+  -y,--yes                 Assume yes to questions (implies --all if not+                           installed)   -H,--hub HUB             KojiHub shortname or url (HUB = fedora, stream,                            rpmfusion, or URL) [default: fedora]   -P,--packages-url URL    KojiFiles packages url [default: Fedora]@@ -278,7 +286,7 @@ Builds for fedora are available in [copr](https://copr.fedorainfracloud.org/coprs/petersen/koji-tool/monitor/detailed).  ## Build-`cabal-rpm builddep && cabal install` or `stack install`.+`cabal-rpm builddep && cabal install || stack install`  ## History The query, install, progress, buildlog-sizes were originally separate programs
+ TODO view
@@ -0,0 +1,52 @@+# general ideas+- use formatting or fmt (instead of format-numbers)++# install+- autodetect nvr+- --nodeps+- --deps+- --srpm+- --exclude vs --except+- tags+- exclude garbage collected builds++# tasks+- determine username for non-Fedora+- build pattern+- different hubs put builds in different locations+- html output+- grep buildlog++# builds+- support latest-build for tag+- --show-tags++# query+- default to the last year? for speed+- --short option+- --active or state filter++# buildlog-sizes/progress+- combine++# progress+- accept task or build url+- cache and compare sizes with previous build(s)++- show the build duration+- support builds as well as tasks+- option to order by log size+- % of previous build (or finished tasks)+- mbs urls?+- average build times? (cache or separate tool?)+- quits during srpm builds+- show log sizes for old finished builds++- display buildtimes for completed tasks++- pick up user's new builds++- screen mode inplace tui++# quickCmd+`quick my last build fail`
koji-tool.cabal view
@@ -1,5 +1,5 @@ name:                koji-tool-version:             0.8+version:             0.8.1 synopsis:            Koji CLI tool for querying tasks and installing builds description:         koji-tool is a CLI interface to Koji with commands to query@@ -17,6 +17,7 @@ build-type:          Simple extra-doc-files:     README.md                      ChangeLog.md+                     TODO cabal-version:       1.18 tested-with:         GHC== 8.4.4                      || == 8.6.5
src/BuildlogSizes.hs view
@@ -30,9 +30,10 @@ import Network.HTTP.Directory  import Data.Text.Format.Numbers- import SimpleCmdArgs +import Common (commonBuildQueryOptions)+ -- FIXME split off arch suffix buildlogSizesCmd :: String -> IO () buildlogSizesCmd nvrpat = do@@ -42,8 +43,7 @@     else do -- find builds     results <- listBuilds fedoraKojiHub                [("pattern", ValueString nvrpat),-                ("queryOpts",ValueStruct [("limit",ValueInt 5),-                                          ("order",ValueString "-build_id")])]+                commonBuildQueryOptions 5]     mapM_ getResult results   where     getResult :: Struct -> IO ()
src/Builds.hs view
@@ -16,9 +16,6 @@ import Data.Char (isDigit, toUpper) import Data.List.Extra import Data.Maybe-#if !MIN_VERSION_base(4,11,0)-import Data.Monoid ((<>))-#endif import Data.RPM.NVR import Data.Time.Clock import Data.Time.Format@@ -70,7 +67,8 @@       case mpkgid of         Nothing -> error' $ "no package id found for " ++ pkg         Just pkgid -> do-          let fullquery = ("packageID", ValueInt pkgid):commonQueryOpts+          let fullquery = [("packageID", ValueInt pkgid),+                          commonBuildQueryOptions limit]           when debug $ print fullquery           builds <- listBuilds server fullquery           when debug $ mapM_ pPrintCompact builds@@ -79,7 +77,7 @@             else mapM_ putStrLn $ mapMaybe (shortBuildResult tz) builds     _ -> do       query <- setupQuery server-      let fullquery = query <> commonQueryOpts+      let fullquery = query ++ [commonBuildQueryOptions limit]       when debug $ print fullquery       builds <- listBuilds server fullquery       when debug $ mapM_ pPrintCompact builds@@ -99,10 +97,6 @@                   Just t -> compactZonedTime tz t                   Nothing -> ""       return $ nvr +-+ show state +-+ date--    commonQueryOpts =-      [("queryOpts", ValueStruct [("limit",ValueInt limit),-                                  ("order",ValueString "-build_id")])]      setupQuery server = do       mdatestring <-
src/Common.hs view
@@ -2,7 +2,9 @@   knownHubs,   hubURL,   readTime',-  compactZonedTime+  compactZonedTime,+  commonQueryOptions,+  commonBuildQueryOptions   ) where @@ -11,7 +13,7 @@ import Data.Time.Clock.System import Data.Time.Format import Data.Time.LocalTime-import Distribution.Koji (fedoraKojiHub)+import Distribution.Koji (fedoraKojiHub, Value(..)) import SimpleCmd (error')  -- mbox kojihub is locked@@ -38,3 +40,12 @@ compactZonedTime :: TimeZone -> UTCTime -> String compactZonedTime tz =   formatTime defaultTimeLocale "%Y-%m-%d %H:%M:%S%Z" . utcToZonedTime tz++commonQueryOptions :: Int -> String -> [(String, Value)]+commonQueryOptions limit order =+  [("limit",ValueInt limit),+   ("order",ValueString order)]++commonBuildQueryOptions :: Int -> (String, Value)+commonBuildQueryOptions limit =+  ("queryOpts", ValueStruct (commonQueryOptions limit "-build_id"))
src/Install.hs view
@@ -6,7 +6,8 @@   Mode(..),   Request(..),   installCmd,-  knownHubs+  knownHubs,+  Yes(..)   ) where @@ -39,6 +40,9 @@       then replace "kojihub" "kojifiles" url +/+ "packages"       else error' $ "use --files-url to specify kojifiles url for " ++ url +data Yes = No | Yes+  deriving Eq+ data Mode = All           | Ask           -- distinguish except and exclude@@ -48,16 +52,15 @@ data Request = ReqName | ReqNV | ReqNVR   deriving Eq - -- FIXME --include devel, --exclude * -- FIXME specify tag or task -- FIXME support enterprise builds -- FIXME --arch (including src) -- FIXME --debuginfo -- FIXME --delete after installing-installCmd :: Bool -> Bool -> Maybe String -> Maybe String -> Bool -> Bool-           -> Mode -> String -> Request -> [String] -> IO ()-installCmd dryrun debug mhuburl mpkgsurl listmode latest mode disttag request pkgbldtsks = do+installCmd :: Bool -> Bool -> Yes -> Maybe String -> Maybe String -> Bool+           -> Bool -> Mode -> String -> Request -> [String] -> IO ()+installCmd dryrun debug yes mhuburl mpkgsurl listmode latest mode disttag request pkgbldtsks = do   let huburl = maybe fedoraKojiHub hubURL mhuburl       pkgsurl = fromMaybe (defaultPkgsURL huburl) mpkgsurl   when debug $ do@@ -70,12 +73,12 @@   mapM (kojiRPMs huburl pkgsurl dlDir) pkgbldtsks     >>= if listmode         then mapM_ putStrLn . mconcat-        else installRPMs dryrun . mconcat+        else installRPMs dryrun yes . mconcat   where     kojiRPMs :: String -> String -> String -> String -> IO [String] -- ([String],String)     kojiRPMs huburl pkgsurl dlDir bldtask =       if all isDigit bldtask-      then kojiTaskRPMs dryrun debug huburl pkgsurl listmode mode dlDir bldtask+      then kojiTaskRPMs dryrun debug yes huburl pkgsurl listmode mode dlDir bldtask       else kojiBuildRPMs huburl pkgsurl dlDir bldtask      kojiBuildRPMs :: String -> String -> String -> String -> IO [String]@@ -94,7 +97,7 @@             putStrLn $ nvr ++ "\n"             allRpms <- map (<.> "rpm") . sort . filter (not . debugPkg) <$> kojiGetBuildRPMs huburl nvr             when debug $ print allRpms-            dlRpms <- decideRpms listmode mode (maybeNVRName nvr) allRpms+            dlRpms <- decideRpms yes listmode mode (maybeNVRName nvr) allRpms             when debug $ print dlRpms             unless (dryrun || null dlRpms) $ do               downloadRpms debug (buildURL (readNVR nvr)) dlRpms@@ -112,9 +115,9 @@           debugPkg :: String -> Bool           debugPkg p = "-debuginfo-" `isInfixOf` p || "-debugsource-" `isInfixOf` p -kojiTaskRPMs :: Bool -> Bool -> String -> String -> Bool -> Mode -> String-             -> String -> IO [String]-kojiTaskRPMs dryrun debug huburl pkgsurl listmode mode dlDir task = do+kojiTaskRPMs :: Bool -> Bool -> Yes -> String -> String -> Bool -> Mode+             -> String -> String -> IO [String]+kojiTaskRPMs dryrun debug yes huburl pkgsurl listmode mode dlDir task = do   let taskid = read task   if listmode     then do@@ -126,13 +129,13 @@           then do           children <- Koji.getTaskChildren huburl taskid False           return $ fromMaybe "" (showTask taskinfo) : mapMaybe showChildTask children-          else getTaskRPMs taskid >>= decideRpms listmode mode Nothing+          else getTaskRPMs taskid >>= decideRpms yes listmode mode Nothing       Nothing -> error' "failed to get taskinfo"     else do     rpms <- getTaskRPMs taskid     if null rpms       then do-      kojiTaskRPMs dryrun debug huburl pkgsurl True mode dlDir task >>= mapM_ putStrLn+      kojiTaskRPMs dryrun debug yes huburl pkgsurl True mode dlDir task >>= mapM_ putStrLn       return []       else do       when debug $ print rpms@@ -141,7 +144,7 @@               [src] -> src               _ -> error' "could not determine nvr from any srpm"           nvr = dropSuffix ".src.rpm" srpm-      dlRpms <- decideRpms listmode mode (maybeNVRName nvr) $ rpms \\ [srpm]+      dlRpms <- decideRpms yes listmode mode (maybeNVRName nvr) $ rpms \\ [srpm]       when debug $ print dlRpms       unless (dryrun || null dlRpms) $ do         downloadRpms debug (taskRPMURL task) dlRpms@@ -163,8 +166,8 @@ maybeNVRName :: String -> Maybe String maybeNVRName = fmap nvrName . maybeNVR -decideRpms :: Bool -> Mode -> Maybe String -> [String] -> IO [String]-decideRpms listmode mode mbase allRpms =+decideRpms :: Yes -> Bool -> Mode -> Maybe String -> [String] -> IO [String]+decideRpms yes listmode mode mbase allRpms =   case mode of     All -> if listmode            then error' "cannot use --list and --all together"@@ -178,8 +181,8 @@       else do       rpms <- filterM (isInstalled . nvraName) $               filter isBinaryRpm allRpms-      if null rpms-        then decideRpms listmode Ask mbase allRpms+      if null rpms && yes /= Yes+        then decideRpms yes listmode Ask mbase allRpms         else return rpms     PkgsReq subpkgs exclpkgs ->       return $ selectRPMs mbase (subpkgs,exclpkgs) allRpms@@ -242,6 +245,7 @@   when debug $ putStrLn pkgpat   let (pkg,full) = packageOfPattern request pkgpat       oldkoji = "rpmfusion" `isInfixOf` hub+  when debug $ print (pkg,full)   when debug $ putStrLn pkg   when (latest && request == ReqNVR) $     error' "cannot use --latest with --nvr"@@ -259,9 +263,8 @@                   else (("pattern", ValueString (if full then pkgpat else dropSuffix "*" pkgpat ++ "*" ++ disttag ++ "*")) :))                  [("packageID", ValueInt pkgid),                   ("state", ValueInt (fromEnum BuildComplete)),-                  ("queryOpts",ValueStruct-                    [("limit",ValueInt $ if listmode && not latest || oldkoji then 20 else 1),-                     ("order",ValueString "-build_id")])]+                  commonBuildQueryOptions+                  (if listmode && not latest || oldkoji then 20 else 1)]       when debug $ print opts       nvrs <- mapMaybe (lookupStruct "nvr") <$> Koji.listBuilds hub opts       if null nvrs@@ -318,19 +321,19 @@   hSetBuffering stdin NoBuffering   hSetBuffering stdout NoBuffering -installRPMs :: Bool -> [FilePath] -> IO ()-installRPMs _ [] = return ()-installRPMs dryrun rpms = do+installRPMs :: Bool -> Yes -> [FilePath] -> IO ()+installRPMs _ _ [] = return ()+installRPMs dryrun yes rpms = do   installed <- filterM (isInstalled . dropExtension) rpms   unless (null installed) $     if dryrun     then mapM_ putStrLn $ "would update:" : installed-    else sudo_ "dnf" ("reinstall" : installed)+    else sudo_ "dnf" $ "reinstall" : installed ++ ["--assumeyes" | yes == Yes]   let rest = rpms \\ installed   unless (null rest) $     if dryrun     then mapM_ putStrLn $ "would install:" : rest-    else sudo_ "dnf" ("localinstall" : rest)+    else sudo_ "dnf" $ "localinstall" : rest ++ ["--assumeyes" | yes == Yes]  downloadRpms :: Bool -> (String -> String) -> [String] -> IO () downloadRpms debug urlOf rpms = do
src/Main.hs view
@@ -38,10 +38,10 @@       <*> (fmap normalizeBuildType <$> optional (strOptionWith 't' "type" "TYPE" ("Select builds by type: " ++ intercalate "," kojiBuildTypes)))       <*> switchWith 'd' "details" "Show more details of builds"       <*> switchWith 'D' "debug" "Pretty-print raw XML result"-      <*> (BuildBuild <$> strOptionWith 'b' "build" "BUILD" "Show build details"-           <|> BuildPackage <$> strOptionWith 'p' "package" "PKG" "Builds of package"-           <|> BuildPattern <$> strArg "NVRPATTERN"-           <|> pure BuildQuery)+      <*> (BuildBuild <$> strOptionWith 'b' "build" "NVR/BUILDID" "Show build" <|>+           BuildPattern <$> strOptionWith 'p' "pattern" "NVRPAT" "Builds matching glob pattern" <|>+           BuildPackage <$> strArg "PACKAGE" <|>+           pure BuildQuery)      , Subcommand "tasks"       "Query Koji tasks (by default lists most recent buildArch tasks)" $@@ -64,8 +64,8 @@       <*> (Task <$> optionWith auto 't' "task" "TASKID" "Show task"            <|> Parent <$> optionWith auto 'c' "children" "TASKID" "List child tasks of parent"            <|> Build <$> strOptionWith 'b' "build" "BUILD" "List child tasks of build"-           <|> Package <$> strOptionWith 'p' "package" "PKG" "Build tasks of package"-           <|> Pattern <$> strArg "NVRPATTERN"+           <|> Pattern <$> strOptionWith 'p' "pattern" "NVRPAT" "Build tasks of matching pattern"+           <|> Package <$> strArg "PACKAGE"            <|> pure TaskQuery)      , Subcommand "install"@@ -73,6 +73,7 @@       installCmd       <$> switchWith 'n' "dry-run" "Don't actually download anything"       <*> switchWith 'D' "debug" "More detailed output"+      <*> flagWith No Yes 'y' "yes" "Assume yes to questions (implies --all if not installed)"       <*> hubOpt       <*> optional (strOptionWith 'P' "packages-url" "URL"                     "KojiFiles packages url [default: Fedora]")@@ -80,8 +81,8 @@       <*> switchWith 'L' "latest" "Latest build"       <*> modeOpt       <*> disttagOpt sysdisttag-      <*> (flagWith' ReqNVR 'R' "nvr" "Give an N-V-R instead of package name"-           <|> flagWith ReqName ReqNV 'V' "nv" "Give an N-V instead of package name")+      <*> (flagWith' ReqNVR 'R' "nvr" "Give an N-V-R instead of package name" <|>+           flagWith ReqName ReqNV 'V' "nv" "Give an N-V instead of package name")       <*> some (strArg "PKG|NVR|TASKID...")      , Subcommand "progress"
src/Tasks.hs view
@@ -92,14 +92,16 @@       case mpkgid of         Nothing -> error' $ "no package id found for " ++ pkg         Just pkgid -> do-          builds <- listBuilds server $-                  ("packageID", ValueInt pkgid):buildQueryOpts+          builds <- listBuilds server+                    [("packageID", ValueInt pkgid),+                     commonBuildQueryOptions limit]           forM_ builds $ \bld -> do             let mtaskid = (fmap TaskId . lookupStruct "task_id") bld             whenJust mtaskid $ \(TaskId taskid) ->               tasksCmd (Just server) museropt 10 states archs mdate mmethod details debug mfilter' tail' (Parent taskid)     Pattern pat -> do-      let buildquery = ("pattern", ValueString pat):buildQueryOpts+      let buildquery = [("pattern", ValueString pat),+                        commonBuildQueryOptions limit]       when debug $ print buildquery       builds <- listBuilds server buildquery       when debug $ print builds@@ -109,17 +111,13 @@           tasksCmd (Just server) museropt 10 states archs mdate mmethod details debug mfilter' tail' (Parent taskid)     _ -> do       query <- setupQuery server-      let queryopts = [("limit",ValueInt limit), ("order", ValueString "-id")]+      let queryopts = commonQueryOptions limit "-id"       when debug $ print $ query ++ queryopts       tasks <- listTasks server query queryopts       when debug $ mapM_ pPrintCompact tasks       let detailed = details || length tasks == 1       (mapM_ (printTask detailed tz) . filterResults . mapMaybe maybeTaskResult) tasks   where-    buildQueryOpts =-      [("queryOpts",ValueStruct [("limit",ValueInt limit),-                                 ("order",ValueString "-build_id")])]-     setupQuery server = do       case taskreq of         Parent parent ->@@ -130,8 +128,7 @@               Nothing -> return Nothing               Just date -> Just <$> cmd "date" ["+%F %T%z", "--date=" ++ dateString date]           when (isNothing mmethod) $-            warning $ "buildArch tasks" ++-            if details || limit == 1 then "" else "\n"+            warning "buildArch tasks"           whenJust mdatestring $ \date ->             warning $ maybe "" show mdate +-+ date           mowner <- maybeGetKojiUser server museropt@@ -216,7 +213,7 @@         then do         putStrLn ""         (mapM_ putStrLn . formatTaskResult mtime tz) task-        buildlogSize tail' (taskId task)+        buildlogSize tail' $ taskId task         else         (putStrLn . compactTaskResult tz) task @@ -228,6 +225,7 @@       pPrint #endif +-- FIXME option to hide url (take terminal width into consideration?) compactTaskResult :: TimeZone -> TaskResult -> String compactTaskResult tz (TaskResult pkg arch method state _mparent taskid mstart mend) =   let time =@@ -235,13 +233,14 @@           Just end -> compactZonedTime tz end           Nothing -> maybe "" (compactZonedTime tz) mstart   in-    showPackage pkg +-+ (if method == "buildArch" then arch else method) +-+-    "(" ++ show taskid ++ ")" +-+ show state +-+ time+    showPackage pkg ++ (if method == "buildArch" then '.' : arch ++ replicate (8 - length arch) ' ' else ' ' : method) +-++    show state +-+ time +-++    "https://koji.fedoraproject.org/koji/taskinfo?taskID=" ++ show taskid  -- FIXME show task owner formatTaskResult :: Maybe UTCTime -> TimeZone -> TaskResult -> [String] formatTaskResult mtime tz (TaskResult pkg arch method state mparent taskid mstart mend) =-  [ showPackage pkg +-+ (if method == "buildArch" then arch else method) +-+ show state+  [ showPackage pkg ++ (if method == "buildArch" then '.' : arch else ' ' : method) +-+ show state   , "https://koji.fedoraproject.org/koji/taskinfo?taskID=" ++ show taskid +-+ maybe "" (\p -> "(parent: " ++ show p ++ ")") mparent] ++   [formatTime defaultTimeLocale "Start: %c" (utcToZonedTime tz start) | Just start <- [mstart]] ++   [formatTime defaultTimeLocale "End:   %c" (utcToZonedTime tz end) | Just end <- [mend]]@@ -314,7 +313,7 @@     putStr $ buildlog ++ " "     msize <- httpFileSize' buildlog     whenJust msize $ \size -> do-      putStr "("+      putChar '('       (T.putStr . kiloBytes) size       putStrLn ")"       -- FIXME check if short build.log ends with srpm
test/tests.hs view
@@ -24,14 +24,14 @@      ,["-l", "-H", "rpmfusion", "ffmpeg"] ++ sysdist])   ,     (["builds"],-     [["-L", "-p", "rust"]+     [["-L", "rust"]      ,["-l", "3"]-     ,["-L", "rpm-ostree*.fc36"]])+     ,["-L", "-p", "rpm-ostree*.fc36"]])   ,     (["tasks"],      [["-L"]      ,["-l", "3"]-     ,["-L", "-p", "rpm-ostree"]])+     ,["-L", "rpm-ostree"]])   ]   where     sysdist = if havedist then [] else ["-d", "fc35"]