Fix truncated package metadata in additional packages preview (#3580)#4510
Open
Softer wants to merge 1 commit intoarchlinux:masterfrom
Open
Fix truncated package metadata in additional packages preview (#3580)#4510Softer wants to merge 1 commit intoarchlinux:masterfrom
Softer wants to merge 1 commit intoarchlinux:masterfrom
Conversation
Contributor
|
I don't think you need the env var plumbing if you fix parser call sites |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3580.
Summary
pacman -S --infowraps long fields likeDescriptionacross multiple lines when the pty width is small (default 80 cols). archinstall's package info parser pre-stripped each output line before joining continuations, which discarded the leading whitespace it relied on to detect continuation lines, so the wrapped portions were silently dropped.Example before fix, for
sqlite-doc:After fix:
What changed
Pacman.run()gained an optionalenvironment_varsparameter that is forwarded toSysCommand.pacman -S --infocall sites inarchinstall/lib/packages/packages.pynow pass{'COLUMNS': '500'}, forcing pacman to emit single-line field values.AvailablePackage.info()now word-wraps each value to roughly half the terminal width usingtextwrap.fill, so the preview pane does not get a horizontal scrollbar on long fields. The continuation lines are aligned to the value column to match pacman's own visual style.Scope is limited to
-S --infocalls; sync/install paths are unaffected.