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鈥檒l 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

Projects
None yet
2 participants
@alexAubin
Copy link
Member

alexAubin commented Feb 9, 2019

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

This comment has been minimized.

Copy link
Member Author

alexAubin commented Feb 16, 2019

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 removed the test needed label Feb 16, 2019

@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

This comment has been minimized.

Copy link
Contributor

maniackcrudelis commented Feb 16, 2019

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

This comment has been minimized.

Copy link
Member Author

alexAubin commented Feb 18, 2019

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@alexAubin alexAubin deleted the get-rid-of-frontend-warnings branch Feb 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment