Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2026 20:04:21 -0300
From:      Jose Luis Duran <jlduran@freebsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: mtree(1) recent POLA violation
Message-ID:  <CAPwQLcen1C4YH6nBdsip8dzme3bQHVVLJ%2BkgdtJK83ffRjA0sg@mail.gmail.com>
In-Reply-To: <aV2OtWy0JknNGC1b@cell.glebi.us>

index | next in thread | previous in thread | raw e-mail

On Tue, Jan 6, 2026 at 7:37 PM Gleb Smirnoff <glebius@freebsd.org> wrote:
>
>   Hi,
>
> the recent mtree(1) import from NetBSD brought one change, that is a POLA
> violation and I would also question if the new behavior is desired.

The change stems from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219467

> Before the import 'mtree -c -R all' would leave 'type=' keywords, despite '-R
> all' asks for removing all keywords.  The 'type=' is special, since this
> keyword is required to reconstruct a new spec.
>
> In other words before the import this was working:
>
> mtree -c -R all | mtree -C
>
> Now this is broken.  The above was standard idiom to compare installed to tree
> to a specification.  Now the correct syntax to get the same behavior is this:
>
> mtree -c -k type | mtree -C
>
> I'll let other to decide do we want to fix this POLA violation or not. At least
> this needs to be recorded in Release notes.

Right, according to the manual page:

-k <keywords>: Use the "type" keyword plus the specified (whitespace
or comma separated) keywords instead of the current set of keywords.
If "all" is specified, use all of the other keywords.  If the "type"
keyword is not desired, suppress it with "-R type".
-R <keywords>: Remove the specified (whitespace or comma separated)
keywords from the current set of keywords.  If "all" is specified,
remove all of the other keywords.

So, the previous behavior was bugged. It now does what it says it should.

-- 
Jose Luis Duran


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPwQLcen1C4YH6nBdsip8dzme3bQHVVLJ%2BkgdtJK83ffRjA0sg>