Official NuTyX forums

Documentation => Tips and Tricks => Topic started by: bci_ on Thu May 07 23:52:42 2020

Title: NuTyX equivalent of 'apt-file search <a file>'
Post by: bci_ on Thu May 07 23:52:42 2020
I've been looking through the man page for cards, and found the command 'cards query <a file>', which lets me
see in which of my installed packages appears a given file; for example,

Code: [Select]
$ cards query strftime
Retrieve info about the 481 packages: 100 %
Package  File
bash     usr/lib/bash/strftime
python   usr/lib/python3.8/test/__pycache__/test_strftime.cpython-38.opt-1.pyc
python   usr/lib/python3.8/test/__pycache__/test_strftime.cpython-38.opt-2.pyc
python   usr/lib/python3.8/test/__pycache__/test_strftime.cpython-38.pyc
python   usr/lib/python3.8/test/
python2  usr/lib/python2.7/test/
python2  usr/lib/python2.7/test/test_strftime.pyc
python2  usr/lib/python2.7/test/test_strftime.pyo

Not bad; but I'd like to be able to do this with packages that live in the NuTyX package database, as I would in Debian with the 'apt-file' program. (For example, I may be trying to install something, and the installation process complains there's a certain C header missing; I'd then run apt-file on that C header, and then in turn install the corresponding package.) Though, my current case is a bit more mundane than that; I just notice that I'm missing some man pages:

Code: [Select]
$ man 3 printf
No manual entry for printf in section 3
$ man 3 strftime
No manual entry for strftime in section 3

Usually, if I know which package I'm dealing with, I can just do

Code: [Select]
get <package>.man

and I'm done; but this time I don't know what the package is!
Title: Re: NuTyX equivalent of 'apt-file search <a file>'
Post by: Thierry on Fri May 08 07:45:37 2020
Hello bc1_

That's a very intersting post.

short answer:

Not possible

Long answer

Not implemented on purpose:

1. cards sync would take longer
2. Redundant info in a meta file and in the archive itself, that exactly what I want to avoid as much as possible with cards. For this reason dependencies are only in the archive (as an example), cards deal with that.
3. It was not clear for me, do we really need that feature.

And now.

If this feature, you think is a must, I would need to really think how to implement it in a smart way ;)