Can not remove the new MacPorts Mojave package

Dr M J Carter Martin.Carter at physics.ox.ac.uk
Fri Nov 9 16:36:04 UTC 2018


On Fri, Nov 09, 2018 at 04:05:34PM +0100, Vincent Habchi wrote:
> On 9 Nov 2018, at 11:31, Dr M J Carter <Martin.Carter at physics.ox.ac.uk> wrote:
> > 
> > On Wed, Oct 03, 2018 at 01:25:28PM +0100, Chris Jones wrote:
> >> On 03/10/18 13:16, S. L. Garwood via macports-users wrote:
> >>> I installed the new Macports bundle mentioned in Josha Root’s email.
> >>> Install went fine, but now it will not uninstall — doing the “rm”
> >>> commands in /opt/local gets a series of errors
> >>> 
> >>> rm: /opt/local/var/macports/home/Library/Preferences: Operation not
> >>> permitted
> >>> rm: /opt/local/var/macports/home/Library: Operation not permitted
> >>> rm: /opt/local/var/macports/home: Operation not permitted
> >>> rm: /opt/local/var/macports: Directory not empty
> >>> rm: /opt/local/var: Directory not empty
> >>> rm: /opt/local: Directory not empty
> 

> Did you check the script was executed with root privilege?

Info from current tests (not yet completed): "whoami" just before the
removal yields "root" under all conditions.

> Also what
> files are left in /opt/local/var/macports/home/Library/Preferences?

Completely empty; no fancy permissions either afaict.  But by the time
I get to check them, the rm would succeed, so that probably doesn't
tell us much.

> Any hard link to any other file that could be protected by a sandbox
> mechanism?

No hard links that I spotted (but would that not fail under 10.13? the
same code runs fine).  The only differences between what fails and
what works are 10.14 vs 10.13 and older, and [sound effect: penny
dropping] APFS vs HFS+ journaled.  If there's some protection going
on, it seems to be of macports's home dir, as the errors change to
"directory not empty" for that dir's parent.

Hope this helps.  More information next week, once the build system
has tried to do a build unattended twice in succession, this time with
exponential backoff between removal attempts.  Suggestions for extra
checks to add into the runtime scripting welcomed .... as you might
gather, this one really has got under my fingernails.  Apologies for
any fallout.

-- 
Dr Martin J Carter
Computer System Administrator
Astrophysics, University of Oxford


More information about the macports-users mailing list