[MacPorts] SummerOfCode2014_interactive modified
MacPorts
noreply at macports.org
Tue Jun 3 21:53:03 PDT 2014
Page "SummerOfCode2014_interactive" was changed by shasha at macports.org
Diff URL: <https://trac.macports.org/wiki/SummerOfCode2014_interactive?action=diff&version=2>
Revision 2
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: SummerOfCode2014_interactive
=========================================================================
--- SummerOfCode2014_interactive (version: 1)
+++ SummerOfCode2014_interactive (version: 2)
@@ -6,71 +6,69 @@
Message: A list of all the conflicts will be shown and the user asked if they want to deactivate all or abort.
-Question type: A yes/no or continue/abort question is sufficient for this case. The user can either choose to deactivate all and continue with the build or abort. It is not necessary to give a multiple choice question for this use case.
+Question type: A yes/no question is sufficient for this case. The user can either choose to deactivate all and continue with the build or abort. It is not necessary to give a multiple choice question for this use case.
Example-
{{{
$> port install foobar
The following packages conflict with the build of foobar:
- (1) boofar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
-Do you wish to deactivate all of them and reactivate after the install?
-Press (1) to continue and (0) to abort: 1
+ boofar @0.0.1 +xzy
+ barfoo @0.0.2 +xzy
+ foba @0.1
+Do you want to deactivate all of them and reactivate after the install? [y/N]: y
---> Deactivating build conflicts
The following dependencies of foobar will be installed:
- (1) boofar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
-Press (1) to continue and (0) to abort: 1
+ farfar @0.0.1 +xzy
+ booboo @0.0.2 +xzy
+ bafo @0.1
+Continue? [y/N]: y
+---> Installing farfar @0.0.1 +xzy
+---> Installing booboo @0.0.2 +xzy
+---> Installing bafo @0.1
+---> Installing foobar
+——-> Reactivating build conflict packages
+$>
+}}}
+
+
+=== File conflicts on Activation ===
+Desc: When a port is installed/activated, if the files written by the port already exist ask the user for permission before overwriting.
+
+Message: A frightful message making it clear that the correct response is usually ‘no’. The name of the file being overwritten.
+
+Question type: A yes/no question is an interaction that makes sense here. This question will be triggered whenever the activation process hits a conflicting file. A yestoall option will make it possible to present the complete list and ask the user only once. It is also to be kept in mind that files overwritten only affect the port being activated.
+
+Example-
+{{{
+$> port activate foobar
+The file foo.con already exists.
+Warning: Overwriting of files is not recommended. It may lead to errors.
+Do you wish to overwrite foo.con? [y/N/y_to_all]: y
+---> Overwriting foo.con
+——-> foobar activated
+$>
+}}}
+
+
+=== Apt-get like behaviour ===
+Desc: When installing a port, list all the dependencies and ask the user for confirmation just like apt-get does.
+
+Message: A list of all the dependencies.
+
+Question type: A continue/abort question to give the options of continuing with the installation or aborting it. This could even use a 10s timeout, giving an option to abort during the timeout and continuing automatically after the time is out.
+
+Example-
+{{{
+$> port install foobar
+The following dependencies of foobar will be installed:
+ boofar @0.0.1 +xzy
+ barfoo @0.0.2 +xzy
+ foba @0.1
+Continue? [Y/n]: Y
---> Installing boofar @0.0.1 +xzy
---> Installing barfoo @0.0.2 +xzy
---> Installing foba @0.1
---> Installing foobar
-——-> Reactivating build conflict packages
-$>
-}}}
-
-
-=== File conflicts on Activation ===
-Desc: When a port is installed/activated, if the files written by the port already exist ask the user for permission before overwriting.
-
-Message: A frightful message making it clear that the correct response is usually ‘no’. The name of the file being overwritten.
-
-Question type: A yes/no or continue/abort question is an interaction that makes sense here. This question will be triggered whenever the activation process hits a conflicting file, so a yestoall option might also be desirable. It is also to be kept in mind that files overwritten only affect the port being activated.
-
-Example-
-{{{
-$> port activate foobar
-The file foo.con already exists.
-Warning: Overwriting of files is not recommended. It may lead to errors.
-Do you wish to overwrite foo.con?
-Press (1) to continue and (0) to abort: 1
----> Overwriting foo.con
-——-> foobar activated
-$>
-}}}
-
-
-=== Apt-get like behaviour ===
-Desc: When installing a port, list all the dependencies and ask the user for confirmation just like apt-get does.
-
-Message: A list of all the dependencies.
-
-Question type: A continue/abort question to give the options of continuing with the installation or aborting it. This could even use a 10s timeout, giving an option to abort during the timeout and continuing automatically after the time is out.
-
-Example-
-{{{
-$> port install foobar
-The following dependencies of foobar will be installed:
- (1) boofar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
-Press (1) to continue and (0) to abort: 1
----> Installing boofar @0.0.1 +xzy
----> Installing barfoo @0.0.2 +xzy
----> Installing foba @0.1
----> Installing foobar
$>
}}}
@@ -80,35 +78,33 @@
Message: A warning message making it clear that some other ports are getting broken. A list of all those ports will be displayed.
-Question type: A continue/abort question is right for such a case.
+Question type: A yes/no question is right for such a case.
Example-
{{{
$> port uninstall foobar
The following dependents of foobar will be broken:
- (1) boofar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
-Press (1) to continue and (0) to abort: 1
----> Unstalling foobar
+ boofar @0.0.1 +xzy
+ barfoo @0.0.2 +xzy
+ foba @0.1
+Continue? [y/N]: y
+---> Uninstalling foobar
$>
}}}
=== Variant specific dependency ===
-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.
+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.
Message: A warning message explaining that reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants.
-Question type: A continue/abort question is suitable here. The correct variant will be selected and installed automatically so no need to provide options.
-
-Example-
-{{{
-$> port install foobar
-The package foobar requires barfoo @1.0.1.
-Currently set version of barfoo: barfoo @0.0.1
+Question type: A yes/no question is suitable here. The correct variant will be selected and installed automatically so no need to provide options.
+
+Example-
+{{{
+$> port install foobar
+The package 'foobar +quartz' requires 'barfoo +quartz' but 'barfoo' is installed.
Warning: Reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants.
-Do you wish to install barfoo @1.0.1?
-Press (1) to continue and (0) to abort: 1
+Do you wish to install barfoo +quartz? [Y/n]: Y
---> Installing barfoo @1.0.1 +xzy
——-> Installing foobar
$>
@@ -125,30 +121,32 @@
{{{
$> port activate foobar
The following variants of foobar exist:
- (1) foobar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
+ foobar @0.0.1 +xzy
+ foobar @0.0.2 +xzy
+ foobar @0.1
Type a number to select the variant to activate: 2
----> barfoo @0.0.2 +xzy activated.
+---> foobar @0.0.2 +xzy activated.
$>
}}}
=== Rebuilding in rev-upgrade ===
Desc: Before rebuilding any port in rev-upgrade the user will be asked for confirmation.
-Message: The port name that will be rebuilt along with some detail(not sure) about the linking errors.
-
-Question type: A yes/no question seems to handle the situation well but if many ports have to be rebuilt a yestoall option also makes sense. A yestoall option can be implemented as a separate flag for rev-upgrade(may be).
+Message: A list of ports that will be rebuilt along with some detail(not sure) about the linking errors. If the user chooses to answer no, display the message "You can always run 'port rev-upgrade' later to fix this".
+
+Question type: A yes/no question seems to handle the situation well. The whole list will be rebuilt as asking for each port might break the process of rev-upgrade.
Example-
{{{
$> port rev-upgrade
-The package foobar @0.0.1 was found broken. Do you wish to rebuild it?
-Press (1) to continue and (0) to abort: 1
----> Rebuilding foobar @0.0.1 +xzy
-The package barfoo @0.0.2 was found broken. Do you wish to rebuild it?
-Press (1) to continue and (0) to abort: 1
+The following ports will be rebuilt:
+ boofar @0.0.1 +xzy
+ barfoo @0.0.2 +xzy
+ foba @0.1
+Continue? [Y/n]: Y
+---> Rebuilding boofar @0.0.1 +xzy
---> Rebuilding barfoo @0.0.2 +xzy
+---> Rebuilding foba @0.1
$>
}}}
@@ -157,16 +155,16 @@
Message: A list of all the dependencies that will be uninstalled will be displayed.
-Question type: A continue/abort ie. yes/no question makes sense here. The user will confirm the uninstall action or have a chance of aborting. A timeout can be used here too but it will not be very practical.
+Question type: A yes/no question makes sense here. The user will confirm the uninstall action or have a chance of aborting. A timeout can be used here too.
Example-
{{{
$> port uninstall —follow-dependencies foobar
The following packages will be uninstalled:
- (1) foobar @0.0.1 +xzy
- (2) barfoo @0.0.2 +xzy
- (3) foba @0.1
-Press (1) to continue and (0) to abort: 1
+ foobar @0.0.1 +xzy
+ barfoo @0.0.2 +xzy
+ foba @0.1
+Continue? [Y/n]: Y
---> Uninstalling foobar @0.0.1 +xzy
---> Uninstalling barfoo @0.0.2 +xzy
——-> Uninstalling foba @0.1
@@ -185,30 +183,20 @@
$> port uninstall foobar
"foobar" is ambiguous. Which of the following ports do you want to uninstall?
(1) foobar @0.0.1 +xzy
- (2) foobar @0.0.2 +xzy
+ (2) foobar @0.0.1 +xyz
(3) foobar @0.0.3
- Type a number to select a port to uninstall or press enter to uninstall the ports currently selected: 1
- Selecting foobar @0.0.1 +xzy.
- *(1) foobar @0.0.1 +xzy
- (2) foobar @0.0.2 +xzy
- (3) foobar @0.0.3
- Type a number to select a port to uninstall or press enter to uninstall the ports currently selected: 3
- Selecting foobar @0.0.3.
- *(1) foobar @0.0.1 +xzy
- (2) foobar @0.0.2 +xzy
- *(3) foobar @0.0.3
- Type a number to select a port to uninstall or press enter to uninstall the ports currently selected:
+Enter a space separated string of choices to select the ports to uninstall: 1 3
---> Uninstalling foobar @0.0.1 +xzy
---> Uninstalling foobar @0.0.3
$>
}}}
=== Choose variants interactively ===
-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.
+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.
Message: A list of all the variants to choose from.
-Question type: A multiple choice question where the user can select the options they want. Then pressing enter proceeds with the install.
+Question type: A multiple choice question where the user can select the options they want. Then pressing enter proceeds with the install.
Example-
{{{
@@ -217,12 +205,7 @@
(1) foobar @0.0.1 +xzy
(2) foobar @0.0.2 +xzy
(3) foobar @0.0.3
- Type a number to select a variant to install or press enter to install the variants currently selected: 1
- Selecting foobar @0.0.1 +xzy.
- *(1) foobar @0.0.1 +xzy
- (2) foobar @0.0.2 +xzy
- (3) foobar @0.0.3
- Type a number to select a variant to install or press enter to install the variants currently selected:
+Enter a space separated string of choices to select the ports to uninstall: 1
---> Installing foobar @0.0.1 +xzy
$>
}}}
@@ -230,13 +213,15 @@
= Implementation Details =
=== ui_* calls ===
-ui_yesorno: deals with all the continue/abort type questions
-
-ui_onechoice: deals with all the single choice selection questions
-
-ui_manychoice: deals with questions that offer many more than one selections
-
-ui_timeout: deals with questions that may have better functionality with timeouts
+Under ui_ask_ namespace:
+
+ui_ask_yesorno: deals with all the continue/abort type questions
+
+ui_ask_onechoice: deals with all the single choice selection questions
+
+ui_ask_manychoice: deals with questions that offer many more than one selections
+
+ui_ask_timeout: deals with questions that may have better functionality with timeouts
=== Parameters ===
qid: This parameter is most important as it will enable the port client to identify the question and print the correct interactivity case.
-------8<------8<------8<------8<------8<------8<------8<------8<--------
--
Page URL: <https://trac.macports.org/wiki/SummerOfCode2014_interactive>
MacPorts <http://www.macports.org/>
Ports system for OS X
This is an automated message. Someone added your email address to be
notified of changes on 'SummerOfCode2014_interactive' page.
If it was not you, please report to .
More information about the macports-changes
mailing list