Print a couple of messages as anaconda starts up so the user isn't confused about what's happening after the screen goes dark. --- anaconda | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/anaconda b/anaconda index fc679c9..15d13e6 100755 --- a/anaconda +++ b/anaconda @@ -646,6 +646,8 @@ def prompt_for_ssh():
if __name__ == "__main__": + print "Starting installer, one moment..." + setupPythonPath()
# Allow a file to be loaded as early as possible @@ -708,6 +710,13 @@ if __name__ == "__main__": from pyanaconda import vnc from pyanaconda import kickstart
+ print "anaconda %s for %s %s%s started." % ( + getAnacondaVersion(), + product.productName, + product.productVersion, + " (pre-release)" if not product.isFinal else "", + ) + # to set UTF8 mode on the terminal, we need LANG to be set usefully if os.environ.get("LANG", "C") == "C": os.environ['LANG'] = DEFAULT_LANG
@@ -708,6 +710,13 @@ if __name__ == "__main__": from pyanaconda import vnc from pyanaconda import kickstart
- print "anaconda %s for %s %s%s started." % (
getAnacondaVersion(),product.productName,product.productVersion," (pre-release)" if not product.isFinal else "",)- # to set UTF8 mode on the terminal, we need LANG to be set usefully if os.environ.get("LANG", "C") == "C": os.environ['LANG'] = DEFAULT_LANG
I'm still not a fan of that syntax.
- Chris
On Thu, 2012-07-19 at 10:25 -0400, Chris Lumens wrote:
@@ -708,6 +710,13 @@ if __name__ == "__main__": from pyanaconda import vnc from pyanaconda import kickstart
- print "anaconda %s for %s %s%s started." % (
getAnacondaVersion(),product.productName,product.productVersion," (pre-release)" if not product.isFinal else "",)- # to set UTF8 mode on the terminal, we need LANG to be set usefully if os.environ.get("LANG", "C") == "C": os.environ['LANG'] = DEFAULT_LANG
I'm still not a fan of that syntax.
It's basically the C ternary conditional operator, but reordered:
cond ? a : b → a if cond else b
but then, lots of people aren't fans of the C operator either, so I can understand that.
So, which would be better:
prerel = "" if product.isFinal: prerel = " (pre-release)" print "anaconda %s for %s %s%s started." % ( getAnacondaVersion(), product.productName, product.productVersion, prerel, )
Or:
verdesc = "%s for %s %s" % (getAnacondaVersion(), product.productName, product.productVersion) if product.isFinal: print "anaconda %s started." % verdesc else: print "anaconda %s (pre-release) started." % verdesc
I think I prefer the latter.
-w
So, which would be better:
prerel = "" if product.isFinal: prerel = " (pre-release)" print "anaconda %s for %s %s%s started." % ( getAnacondaVersion(), product.productName, product.productVersion, prerel, )Or:
verdesc = "%s for %s %s" % (getAnacondaVersion(), product.productName, product.productVersion) if product.isFinal: print "anaconda %s started." % verdesc else: print "anaconda %s (pre-release) started." % verdescI think I prefer the latter.
Me too.
Though, this just occurred to me - do you expect this string to ever be translated? It's possible, because one could specify inst.lang= on the command line.
- Chris
On Thu, 2012-07-19 at 11:50 -0400, Chris Lumens wrote:
verdesc = "%s for %s %s" % (getAnacondaVersion(), product.productName, product.productVersion) if product.isFinal: print "anaconda %s started." % verdesc else: print "anaconda %s (pre-release) started." % verdescI think I prefer the latter.
Me too.
Though, this just occurred to me - do you expect this string to ever be translated? It's possible, because one could specify inst.lang= on the command line.
I don't expect it to be translated. There's only two words there to translate:
1) "started", which is unnecessary because the appearance of the message itself carries the same meaning ("Things are Happening!") 2) "pre-release", which will be fully explained in the user's native language by the betanag popup.
I'll send a new patch shortly.
-w
Print a couple of messages as anaconda starts up so the user isn't confused about what's happening after the screen goes dark. --- anaconda | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/anaconda b/anaconda index fc679c9..d6650a9 100755 --- a/anaconda +++ b/anaconda @@ -646,6 +646,8 @@ def prompt_for_ssh():
if __name__ == "__main__": + print "Starting installer, one moment..." + setupPythonPath()
# Allow a file to be loaded as early as possible @@ -708,6 +710,13 @@ if __name__ == "__main__": from pyanaconda import vnc from pyanaconda import kickstart
+ verdesc = "%s for %s %s" % (getAnacondaVersion(), + product.productName, product.productVersion) + if product.isFinal: + print "anaconda %s started." + else: + print "anaconda %s (pre-release) started." + # to set UTF8 mode on the terminal, we need LANG to be set usefully if os.environ.get("LANG", "C") == "C": os.environ['LANG'] = DEFAULT_LANG
anaconda-patches@lists.fedorahosted.org