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

src/xbps/index.md: Mention xpkg to list installed packages #640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camoz
Copy link
Contributor

@camoz camoz commented Dec 27, 2021

Reasons for mentioning this:

  • using xpkg is much simpler: one command without arguments vs. 3 commands piped together
  • xpkg is much faster: 0.13 s versus 3.28 s (on a C2D laptop with SSD from 2011)

Reasons for mentioning this:

- using `xpkg` is much simpler: one command without arguments vs. 3 commands piped together
- xpkg is much faster: 0.13 s versus 3.28 s (on a C2D laptop with SSD from 2011)
@camoz
Copy link
Contributor Author

camoz commented Dec 27, 2021

I forgot to mention, I have 255 packages installed on this test system, and it's in a VM.

[root@void ~]# time xpkg > /dev/null

real	0m0.130s
user	0m0.080s
sys	0m0.046s
[root@void ~]# time xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname > /dev/null

real	0m3.280s
user	0m1.637s
sys	0m1.583s

@camoz
Copy link
Contributor Author

camoz commented Dec 27, 2021

Hm, maybe it would be better to mention xpkg for a package list w/o version, and plain xbps-query -l for a package list with version.

@abenson
Copy link
Contributor

abenson commented Dec 27, 2021

xpkg isn't part of the base system and is provided by a separate set of tools.

@camoz
Copy link
Contributor Author

camoz commented Dec 27, 2021

Yes, but there are many places in the docs that refer to using a tool from xtools. Even on the same page it's mentioned already two times.

FWIW I'm in favor of my second idea:

Hm, maybe it would be better to mention xpkg for a package list w/o version, and plain xbps-query -l for a package list with version.

@bobertlo
Copy link
Contributor

xpkg isn't part of the base system and is provided by a separate set of tools.

I agree with this partly, but I think that it might be worth offering a simple command from xtools as an alternative to a long shell command people are going to just copy and paste.

@camoz
Copy link
Contributor Author

camoz commented Dec 27, 2021

I think ideally xbps would support printing the package names natively, like pacman (and probably many other package managers):

# pacman -Q
a52dec 0.7.4-11
abcde 2.9.3-5
...
# pacman -Qq
a52dec
abcde
...

Even the first version would be enough, one could a do more simple | cut -d' ' -f1 then.

@paper42
Copy link
Member

paper42 commented Mar 1, 2022

I would be in favor of mentioning this, but I think we should reverse the order - first the long command using only packages from base, then a shorter alternative - the xpkg script from xtools.

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.

4 participants