Skip to content

Query bug#590

Merged
DevonianTeuchter merged 2 commits intomainfrom
query-bug
Nov 22, 2023
Merged

Query bug#590
DevonianTeuchter merged 2 commits intomainfrom
query-bug

Conversation

@DevonianTeuchter
Copy link
Copy Markdown
Collaborator

@DevonianTeuchter DevonianTeuchter commented Nov 21, 2023

Fix bug with querying for installed packages from within zopen install/upgrade. zopen-install calls zopen-query directly rather than using the list verb for zopen; the parameters are different for when a "list" action is required - zopen uses the "list" verb, zopen-query uses the "--list" parameter. zopen-install incorrectly specifies "list" rather than "--list" and as such, the list of returned packages can become corrupted. For small setups, this might not be noticeable as the returned list is sanitised, however with a sufficiently long list (like if a "--all" had been used previously), the list of packages will become corrupt and break the upgrade mechanism as well as taking a longer period of time than it should. Full installations might not be upgradeable using the "zopen upgrade" command, packages might need to be manually listed.
The find used to determine the installed packages also recurses too deeply, returning huge volumes of data - again, this gets sanitised for processing but takes a long period of time and can cause issues with envvar lengths etc. The zosfind should only now pick up in the current directory after switching to PKGINSTALL
In addition, colorization of columns in detailed mode and column headers have been updated and various shellcheck issues resolved.

Comment thread bin/zopen-query
colored="${GREEN}"
elif [ ${percentage} -gt 50 ]; then
colored="${BLUE}"
colored="${BOLD}${BLUE}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the blue more recognizable when bold?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my eyes, yes - it's brighter

Copy link
Copy Markdown
Member

@IgorTodorovskiIBM IgorTodorovskiIBM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DevonianTeuchter DevonianTeuchter merged commit 9e0739e into main Nov 22, 2023
@DevonianTeuchter DevonianTeuchter deleted the query-bug branch November 22, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants