Bug 271293 - ports-mgmt/portmaster: recompiles ports multiple times
Summary: ports-mgmt/portmaster: recompiles ports multiple times
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stefan Eßer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-07 08:35 UTC by Martin Birgmeier
Modified: 2023-05-08 08:25 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (se)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2023-05-07 08:35:53 UTC
Scenario:
- FreeBSD 13.1 latest
- About 1750 installed ports, latest
- Upgraded FreeBSD to 13.2 latest
- Want to recompile all installed ports
  . Find the current date:
    cutoff=`date +%s`
  . Run portmater:
    portmaster --no-confirm `pkg query -e "%t < $cutoff" %n-%v`
  . Keep restarting this last command until success (after errors, deliberate interrupting, etc.)

Result:
- On the first run of the command above, all ports are selected for rebuild (obviously)
- It seems that the solver does not correctly consider ports that have already been built as a dependency of a previous port
- This means that many ports are built often or very often, e.g., meson, or llvm15.

Expected result:
- Each port should be rebuilt only once

Notes:
- If I remember correctly this was working correctly some time ago.

-- Martin
Comment 1 Tatsuki Makino 2023-05-08 08:25:28 UTC
In my case, I would do it by following these steps.

Stop some of /etc/periodic.conf.

daily_backup_pkg_enable="NO"
daily_status_pkg_changes_enable="NO"
security_status_pkgaudit_enable="NO"
security_status_pkg_checksum_enable="NO"
weekly_status_pkg_enable="NO"

Deinstall something that is needed to build something and is not already needed.

pkg autoremove

Some options change, but the version remains the same.

rm -f /var/db/ports/*/options

Make a memorandum of the manual installation.

pkg query -e "%n != pkg && %n != dialog4ports && %a = 0 && %#r = 0" "%o|%n" > /var/tmp/pkg-inst.txt

Finally, start working on all the builds.

portmaster -w --no-confirm -m -DDISABLE_VULNERABILITIES -a -f

Something will fail.

(fix something)
portmaster -w --no-confirm -m -DDISABLE_VULNERABILITIES -a -f -R

Something will fail.

(fix something)
portmaster -w --no-confirm -m -DDISABLE_VULNERABILITIES -a -f -R

Something fails which cannot be fixed.

orz