Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbps-install -n prints nothing for installed/download size if 0 #610

Open
classabbyamp opened this issue Dec 9, 2024 · 0 comments · May be fixed by #611
Open

xbps-install -n prints nothing for installed/download size if 0 #610

classabbyamp opened this issue Dec 9, 2024 · 0 comments · May be fixed by #611

Comments

@classabbyamp
Copy link
Member

for a metapackage like removed-packages, installed-size is 0, so xbps-install -n prints nothing for that field:

if (isize)
printf(" %ju", isize);
if (dsize)
printf(" %ju", dsize);

removed-packages-0.1.20241127_1 update aarch64 https://repo-fastly.voidlinux.org/current/aarch64 7973

combined with download-size possibly being 0, this makes parsing the output harder/impossible because there aren't a consistent number of fields per line.

this should probably print 0 or -, but having json output (like xbps-query is getting) would also be nice for simpler parsing by other programs

classabbyamp added a commit to classabbyamp/xbps that referenced this issue Dec 10, 2024
this ensures there will always be 6 fields per line, making it possible
to parse the output consistently. `arch` and `repository` default to `-`.
`installed_size` and `filename-size` default to `0` to allow for easy
tabulation.

Fixes: void-linux#610
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 a pull request may close this issue.

1 participant