Reclaim was not 'safe'
Bill Cole
macportsusers-20171215 at billmail.scconsult.com
Mon May 10 16:34:53 UTC 2021
On 2021-05-10 at 11:43:56 UTC-0400 (Mon, 10 May 2021 17:43:56 +0200)
Bjarne D Mathiesen <macintosh at mathiesen.info>
is rumored to have said:
> Daniel J. Luke wrote:
>> On May 9, 2021, at 12:20 PM, Gerben Wierda via macports-users
>> <macports-users at lists.macports.org> wrote:
>>> Anyway, the hard lesson was: reclaim is not ’safe’. I thought,
>>> reclaim would only remove inactive installs, but it removed active
>>> ones as well.
>>>
>>> It is not possible for me to retrace what went wrong exactly, sadly.
>>
>> The first thing reclaim does is this:
>>
>> ---> Checking for unnecessary unrequested ports
>> Unrequested ports without requested dependents found:
>>
>> If you (like me) have an MacPorts install that pre-dates the
>> requested flag, you'll have a bunch of ports in that list that you
>> don't actually want uninstalled. For reclaim to work best, you need
>> to do `port setrequested` on the ports you want to always keep - then
>> the list of ports you see there will be stuff that got installed that
>> you no longer need. (You can also mark things 'unrequested', see the
>> port manpage - so you can fix things up if you mistakenly mark
>> something requested that you don't want).
>>
>> Or, you can just hit 'n' for the first prompt.
>>
>
> so, doing something like this :
>
> port -q installed \
Better:
port -q installed active \
Since the 'installed' pseudo-port includes deactivated ports, which are
left by default after upgrades.
> | awk '{print $1}' \
> | xargs -n1 port setrequested
>
> before the first use of 'port reclaim' would be advisable
>
> I (luckily) didn't get burned, but I deemed 'port reclaim' to be
> unsafe
> in automatic update scripts. In my case eg git was set up for reclaim.
>
> --
> Bjarne D Mathiesen
> Korsør ; Danmark ; Europa
> -----------------------------------------------------------------------
> denne besked er skrevet i et totalt M$-frit miljø
> OpenCore + macOS 10.15.7 Catalina
> MacPro 2010 ; 2 x 3,46 GHz 6-Core Intel Xeon ; 256 GB 1333 MHz DDR3
> ECC
> ATI Radeon RX 590 8 GB
--
Bill Cole
bill at scconsult.com or billcole at apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
More information about the macports-users
mailing list