Bug 233872

Summary: mergemaster(8) Re-run mode regression, fails needlessly with no src/Makefile.inc1 present
Product: Base System Reporter: Harald Schmalzbauer <bugzilla.freebsd>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: emaste, imp
Priority: --- Keywords: patch, regression
Version: 12.0-STABLE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252417
Attachments:
Description Flags
Restore mergemaster(8) Re-run possibility if no populated SRCDIR is in place. none

Description Harald Schmalzbauer 2018-12-08 17:11:58 UTC
Created attachment 199961 [details]
Restore mergemaster(8) Re-run possibility if no populated SRCDIR is in place.

Hello,

in r338114 [ https://svnweb.freebsd.org/base?view=revision&revision=338114 ], usr.sbin/mergemaster.sh was extended to re-define \$SRCDIR if applicable.

Unfortunately, the extended tests for Makefile.inc1 introduced exit cases, which are not needed if the user runs mergemaster(8) in Re-Run (-r) mode *1.
The attached patch *2 simply omits the Makefile.inc1 checks if RERUN was set.

Thanks,

-harry

*1) In my case, TEMPROOT was populated without the help of mergemaster(8), but I see no reason why SRCDIR mustn't vanish during 1st-run and re-run, hence this problem report.

*2) I'd prefer insterting
'[ -z "${RERUN}" ] &&'
over
'-z "${RERUN}" -a'
But I used the latter for consistency with the existing script, the two wastes for internal test/stat invocations only applies to RERUN mode...