Opened 6 years ago

Last modified 6 years ago

#55546 reopened enhancement

Install dependencies without asking

Reported by: Polyergic (Shad Sterling) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.4.2
Keywords: Cc:
Port:

Description

This change in behavior constantly annoys me. I run an install, leave the computer unattended for a while, and come back to find it didn't actually install because it was waiting for me to confirm. I want an option to assume that I meant it when I said port install foo.

The -R option that only applies to upgrade looks like the closest existing option; I think it would be ok to have install -R also install dependencies without asking. If the different directions of having the same option mean "upgrade with dependents" and "install with dependencies" might be confusing, maybe -r. I really don't care what the option is, only what it does.

Change History (14)

comment:1 Changed 6 years ago by kencu (Ken)

use -N

-N
 Non-interactive mode, interactive questions are not asked

comment:2 Changed 6 years ago by kencu (Ken)

Resolution: fixed
Status: newclosed

comment:3 Changed 6 years ago by Polyergic (Shad Sterling)

Well thanks for assuming I didn't bother to read anything.

I don't want to disable all interactive questions, just that one.

comment:4 Changed 6 years ago by kencu (Ken)

OK. AFAIK, that is the only interactive question that there is when you want to install or upgrade ports, so in effect, the same outcome.

comment:5 Changed 6 years ago by Polyergic (Shad Sterling)

Is that documented somewhere? The closest thing I saw to a list of interactive questions was wiki:SummerOfCode2014_interactive, which doesn't bill itself as comprehensive, doesn't make it easy to find the sublist that applies to install, and does list some prompts that I should have seen but haven't.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 6 years ago by kencu (Ken)

I'm sorry if my reply seemed too abrupt. If you find -N doen't fulfill your needs, please reopen.

Last edited 6 years ago by kencu (Ken) (previous) (diff)

comment:7 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Well certainly "fixed" is not the correct resolution for this ticket.

comment:8 Changed 6 years ago by kencu (Ken)

I just hate putting "invalid". It sounds so rude and condescending to me.

I guess you're opening this again because you would like to see some other flag than -N coming along someday to allow dependencies to install non-interactively.

Last edited 6 years ago by kencu (Ken) (previous) (diff)

comment:9 Changed 6 years ago by Polyergic (Shad Sterling)

AFAIK if could just be a documentation problem. The description of -N doesn't read like it assumes the answer to that question would be yes, but apparently that's what it does. That could be made clear. It's also not clear what other interactive prompts might occur during an install and what answers -N would assume for them. If there aren't any, -N install does what I want, it's just not documented clearly.

But -N meaning "Assume Yes answers to some interactive questions" is weird enough that I'm not sure clarifying the documentation will cover all the problems; what if someone wants to assume No to installing dependencies? What I was imagining initially was an option that might have a long form like --yes-install-dependencies or --install-deps=yes, which would non-interactively answer just this one question, or -R meaning --recursive.

comment:10 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

You can read wiki:SummerOfCode2014_interactive to learn all about interactive mode. I don't know whether all of the use cases described on that page actually got implemented, or only some of them.

Before interactive mode was added, MacPorts would just do the command you asked it to do. But some people were surprised when, for example, they "just" asked to install one port, and MacPorts started installing hundreds of dependencies. The addition of interactive mode means that the user is now notified in advance of all the dependencies that will be installed and can then confirm or decline, which removes that surprise. I preferred the way MacPorts worked before interactive mode was added, so I turn it off in macports.conf.

comment:11 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Ken, I reopened the ticket because "fixed" was not the correct resolution. If we want to change the documentation to clarify interactive mode's purpose and scope, we can do that, and then change the ticket's component to "guide" and mark the ticket fixed. If we want to communicate to the user that what they have reported is not a bug, and that everything is behaving as designed, the correct resolution is "invalid". It's not meant to be rude and condescending; it's meant to communicate that the problem being reported is not considered to be a problem (or, in the case of problems outside of our control, such as OS bugs, not our problem). Some other issue trackers use the resolution "notabug" for this type of issue. We use "invalid" because that's what Trac comes configured with by default and it's what we've been using for over a decade so it's tedious to change it now. If we want to communicate that we acknowledge there is a problem but we will not fix it, the correct resolution is "wontfix".

comment:12 Changed 6 years ago by Polyergic (Shad Sterling)

@ryandesign, I can't learn all about interactive mode from wiki:SummerOfCode2014_interactive; in particular, it doesn't say

  1. Which interactive prompts may be triggered by install (or any other command)
  2. Which answers -N provides for each interactive prompt

How do you disable interactive mode in macports.conf? I don't see anything relevant in https://guide.macports.org/chunked/internals.configuration-files.html#internals.configuration-files.macports-conf

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:13 Changed 6 years ago by jmroot (Joshua Root)

You may not have all options in your macports.conf if it has existed for a while. macports.conf.default will list the newer ones, including:

# Whether the user interface should ask interactive questions
#ui_interactive         yes

comment:14 Changed 6 years ago by Polyergic (Shad Sterling)

Thanks @jmroot, I've added that, but didn't have any updates or errors that I know would have triggered an interactive question, so I'll look forward to seeing it work in the future.

Note: See TracTickets for help on using tickets.