portmaster and port "flavors?"

Hi,

I use portmaster to maintain my ports and I'm curious how best to interact with "flavors" of ports.

As an example, I've had the mtr traceroute utility from net/mtr installed for years. Yesterday when I went to update it, it attempted to install a bunch of X11 dependencies, despite my having OPTIONS_UNSET += X11 in my /etc/make.conf file. I discovered on freshports that mtr has been split into two flavors, @x11 and @nox11 (and for some reason the flavor with x11 is now the default‽). From there I was able to figure out I needed to uninstall the existing mtr package and then run portmaster net/mtr@nox11 to get the correct flavor.

But I'm curious if there's a better way to know when a port has different flavors and what the options are. For a couple of decades I'm used to this kind of thing being handled by make config in a port's directory; I guess the paradigm has shifted and I need to adapt!

Thanks!
 
But I'm curious if there's a better way to know when a port has different flavors and what the options are.
ports-mgmt/portmaster has for the "-L" option (list all installed ports by category, and search for updates) following in the EXAMPLES section of portmaster(8):
Rich (BB code):
     Print only the ports that have available updates.  This can be used as an
     alias in your shell.  Be sure to fix the line wrapping appropriately.
           portmaster -L |
           egrep -B1 '(ew|ort) version|Aborting|installed|dependencies|
           IGNORE|marked|Reason:|MOVED|deleted|exist|update' | grep -v '^--'

egrep ...|MOVED|... suggests portmaster is scanning /usr/ports/MOVED:
Code:
3430 net/mtr-nox11|net/mtr@nox11|2024-08-15|Remove obsoleted port. Use net/mtr@nox11 instead
 
To know if port has flavors:
Code:
make -C /usr/ports/category/port -V FLAVORS
example for devel/git
Code:
# make -C /usr/ports/devel/git -V FLAVORS
default lite tiny

make a script or an alias for this command so you can for example hasflavors devel/git
 
But I'm curious if there's a better way to know when a port has different flavors and what the options are.
I may have misunderstood the question, hence my reply in post # 3.

If the case is not for installed ports but to search for all ports in the tree for flavors, a basic flavor search could be:
Code:
% find  /usr/ports  -name  Makefile  -exec  grep  FLAVORS=  {} +  | sort | less

But this doesn't catch ports with complex flavors usage, see FreeBSD Porter's Handbook, Chapter 7. Flavors.

Perhaps a script which executes make -V FLAVORS in every ports directory and prints the result, including the ports directory, assuming one knows how to apply such logic (not me).
 
I'm working to a command to manage ports but it's far to be used. When I search for ports I can choose what info to display and can display flavors.
Code:
paolo at elopao-vm
~> ports-admin search -m -o pon,pos,poc,pof 'git*'
devel
    git stale noauto unlocked
        Distributed source code management tool
        default stale noauto unlocked
            Distributed source code management tool 
        lite
            Distributed source code management tool (lite flavor)
        tiny
            Distributed source code management tool (tiny flavor)
    git-absorb
        Git command for automating fixup/autosquash commits
    git-arc moved
        MOVED: 2022-05-13 - Renamed because more tools are now included
        New port: devel/freebsd-git-devtools
    git-branchless
        High-velocity, monorepo-scale workflow for Git
    git-bug
        Distributed, offline-first bug tracker embedded in git, with bridges
    git-cinnabar
        Git remote helper to interact with Mercurial repositories
    git-cliff
        Highly customizable changelog generator
    git-codereview
        Command-line tool for working with Gerrit
    git-cola
        Sleek and powerful Git GUI
        py311
            Sleek and powerful Git GUI
    git-cvs
        CVS emulation and import/export for git
    git-delta
        Syntax-highlighting pager for git/diff
...
There are too many things I do not know how they exactly works in ports, however it's work in progress
 
Back
Top