Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Get rid of annoying 'unable to initialize frontend' messages #643

Merged
merged 2 commits into from
Feb 21, 2019

Conversation

alexAubin
Copy link
Member

The problem

In some situation, e.g. installing an app from the webadmin, the install dump some warnings :

dpkg-preconfigure: unable to re-open stdin:
debconf: falling back to frontend: Teletype
debconf: (This frontend requires a controlling tty.)
debconf: unable to initialize frontend: Readline
debconf: falling back to frontend: Readline
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: unable to initialize frontend: Dialog

Those are pretty annoying and technical, would be nice to get rid of them ...

Solution

My guess is that it's related to the use of dpkg inside ynh_package_install_from_equivs but I'm not that sure ... So tried to add DEBIAN_FRONTEND=noninteractive but not sure that's the issue / fix 😉 Mainly creating this PR to not forget about it later.

PR Status

Not tested

How to test

Pull the branch, try to install an app from the webadmin (e.g. Nextcloud). (Don't forget to restart yunohost-api)

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@alexAubin alexAubin added this to the 3.5.x milestone Feb 15, 2019
@alexAubin alexAubin changed the title Attempt to get rid of annoying 'unable to initialize frontend' messages [fix] Attempt to get rid of annoying 'unable to initialize frontend' messages Feb 16, 2019
@alexAubin
Copy link
Member Author

So turns out my intention was wrong and it's much worse than that ... It's about the use of sudo in ynh_apt, which for some reason cause DEBIAN_FRONTEND to not be forwarded to the actual apt / dpkg command -_-

@maniackcrudelis : do you think it's okay to remove this sudo ?

@alexAubin alexAubin changed the title [fix] Attempt to get rid of annoying 'unable to initialize frontend' messages [fix] Get rid of annoying 'unable to initialize frontend' messages Feb 16, 2019
@maniackcrudelis
Copy link
Contributor

sudo start another shell dedicated to its usage. In this command line, DEBIAN_FRONTEND is defined before sudo, so sudo doesn't have it.
I know that usually a sub shell heritate the variable from its parent. But not with sudo, which has a specific config regarding its variables.

Anyway, for apps, to not have sudo shouldn't be a problem.

@alexAubin
Copy link
Member Author

Flagging this as ready to merge because it should be a small benign change, but feel free to comment...

@alexAubin alexAubin merged commit fdbffe9 into stretch-unstable Feb 21, 2019
@alexAubin alexAubin deleted the get-rid-of-frontend-warnings branch February 21, 2019 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants