Skip to content

yum update without confirmation. - #3747

Merged
lasote merged 3 commits into
conan-io:developfrom
yangcha:develop
Oct 15, 2018
Merged

lasote merged 3 commits into
conan-io:developfrom
yangcha:develop

Conversation

@yangcha

@yangcha yangcha commented Oct 14, 2018

Copy link
Copy Markdown
Contributor

Changelog: Bugfix: yum update needs user's confirmation, which breaks system update in Centos non-interactive terminal.

  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@ghost ghost added the contributor pr label Oct 14, 2018
@CLAassistant

CLAassistant commented Oct 14, 2018

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Croydon

Croydon commented Oct 14, 2018

Copy link
Copy Markdown
Contributor

I had the same problem on Fedora. However, I'm wondering if there is a way to ask for confirmation and to continue successful if the answer is yes? It's not really good when you install some Conan dependency and your system is getting changed automatically.

@memsharded

Copy link
Copy Markdown
Member

Hi @yangcha

Thanks for contributing this! I think it makes sense.

@Croydon

It's not really good when you install some Conan dependency and your system is getting changed automatically.

Yeah, I know, but this is the current design of SystemPackageTool. When a package recipe decides to use it to install something, is because it needs those packages to operate. It might be possible to ask the user for confirmation, but then such recipe will not work. And making it the default is kind of impossible without breaking a ton of things. So I think we are good merging this PR.

@memsharded memsharded added this to the 1.9 milestone Oct 14, 2018
@yangcha

yangcha commented Oct 14, 2018

Copy link
Copy Markdown
Contributor Author

Hi @yangcha

Thanks for contributing this! I think it makes sense.

@Croydon

It's not really good when you install some Conan dependency and your system is getting changed automatically.

Yeah, I know, but this is the current design of SystemPackageTool. When a package recipe decides to use it to install something, is because it needs those packages to operate. It might be possible to ask the user for confirmation, but then such recipe will not work. And making it the default is kind of impossible without breaking a ton of things. So I think we are good merging this PR.

@memsharded This is what I want to say about. In fact, install() does not ask user for confirmation, either.
@Croydon If user confirmation is really important to you, there is a way to implement it:
you can use if os.isatty(0): to check if the terminal is interactive or not, then add -y if it is non-interactive terminal.

@lasote
lasote merged commit 650688f into conan-io:develop Oct 15, 2018
@ghost ghost removed the contributor pr label Oct 15, 2018
grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018
* yum update without confirmation.

* sudo yum update without user's confirmation

* sudo yum update without user's confirmation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants