summaryrefslogtreecommitdiff
path: root/scripts/install.py
diff options
context:
space:
mode:
authorAaron Brashears <aaronb@lindenlab.com>2008-12-29 18:55:00 +0000
committerAaron Brashears <aaronb@lindenlab.com>2008-12-29 18:55:00 +0000
commitc52e69093393af8b357059e09828020faefee518 (patch)
tree2af11e780b35204b1c6153cb2991b53c4d8fb082 /scripts/install.py
parentfb793870fe95f1951d7c30ea6068e187b9dededd (diff)
make it easer for developers to examine list output by sorting the results prior to display. DEV-25457
Diffstat (limited to 'scripts/install.py')
-rwxr-xr-xscripts/install.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/scripts/install.py b/scripts/install.py
index d72d81868d..83e41e52d4 100755
--- a/scripts/install.py
+++ b/scripts/install.py
@@ -80,6 +80,18 @@ from sets import Set as set, ImmutableSet as frozenset
from indra.base import llsd
from indra.util import helpformatter
+# *HACK: Necessary for python 2.3. Consider removing this code wart
+# after etch has deployed everywhere. 2008-12-23 Phoenix
+try:
+ sorted = sorted
+except NameError:
+ def sorted(in_list):
+ "Return a list which is a sorted copy of in_list."
+ # Copy the source to be more functional and side-effect free.
+ out_list = copy.copy(in_list)
+ out_list.sort()
+ return out_list
+
class InstallFile(object):
"This is just a handy way to throw around details on a file in memory."
def __init__(self, pkgname, url, md5sum, cache_dir, platform_path):
@@ -309,7 +321,7 @@ class Installer(object):
def list_installables(self):
"Return a list of all known installables."
- return self._installables.keys()
+ return sorted(self._installables.keys())
def detail_installable(self, name):
"Return a installable definition detail"
@@ -317,7 +329,7 @@ class Installer(object):
def list_licenses(self):
"Return a list of all known licenses."
- return self._licenses.keys()
+ return sorted(self._licenses.keys())
def detail_license(self, name):
"Return a license definition detail"
@@ -325,7 +337,7 @@ class Installer(object):
def list_installed(self):
"Return a list of installed packages."
- return self._installed.keys()
+ return sorted(self._installed.keys())
def detail_installed(self, name):
"Return file list for specific installed package."