FS#14833 - The "-T" option is undocumented.

Attached to Project: Pacman
Opened by Xyne (Xyne) - Tuesday, 26 May 2009, 03:35 GMT
Last edited by Dan McGee (toofishes) - Saturday, 06 June 2009, 16:10 GMT
Task Type Bug Report
Category Documentation
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.2.2
Due in Version 3.3.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

makepkg uses pacman's "hidden" "-T" option to test if a dependency is installed.

Line 331 in check_deps(): pmout=$(pacman $PACMAN_OPTS -T "$@")

This should be included in the pacman man page and the help message.
This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 06 June 2009, 16:10 GMT
Reason for closing:  Fixed
Additional comments about closing:  Commit 9af9c0
Comment by Xavier (shining) - Tuesday, 26 May 2009, 06:19 GMT
I guess it's hidden because it's not intended to be used by the end user.
Comment by Allan McRae (Allan) - Tuesday, 26 May 2009, 07:04 GMT
Maybe we could put it somewhere near the bottom of the man page but not in the --help message as this could potentially be useful for script writers.
Comment by Nagy Gabor (combo) - Thursday, 04 June 2009, 10:20 GMT
I agree with Allan here.
Comment by Xavier (shining) - Thursday, 04 June 2009, 15:22 GMT
Fine with me, patch welcome :)
Comment by Nagy Gabor (combo) - Thursday, 04 June 2009, 20:14 GMT
I hope that native English guys will do that. ;-) [Or at least write a decent description here ;-]
Comment by Xyne (Xyne) - Thursday, 04 June 2009, 23:49 GMT
Does the "-T" operation accept any other options?
Comment by Nagy Gabor (combo) - Thursday, 04 June 2009, 23:53 GMT
Xyne: no.
Comment by Xyne (Xyne) - Friday, 05 June 2009, 07:02 GMT
Following the format of pacman.8.txt:

*-T*::
This operation will check each package specified and return a list of
those packages which are not currently installed. This is mostly useful
in scripts when resolving dependencies. This operation accepts no other
options.
Comment by Xyne (Xyne) - Friday, 05 June 2009, 07:03 GMT
Just add the proper indentation (which got lost when I posted).
Comment by Nagy Gabor (combo) - Friday, 05 June 2009, 12:37 GMT
Thx. Based on your proposal, I suggest the following:

*-T, \--deptest*::
Check dependencies. This operation will check each dependency specified
and return a list of those which are not currently satisfied on the
system. This is mostly useful in scripts, for example, makepkg uses this
to check dependencies. This operation accepts no other options. Example
usage: `pacman -T qt "bash>=3.2"`.

Is this OK?
Comment by Xavier (shining) - Friday, 05 June 2009, 12:43 GMT
That last version looks perfect to me, thank you both :)
Comment by Xyne (Xyne) - Friday, 05 June 2009, 19:04 GMT
I think "each dependency specified" is misleading as you actually specify packages and thus I find "satisfied" to be misleading as well. I would change it to this:
*-T, \--deptest*::
Check dependencies. This operation will check each package specified
and return a list of those which are not currently installed on the
system. This is mostly useful in scripts. For example, makepkg uses this
to check dependencies. This operation accepts no other options. Example
usage: `pacman -T qt "bash>=3.2"`.

I've split the "This is mostly useful..." sentence in two as the single sentence was grammatically incorrect. You could also say "This is mostly useful in scripts such as makepkg which uses it to check dependencies."
Comment by Nagy Gabor (combo) - Friday, 05 June 2009, 19:35 GMT
"I think "each dependency specified" is misleading as you actually specify packages and thus I find "satisfied" to be misleading as well."

No. "pacman -T" interprets targets as dependencies. And we have virtual dependencies (provisions), like sh, that are not packages ("pacman -T sh" works as expected).


Loading...