[pacman-dev] Providing a better way for users to answer "yes" to a specific, focused question
Howdy -- Right now, the common practice for users wishing to automate an answer of "yes" to ALPM_QUESTION_CONFLICT_PKG, ALPM_QUESTION_REPLACE_PKG, ALPM_QUESTION_REMOVE_PKGS, ALPM_QUESTION_CORRUPTED_PKG, ALPM_QUESTION_IMPORT_KEY or similar is to pipe from "yes". This has the side effect of not overriding only the single, desired option, but overriding answers for the entire set of questions -- including others which the user may not intend. While I understand the intent to encourage human involvement in deciding to take actions that could easily result in a broken system, if users _are_ going to automate such acts, it would be appropriate to provide a supported means of doing so as specific as possible. As such, I'd like to propose one of the following: - [Most limited to my immediate purpose, already implemented in my local tree]: Adding a --remove-conflicted option which makes ALPM_QUESTION_CONFLICT_PKG automatically answered "yes" - [Somewhat more general]: Adding a set of related options: --answer-{conflict,replace,remove,corrupted,import-key}={yes,no}. Not ideal, since some of these situations (particularly import-key) may be best handled with information specific to the item at hand. - Add a set of environment variables: PACMAN_QUESTION_{CONFLICT,REPLACE,REMOVE,CORRUPTED,IMPORTKEY}{,_$VALUE}={yes,no} In this proposal, a user could set PACMAN_QUESTION_IMPORTKEY_abcdefg=yes, and allow only that one key -- or PACMAN_QUESTION_IMPORTKEY=yes if they're exceptionally reckless and want to import all keys. Similarly, PACMAN_QUESTION_CONFLICT=yes to allow all conflicts to be resolved by removing a package, or PACMAN_QUESTION_CONFLICT_foo to allow conflicts over package foo to be resolved by removing that package. Would any of these, if implemented and adjusted per feedback, be likely to be considered for merge? Thanks!
Howdy, all -- While digging into the test suite (to add tests for the patch implementing the first option proposed), I found --ask. Undocumented, yes, but does exactly what I was looking for; I feel silly for not looking in the right place first. Apologies for the noise, -- Charles
participants (1)
-
Charles Duffy