Bug 245840

Summary: ports-mgmt/portmaster: -R is too agressive in removing PM_UPGRADE_DONE_FLAG
Product: Ports & Packages Reporter: aryeh.friedman
Component: Individual Port(s)Assignee: Stefan Eßer <se>
Status: In Progress ---    
Severity: Affects Only Me CC: se
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (se)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Description Flags
Do not always delete build status files after building a single port none

Description aryeh.friedman 2020-04-23 04:55:27 UTC
I did the following:

portmaster -Rafd

Died on devel/autoconf-archive due to arg list being too long (not the issue I am reporting but still an issue)

So in order to correctly get autoconf-archive correctly installed I did:

portmaster -Rd devel/autoconf-archive

Completes as expected.   Now I rerun portmaster -Rafd and none of the 200+ ports already built from the first are marked as already done.

So I then do:

ls /var/db/pkg/*/PM_UPGRADE_DONE_FLAG
ls: No match.

Therefore I have to assume that portmaster -Rd devel/autoconf-archive rm'ed all the previous PM_UPGRADE_DONE_FLAG's leading portmaster to incorrectly assume no ports had been built in the previous run of portmaster -Rafd

System info:

portmaster --version

===>>> Version 3.19_25

uname -a
FreeBSD neomarx 12.1-RELEASE-p4 FreeBSD 12.1-RELEASE-p4 r360200 GENERIC  amd64
Comment 1 Stefan Eßer freebsd_committer 2021-04-20 10:23:06 UTC
Created attachment 224288 [details]
Do not always delete build status files after building a single port

The removal of the build done files is on purpose, so I do not think this is actually a bug (IOW, it works as designed).

I never use -R and cannot easily test the attached change for correctness (especially, whether it has unexpected side effects in different contexts).

I'm willing to apply the patch to the port, in case I get positive feedback on it. It has to be shown to work, and it should not have caused any issues over many portmaster runs with different sets of command line options.