diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py
index a44dcaa0..dece662c 100644
--- a/cli/koji_cli/commands.py
+++ b/cli/koji_cli/commands.py
@@ -4845,14 +4845,21 @@ def _printTaskInfo(session, task_id, topdir, level=0, recurse=True, verbose=True
for root in buildroot_infos:
print("%s %s/%s-%d-%d/" %
(indent, BUILDDIR, root['tag_name'], root['id'], root['repo_id']))
+ print("%sLog Files:" % indent)
if logs:
- print("%sLog Files:" % indent)
for log_path in logs:
print("%s %s" % (indent, log_path))
+ else:
+ print("%s No outputs reported [1]" % indent)
+ print("%sOutput:" % indent)
if output:
- print("%sOutput:" % indent)
for file_path in output:
print("%s %s" % (indent, file_path))
+ else:
+ print("%s No outputs reported [1]" % indent)
+ if not logs or not output:
+ print("%s[1] Not all tasks produce outputs, and task outputs are not retained "
+ "indefinitely." % indent)
# white space
print('')
diff --git a/tests/test_cli/test_taskinfo.py b/tests/test_cli/test_taskinfo.py
index 3e72928f..9796bd8f 100644
--- a/tests/test_cli/test_taskinfo.py
+++ b/tests/test_cli/test_taskinfo.py
@@ -407,6 +407,11 @@ State: closed
Created: Thu Jan 1 00:16:40 1970
Started: Thu Jan 1 00:33:20 1970
Finished: Thu Jan 1 00:50:00 1970
+Log Files:
+ No outputs reported [1]
+Output:
+ No outputs reported [1]
+[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
Task: 2
Type: createrepo
@@ -421,6 +426,9 @@ Finished: Thu Jan 1 00:50:00 1970
Log Files:
%s
%s
+ Output:
+ No outputs reported [1]
+ [1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
""" % tuple('/mnt/koji/work/tasks/2/2/' + k for k in task_output.keys())
@@ -520,6 +528,11 @@ Started: Thu Jan 1 00:33:20 1970
Finished: Thu Jan 1 00:50:00 1970
Host: kojibuilder
Build: bash-4.4.12-5.fc26 (1)
+Log Files:
+ No outputs reported [1]
+Output:
+ No outputs reported [1]
+[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
Task: 2
Type: buildArch
@@ -562,6 +575,11 @@ Build: bash-4.4.12-5.fc26 (1)
Started: Thu Jan 1 00:33:20 1970
Finished: Thu Jan 1 00:50:00 1970
Host: kojibuilder
+ Log Files:
+ No outputs reported [1]
+ Output:
+ No outputs reported [1]
+ [1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
"""
with mock.patch('sys.stdout', new_callable=six.StringIO) as stdout:
diff --git a/www/kojiweb/taskinfo.chtml b/www/kojiweb/taskinfo.chtml
index cc04330c..de0b04c2 100644
--- a/www/kojiweb/taskinfo.chtml
+++ b/www/kojiweb/taskinfo.chtml
@@ -269,6 +269,9 @@ $value
#end if
#end for
+ #if not $output
+