Bug 2231262
| Summary: | Wrap license at word boundary | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dennis Brendel <dbrendel> |
| Component: | dnf5 | Assignee: | rpm-software-management |
| Status: | NEW --- | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 38 | CC: | jkolarik, nsella, pkratoch, ppisar, rpm-software-management, zbyszek |
| Target Milestone: | --- | Keywords: | FutureFeature, Triaged |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dennis Brendel
2023-08-11 07:21:30 UTC
In general, word-breaks shouldn't be done. E.g. for the license stuff, half of the license string might also be a valid license, and then the result could be quite confusing. So I think the license should be handles like %description, with the words wrapped whole. Both License and Description are wrapped at character boundary (I hope than not at byte boundary) with dnf5-5.1.1-20230814004427.13.gfe78108c.fc40.x86_64 and libsmartcols-2.39.1-3.fc39.x86_64 according to a size of the terminal: # echo $COLUMNS 85 root@fedora-40:~ # dnf5 --disablerepo=rawhide --enablerepo=f40-build info vim-enhanced Updating and loading repositories: Repositories loaded. Installed packages Name : vim-enhanced Epoch : 2 Version : 9.0.1712 Release : 1.fc40 Architecture : x86_64 Installed size : 4.0 MiB Source : vim-9.0.1712-1.fc40.src.rpm From repository : f40-build Summary : A version of the VIM editor which includes recent enhancements URL : http://www.vim.org/ License : Vim AND LGPL-2.1-or-later AND MIT AND GPL-1.0-only AND (GPL-2.0-onl : y OR Vim) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL- : 2.0-or-later AND GPL-3.0-or-later AND OPUBL-1.0 Description : VIM (VIsual editor iMproved) is an updated and improved version of : the : vi editor. Vi was the first real screen-based editor for UNIX, and : is : still very popular. VIM improves on vi by adding new features: : multiple windows, multi-level undo, block highlighting and more. T : he : vim-enhanced package contains a version of VIM with extra, recently : introduced features like Python and Perl interpreters. : : Install the vim-enhanced package if you'd like to use a version of : the : VIM editor which includes recently added enhancements like : interpreters for the Python and Perl scripting languages. You'll a : lso : need to install the vim-common package. Vendor : Fedora Project Observe T-he and a-lso line ends. The description is pre-wrapped in an RPM package. This (80 columns) is prescribed by Fedora packaging guidelines <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description>. The description is a text block while the license is a one-line string. That's the difference between Description and License. So DNF5 handles both fields consistently. What you observe is how the data are stored in RPM. I agree that rather then breaking words (which is difficult to do correctly without a language-specific dictionary), DNF5 should rather break lines per words. Excessively long words are a problem. I would rather keep them overflowing, but I can image technical limitations in smartcols library forcing to break them in all cases. Thank you for the explanation! Yeah, rpm -qi show the exact same, so that makes sense. I agree on that the word boundary should be were lines break. There could be a workaround that line breaks for licenses happen on the [andANDorOR] boundary, if that's covering all cases. That might even improve readability. But it's still just a cosmetic thing. |