Remember to Reply All so that the conversation stays on the list.

On Jun 2, 2021, at 17:19, Michael Newman wrote:
> 
> On Jun 3, 2021, at 03:13, Ryan Schmidt wrote:
>> 
>> On Jun 2, 2021, at 05:21, Michael Newman wrote:
>> 
>>> This happens both on a 2017 iMac running Catalina and a 2010 MBA running 
>>> High Sierra.
>> 
>> As far as I know, High Sierra and earlier are not affected by this problem. 
>> I believe it started happening in Mojave or Catalina and still affects Big 
>> Sur.
> 
> OK. I guess I have a vivid imagination.

Well I'm sure you see the warning message or you wouldn't have written about 
it. :) My point is that the instructions at 
https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt were added a couple 
weeks after the release of macOS Catalina, and to my knowledge the problem they 
help you fix does not occur on previous versions of macOS. If it is related to 
Xcode version, then maybe it also occurs on Mojave with the Catalina-supporting 
Xcode 11. I run High Sierra and haven't seen the problem there.

Code to detect the problem was added to the cltversion portgroup which some 
ports include; it's this portgroup that prints the warning you saw. It's 
possible that the detection code is wrong in some way which might cause you to 
see the warning in situations other than the one for which it was designed.


>> Every time I run "sudo port upgrade outdated" I get the message about the 
>> command line tools:
>>> 
>>> "Warning: cltversion: The Command Line Tools are installed, but MacPorts 
>>> cannot determine the version."
>> 
>> Which ports are outdated? Perhaps a specific port is causing this message to 
>> appear for a different reason than the usual one.
> 
> I don't know. The message appeared multiple times during the "upgrade 
> outdated" process.
> 
>>> I follow the instructions here:
>>> 
>>> https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt
>>> 
>>> This is the iMac:
>>> 
>>> MrMuscle:volumes mnewman$ touch 
>>> /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
>>> MrMuscle:volumes mnewman$ softwareupdate -l
>>> Software Update Tool
>>> Finding available software
>>> Software Update found the following new or updated software:
>>> * Label: Command Line Tools for Xcode-12.4
>>>     Title: Command Line Tools for Xcode, Version: 12.4, Size: 440392K, 
>>> Recommended: YES,
>> 
>> It's not clear from what you've written, but at this point, you would need 
>> to actually install/reinstall the command line tools, for example by using 
>> the System Preferences application to run Software Update. Then continue 
>> with the below.
> 
> Yes. I always use Software Update to reinstall the CLT. I should have 
> mentioned that in my message.
> 
>>> MrMuscle:volumes mnewman$ rm 
>>> /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
>>> MrMuscle:volumes mnewman$ softwareupdate -l
>>> Software Update Tool
>>> Finding available software
>>> No new software available.
>>> MrMuscle:volumes mnewman$ pkgutil 
>>> --pkg-info=com.apple.pkg.CLTools_Executables
>>> package-id: com.apple.pkg.CLTools_Executables
>>> version: 12.4.0.0.1.1610135815
>>> volume: /
>>> location: /
>>> install-time: 1622628917
>>> groups: com.apple.FindSystemFiles.pkg-group
>> 
>> The fact that pkgutil finds the package suggests that everything is now as 
>> it should be.
>> 
>>> But it doesn't seem to "stick" and the next time it shows up again.
>>> 
>>> What am I doing wrong?
>> 
>> It's not clear what you mean by "next time",
> 
> By "next time" I mean the next time I run "upgrade outdated". I do this about 
> once a month. Having to reinstall the CLT used to be a rare occurrence. Now 
> it seems to happen every month when I upgrade the outdated ports.

Next time you're going to upgrade outdated ports, save off a list of outdated 
ports first, for example with:

port outdated | tee ~/Desktop/outdated-ports.txt

Also check if you have a CLT receipt by using the pkgutil command shown at:

https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt

If you don't have the receipt, then I guess High Sierra is also affected by the 
problem and you should reinstall the CLT. If you do have the receipt, then 
begin upgrading outdated ports, and if you still get the warning about not 
having the receipt, let us know and include the list of ports that had been 
outdated and the name of the port shown in the other output above or below 
where the warning is printed.


Reply via email to