portmaster icon indicating copy to clipboard operation
portmaster copied to clipboard

--no-confirm ignored on package creation

Open schmied opened this issue 3 years ago • 2 comments

https://github.com/freebsd/portmaster/blob/b375cf09c7a58d26b2500805206730e21225e38b/portmaster#L1689-L1697

schmied avatar Dec 30 '21 17:12 schmied

The --no-confirm option makes portmaster assume a yes or no reply. What should be done in this case? The only safe option seems to be to assume "Abort update" in this case? But the semantics of --no-confirm seem to suggest that the default action "Ignore this error" should be taken - which I do not consider a reasonable action if not approved by the user.

stesser avatar Dec 30 '21 19:12 stesser

I am totally with you regarding the conflict between the safety concern and the default option. In my special use case I would prefer the default 'Ignore this error'. The question is whether or not to add complexity in configuration and code. But in the current state the script is not in all cases useful in scripted environments. The simplest way I can think of is introducing a knob 'Continue on (noncritical) error' or 'Skip on (noncritical) error' or something. That can be used in other parts of the script too and no need to introduce another mechanism there, e.g.: https://github.com/freebsd/portmaster/blob/b375cf09c7a58d26b2500805206730e21225e38b/portmaster#L3548-L3553 FYI in my use case it is a missing config file that I remove intentionally after the installation of the apache24 port. Thanks!

schmied avatar Dec 31 '21 10:12 schmied