| 94 | |
| 95 | |
| 96 | === Variant specific dependency (Low-priority) === |
| 97 | Desc: When installing a port that requires a dependency to have a certain variant, but this variant is not set. Ask the user if it should reinstall the dependency with that variant. This interaction is currently marked low priority. |
| 98 | |
| 99 | Message: A warning message explaining that reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants. |
| 100 | |
| 101 | Question type: A yes/no question is suitable here. The correct variant will be selected and installed automatically so no need to provide options. |
| 102 | |
| 103 | Example- |
| 104 | {{{ |
| 105 | $> port install foobar |
| 106 | The package 'foobar +quartz' requires 'barfoo +quartz' but 'barfoo' is installed. |
| 107 | Warning: Reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants. |
| 108 | Do you wish to install barfoo +quartz? [Y/n]: Y |
| 109 | ---> Installing barfoo @1.0.1 +xzy |
| 110 | ——-> Installing foobar |
| 111 | $> |
| 112 | }}} |
| 113 | |
| 114 | === Choose variants interactively (Low-priority) === |
| 115 | Desc: When installing a port the user can be given a list of all the variants of the port they wish to install and they can select them interactively. This interaction is currently flagged low priority. |
| 116 | |
| 117 | Message: A list of all the variants to choose from. |
| 118 | |
| 119 | Question type: A multiple choice question where the user can select the options they want. Then pressing enter proceeds with the install. |
| 120 | |
| 121 | Example- |
| 122 | {{{ |
| 123 | $> port install foobar |
| 124 | "foobar" has many variants. Which of the following variants do you want to install? |
| 125 | (1) foobar @0.0.1 +xzy |
| 126 | (2) foobar @0.0.2 +xzy |
| 127 | (3) foobar @0.0.3 |
| 128 | Enter a space separated string of choices to select the ports to uninstall: 1 |
| 129 | ---> Installing foobar @0.0.1 +xzy |
| 130 | $> |
| 131 | }}} |
| 132 | |
| 133 | = Use Cases Completed = |
134 | | === Variant specific dependency (Low-priority) === |
135 | | Desc: When installing a port that requires a dependency to have a certain variant, but this variant is not set. Ask the user if it should reinstall the dependency with that variant. This interaction is currently marked low priority. |
136 | | |
137 | | Message: A warning message explaining that reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants. |
138 | | |
139 | | Question type: A yes/no question is suitable here. The correct variant will be selected and installed automatically so no need to provide options. |
140 | | |
141 | | Example- |
142 | | {{{ |
143 | | $> port install foobar |
144 | | The package 'foobar +quartz' requires 'barfoo +quartz' but 'barfoo' is installed. |
145 | | Warning: Reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants. |
146 | | Do you wish to install barfoo +quartz? [Y/n]: Y |
147 | | ---> Installing barfoo @1.0.1 +xzy |
148 | | ——-> Installing foobar |
149 | | $> |
150 | | }}} |
151 | | |
152 | | === Choose variants interactively (Low-priority) === |
153 | | Desc: When installing a port the user can be given a list of all the variants of the port they wish to install and they can select them interactively. This interaction is currently flagged low priority. |
154 | | |
155 | | Message: A list of all the variants to choose from. |
156 | | |
157 | | Question type: A multiple choice question where the user can select the options they want. Then pressing enter proceeds with the install. |
158 | | |
159 | | Example- |
160 | | {{{ |
161 | | $> port install foobar |
162 | | "foobar" has many variants. Which of the following variants do you want to install? |
163 | | (1) foobar @0.0.1 +xzy |
164 | | (2) foobar @0.0.2 +xzy |
165 | | (3) foobar @0.0.3 |
166 | | Enter a space separated string of choices to select the ports to uninstall: 1 |
167 | | ---> Installing foobar @0.0.1 +xzy |
168 | | $> |
169 | | }}} |
170 | | |
171 | | = Use Cases Completed = |
| 155 | |
| 156 | === Ambiguous activate === |
| 157 | Desc: When port activate command is run ambiguously, give a list of ports to the user to choose from. |
| 158 | |
| 159 | Message: A list of all the port versions/variants of the port name given. |
| 160 | |
| 161 | Question type: A single choice question having multiple options is what is required in this case. The user is asked to choose one of the options. |
| 162 | |
| 163 | Example- |
| 164 | {{{ |
| 165 | $> port activate foobar |
| 166 | The following variants of foobar exist: |
| 167 | foobar @0.0.1 +xzy |
| 168 | foobar @0.0.2 +xzy |
| 169 | foobar @0.1 |
| 170 | Type a number to select the variant to activate: 2 |
| 171 | ---> foobar @0.0.2 +xzy activated. |
| 172 | $> |
| 173 | }}} |
221 | | ui_ask_yesorno: deals with all the continue/abort type questions |
222 | | |
223 | | ui_ask_onechoice: deals with all the single choice selection questions |
224 | | |
225 | | ui_ask_manychoice: deals with questions that offer many more than one selections |
226 | | |
227 | | ui_ask_timeout: deals with questions that may have better functionality with timeouts |
228 | | |
229 | | === Parameters === |
230 | | qid: This parameter is most important as it will enable the port client to identify the question and print the correct interactivity case. |
231 | | (Incomplete) |
| 223 | ui_ask_yesno: deals with all the continue/abort type questions |
| 224 | |
| 225 | ui_ask_singlechoice: deals with all the single choice selection questions |
| 226 | |
| 227 | ui_ask_multichoice: deals with questions that offer many more than one selections |
| 228 | |
| 229 | ui_timeout: deals with yes/no questions that may have better functionality with timeouts |
| 230 | |