[MacPorts] SummerOfCode2014_interactive modified

MacPorts noreply at macports.org
Thu Aug 14 15:28:33 PDT 2014


Page "SummerOfCode2014_interactive" was changed by shasha at macports.org
Diff URL: <https://trac.macports.org/wiki/SummerOfCode2014_interactive?action=diff&version=6>
Revision 6
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: SummerOfCode2014_interactive
=========================================================================
--- SummerOfCode2014_interactive (version: 5)
+++ SummerOfCode2014_interactive (version: 6)
@@ -1,6 +1,137 @@
 [[PageOutline]]
 
-= Interactivity Use Cases =
+= Use Cases Implemented =
+
+=== Uninstall when port has dependents ===
+Desc: When uninstalling a port, if the port has dependents ask the user for confirmation before uninstalling.
+
+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 yes/no question is right for such a case. 
+
+Example-
+{{{
+$> port uninstall foobar
+The following ports will break:
+ brofoo @0.19.1_0
+ foobro @2.2.6_0
+Continue? [y/N]: y
+Warning: Uninstall forced.  Proceeding despite dependencies.
+--->  Deactivating foobar @1.14_0
+--->  Cleaning foobar
+--->  Uninstalling foobar @1.14_0
+--->  Cleaning foobar
+$>
+}}}
+
+
+=== Uninstall using -—follow-dependencies ===
+Desc: When a user uninstalls using the flag —-follow-dependencies, ask for confirmation.
+
+Message: A list of all the dependencies that will be uninstalled will be displayed.
+
+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:
+  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
+$>
+}}}
+
+
+=== Ambiguous uninstall ===
+Desc: When uninstalling a port if the user supplies an ambiguous name, list all the variants and ask to select the ones that should be uninstalled.
+
+Message: A list of all variants related to the ambiguous name provided.
+
+Question type: A multiple choice question is what is required in this case. The user will be able to select the ones they want to uninstall. The selected options may be highlighted. Then pressing enter proceeds with the uninstall.
+
+Example-
+{{{
+$> 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.1 +xyz
+  (3) foobar @0.0.3
+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
+$>
+}}}
+
+
+=== Ambiguous activate ===
+Desc: When port activate command is run ambiguously, give a list of ports to the user to choose from.
+
+Message: A list of all the port versions/variants of the port name given.
+
+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.
+
+Example-
+{{{
+$> port activate foobar
+The following variants of foobar exist:
+  foobar @0.0.1 +xzy
+  foobar @0.0.2 +xzy
+  foobar @0.1
+Type a number to select the variant to activate: 2
+---> 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: 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 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 
+$>
+}}}
+
+=== 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
+$>
+}}}
+
+
+= Other Use Cases =
 
 === Build-time dependencies ===
 Desc: While installing a port if it conflicts with something already installed, ask the user for permission to deactivate the installed ones and reactivate after the build.
@@ -51,51 +182,8 @@
 }}}
 
 
-=== Dependents getting broken ===
-Desc: When uninstalling a port, if ports that depend on it are getting broken
-ask the user for confirmation.
-
-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 yes/no question is right for such a case. 
-
-Example-
-{{{
-$> port uninstall foobar
-The following dependents of foobar will be broken:
-  boofar @0.0.1 +xzy
-  barfoo @0.0.2 +xzy
-  foba @0.1
-Continue? [y/N]: y
----> Uninstalling foobar
-$>
-}}}
-
-
-=== Uninstall using -—follow-dependencies ===
-Desc: When a user uninstalls using the flag —-follow-dependencies, ask for confirmation.
-
-Message: A list of all the dependencies that will be uninstalled will be displayed.
-
-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:
-  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
-$>
-}}}
-
-
-=== Variant specific dependency (Low-priority) ===
-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.
+=== 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. 
 
 Message: A warning message explaining that reinstalling with a specific variant could break any already-installed dependents that relied on the previously-selected variants.
 
@@ -112,8 +200,8 @@
 $>
 }}}
 
-=== Choose variants interactively (Low-priority) ===
-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.
+=== 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. 
 
 Message: A list of all the variants to choose from.
 
@@ -131,101 +219,19 @@
 $>
 }}}
 
-= Use Cases Completed =
-
-=== Ambiguous uninstall ===
-Desc: When uninstalling a port if the user supplies an ambiguous name, list all the variants and ask to select the ones that should be uninstalled.
-
-Message: A list of all variants related to the ambiguous name provided.
-
-Question type: A multiple choice question is what is required in this case. The user will be able to select the ones they want to uninstall. The selected options may be highlighted. Then pressing enter proceeds with the uninstall.
-
-Example-
-{{{
-$> 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.1 +xyz
-  (3) foobar @0.0.3
-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
-$>
-}}}
-
-
-=== Ambiguous activate ===
-Desc: When port activate command is run ambiguously, give a list of ports to the user to choose from.
-
-Message: A list of all the port versions/variants of the port name given.
-
-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.
-
-Example-
-{{{
-$> port activate foobar
-The following variants of foobar exist:
-  foobar @0.0.1 +xzy
-  foobar @0.0.2 +xzy
-  foobar @0.1
-Type a number to select the variant to activate: 2
----> 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: 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 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 
-$>
-}}}
-
-=== 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
-$>
-}}}
-
-= Implementation Details =
-
-=== ui_* calls ===
-Under ui_ask_ namespace:
-
-ui_ask_yesno: deals with all the continue/abort type questions
-
-ui_ask_singlechoice: deals with all the single choice selection questions
-
-ui_ask_multichoice: deals with questions that offer many more than one selections
-
-ui_timeout: deals with yes/no questions that may have better functionality with timeouts
-
+=== Sudo ===
+Desc: When a command is entered that requires elevated privileges and user has failed to provide them, ask the user if they wish to run the command as su.
+
+Message: A message explaining that the command requires to be run "sudo" prefixed. 
+
+Question type: A yes/no question asking if the user wants to give sudo permission or not.
+
+Example-
+{{{
+$> port install foobar
+Note: 'Install' action requires elevated privileges.
+Do you wish to run this as sudo? [Y/n]: y
+---> Installing foobar @0.0.1 
+$>
+}}}
+   
-------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