Author Topic: NuTyX equivalent of 'apt-file search <a file>'  (Read 362 times)

bci_

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
NuTyX equivalent of 'apt-file search <a file>'
« 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/test_strftime.py
python2  usr/lib/python2.7/test/test_strftime.py
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!
« Last Edit: Fri May 08 08:23:53 2020 by Thierry »

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 598
  • Karma: +10/-0
  • Gender: Male
    • NuTyX distribution
Re: NuTyX equivalent of 'apt-file search <a file>'
« Reply #1 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 ;)

Thierry
« Last Edit: Fri May 08 08:23:47 2020 by Thierry »