WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to find which extension provides a file  (Read 1323 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11617
Re: How to find which extension provides a file
« Reply #45 on: November 20, 2024, 01:39:43 AM »
Hi CNK
... Maybe only output the help info when called with no arguments if "[ -t 1 ]" is true, ...
Done.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1508
Re: How to find which extension provides a file
« Reply #46 on: November 20, 2024, 11:50:39 AM »
Hi Rich. FWIW I like the idea of automatically updating provides.db and would be happy with whatever maximum age is default.

Splitting the update into its own command or special flag (à la apt-file) would mean that using provides.sh would be a 2-step process for every user, every time (first checking age +/- updating the db, then searching the db). No autoupdate would also be a gotcha for less experienced users.

P.S. Folks that want maximum speed or more granular control can use the environmental variable you proposed to stop db updates (and/or you could add a "no db update" flag).
« Last Edit: November 20, 2024, 12:09:34 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1508
Re: How to find which extension provides a file
« Reply #47 on: November 20, 2024, 02:19:04 PM »
Hi Rich. Can you please post/attach your current provides.sh? I'd love to start using it right away. Thanks :)
I hope it becomes part of the base system for TCL16.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11617
Re: How to find which extension provides a file
« Reply #48 on: November 20, 2024, 02:54:48 PM »
Hi GNUser
... No autoupdate would also be a gotcha for less experienced users. ...
There will be an auto update (zsync) by default for that very reason. I think
15 minutes is long enough for most users to not get in the way when doing
multiple searches.

Also, unless you're the unluckiest person in the world, and the item you are
searching for gets added to provides.db in between auto updates, is short
enough not to cause problems.

Quote
... P.S. Folks that want maximum speed or more granular control can use the environmental variable you proposed to stop db updates (and/or you could add a "no db update" flag).
That's already in place. Including  -nz  (no zsync) in the command tells
provides.sh not to call  UpdateProvidesDB().

Latest version attached. Give it a shake and let me know if any bugs fall out. ;D
I'll start looking into adding an environmental variable for advanced users.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1508
Re: How to find which extension provides a file
« Reply #49 on: November 20, 2024, 03:47:36 PM »
Thanks, Rich. I'll give it a good shake  :)