`xbps-query`: Unify default output formats of package lists
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start with the xbps-query modes described in the issue and the xbps-query(1) documentation, comparing the output behavior of -l, -s, -m, -O, -X, and -x. Review the related issues and pull request before defining the scope. Done should mean the package-listing modes have predictable default and secondary output formats, with the chosen flags documented.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Right now, xbps-query has different default output formats (or even only one output format) for some commands.
Multiple columns:
[root@rootfs /]# xbps-query -l
ii acl-2.3.1_1 Access Control List filesystem support
ii acpid-2.0.33_2 ACPI Daemon (acpid) With Netlink Support
...
[root@rootfs /]# xbps-query -s ab
[*] bash-completion-2.11_2 Programmable completion for the GNU Bash shell
[*] bzip2-1.0.8_1 Freely available, patent free, high-quality data compressor
...
Single column:
[root@rootfs /]# xbps-query -m # same for -O and -X
acpid-2.0.33_2
base-voidstrap-0.11_1
...
[root@rootfs /]# xbps-query -x sway
swaybg>=0
xorg-server-xwayland>=0
...
I think it would be nice if the first two examples (-l and -s) had the same output format. Maybe we can introduce a new "package state descriptor" like nn or -- for "currently not installed" packages? Right now we have, according to xbps-query(1):
ii Package is installed.
uu Package is unpacked but must be configured with xbps-reconfigure(1).
hr Package is half-removed, and can be fully removed with xbps-remove(1).
?? Package state is unknown.
Overall, I think it would be useful to have two different easily reachable output formats (by easily reachable I mean e.g. a simple flag, not a complete --format=... specifier). Often, e.g. when searching packages via -s, additional information like the short description and package version is useful. But often it is also useful to just have a list of package names (without any version string etc.) for batch processing, e.g. saving a list of all manually installed packages to be later fed into xbps-install on another system. I think these are two common scenarios, and having only two default output formats for the various package listing options of xbps-query will make it easier (because more predictable) to use. The flags could be named -v|--verbose (already exists, but maybe it could be used for this) and -q|--quiet. Some modes, like -s, are verbose by default and can be made shorter using -q. And some modes, like -m, are short by default and can be made more verbose using -v.
There was also the (IMO great) idea of adding a --format=... option, however I'm talking about the default output format and perhaps an easily reachable secondary one, for the most common cases.
Related issues/PRs:
- Vorherrschende Sprache
- C
- Sterne
- 1.2k
- Forks
- 152
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus void-linux/xbps
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
void-linux/xbps#475 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
void-linux/xbps#701 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
void-linux/xbps#700 ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
void-linux/xbps#696 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
void-linux/xbps#695 · 7 Kommentare ·
Alle Issues in void-linux/xbps
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
sandialabs/seacas#945 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ARM-software/sysarch-acs#556 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
netdata/netdata#24062 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag