#56318 closed enhancement (fixed)
Base should know the installed version of the command line tools
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.8.0 |
Component: | base | Version: | |
Keywords: | Cc: | Dave-Allured (Dave Allured) | |
Port: |
Description
Just as MacPorts already knows the version of Xcode (in the xcodeversion
variable), it should know the version of the command line tools. This could then be printed in the log and verified by the configure script as the Xcode version already is.
Per this post, this information can be obtained on Mavericks or later using:
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
e.g.:
$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 9.2.0.0.1.1510905681 volume: / location: / install-time: 1514035707 groups: com.apple.FindSystemFiles.pkg-group
On Lion and Mountain Lion, it's:
pkgutil --pkg-info=com.apple.pkg.DeveloperToolsCLI
e.g.:
$ pkgutil --pkg-info=com.apple.pkg.DeveloperToolsCLI package-id: com.apple.pkg.DeveloperToolsCLI version: 5.1.0.0.1.1396320587 volume: / location: / install-time: 1467560350
On Leopard and Snow Leopard, it appears to be:
pkgutil --pkg-info=com.apple.pkg.DeveloperToolsCLILeo
e.g.:
$ pkgutil --pkg-info=com.apple.pkg.DeveloperToolsCLILeo package-id: com.apple.pkg.DeveloperToolsCLILeo version: 1.0.0.9000000000.1.1248867338 volume: / location: / install-time: 1470134505
I haven't checked Tiger.
Change History (8)
comment:1 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | MarcusCalhoun-Lopez added |
---|
comment:2 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | MarcusCalhoun-Lopez removed |
---|---|
Owner: | set to MarcusCalhoun-Lopez |
Status: | new → accepted |
comment:3 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
comment:4 Changed 4 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:5 Changed 3 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy removed |
---|
comment:6 Changed 3 years ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:7 Changed 2 years ago by jmroot (Joshua Root)
Milestone: | → MacPorts Future |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
comment:8 Changed 2 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.8.0 |
---|
Note: See
TracTickets for help on using
tickets.
There is a pull request that creates a port group (cltversion-1.0.tcl) that does what you suggest.
If it works, we can work toward moving it into base.
Based on the discussion in the pull request, it seems to be fairly easy for the command line tools to be installed but for
pkgutil
to fail.My best guess is that upgrading Xcode messes with the receipts.
I have added a section in the wiki with a description of the problem.