Como imprimir mensagens para o usuário na instalação do pacote?

1

Eu quero notificar o usuário sobre detalhes importantes quando o pacote estiver instalado. Eu olhei para link mas não vejo nada adequado para esse fim. Existe alguma maneira de fazer isso?

    
por graywolf 25.10.2018 / 19:39

1 resposta

3

Parece-me que isso é abordado anteriormente nesse documento, em Solicitando scripts do mantenedor , com:

Package maintainer scripts may prompt the user if necessary. Prompting must be done by communicating through a program, such as debconf, which conforms to the Debian Configuration Management Specification, version 2 or higher.

[…]

If a package has a vitally important piece of information to pass to the user (such as “don’t run me as I am, you must edit the following configuration files first or you risk your system emitting badly-formatted messages”), it should display this in the config or postinst script and prompt the user to hit return to acknowledge the message. Copyright messages do not count as vitally important (they belong in /usr/share/doc/package/copyright); neither do instructions on how to use a program (these should be in on-line documentation, where all the users can see them).

Any necessary prompting should almost always be confined to the config or postinst script. If it is done in the postinst, it should be protected with a conditional so that unnecessary prompting doesn’t happen if a package’s installation fails and the postinst is called with abort-upgrade, abort-remove or abort-deconfigure.

    
por 25.10.2018 / 20:10