vmware / vmware/tdnf

json output on install when an error occurs is not valid

Open
#468 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
130
Forks
55
Avg merge
1d 23h
Merged PRs (30d)
7

Description

Describe the bug

json output on install when an error occurs is not valid.

Reproduction steps
  1. run tdnf install --downloadonly --downloaddir=cherries --installroot=/tmp --releasever=5.0 --nodeps -j -y docker=24.0.5-4.ph5

Note that the directory cherries used as option should not exist for the error to happen.

Output is:

Error processing package: aarch64/docker-24.0.5-4.ph5.aarch64.rpm
{"Install":[{"Name":"docker","Arch":"aarch64","Evr":"24.0.5-4.ph5","InstallSize":0}]}{"Error":1602,"ErrorMessage":"No such file or directory"}
Expected behavior

valid json output.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the tdnf install --downloadonly --downloaddir=cherries --installroot=/tmp --releasever=5.0 --nodeps -j -y docker=24.0.5-4.ph5 command, ensuring cherries does not exist. Trace the install error path that emits JSON and verify that the completed output is one valid JSON document rather than two adjacent objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.