[sysadmin-bin] py-install-module: add a sudo subcommand and refresh module information at the right time
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] py-install-module: add a sudo subcommand and refresh module information at the right time
- Date: Tue, 8 Mar 2011 23:53:48 +0000 (UTC)
commit 958c9ee13fd159e18fdf93b1e161de9fca998c3b
Author: Olav Vitters <olav vitters nl>
Date: Wed Mar 9 00:53:37 2011 +0100
py-install-module: add a sudo subcommand and refresh module information at the right time
py-install-module | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/py-install-module b/py-install-module
index 2b654c0..8e9e0cc 100755
--- a/py-install-module
+++ b/py-install-module
@@ -356,9 +356,6 @@ class ModuleInfo(BasicInfo):
else:
force_refresh=True
-# if DEBUG and not force_refresh:
-# force_refresh = True
-
if force_refresh and os.path.exists(self.FTPROOT):
curdir = os.getcwd()
try:
@@ -668,6 +665,10 @@ script to gnome-sysadmin gnome org Thanks."""
else:
print "DEBUG: Not removing temporary directory: %s" % tmpdir
+ sys.stdout.write(" - Updating known versions")
+ self.moduleinfo.refresh()
+ print ", done"
+
self.inform()
return True
@@ -759,7 +760,7 @@ script to gnome-sysadmin gnome org Thanks."""
print ", done"
sys.stdout.write(" - Adding new version to GNOME Bugzilla")
- cmd = ['/usr/bin/curl', '-L', 'https://bugzilla.gnome.org/add-version.cgi?%s|%s' % (self.module, self.version)]
+ cmd = ['/usr/bin/curl', '-q', '-L', 'https://bugzilla.gnome.org/add-version.cgi?%s|%s' % (self.module, self.version)]
self._call_cmd(cmd)
sys.stdout.write(" - Triggering ftp.gnome.org update")
@@ -877,11 +878,17 @@ def cmd_show_info(options, args, parser):
print "\t".join((module, version, changed, ", ".join(moduleinfo.maintainers)))
+def cmd_sudo(options, args, parser):
+ print "ERROR: Not yet implemented!"
+ sys.exit(2)
+
+
DEFAULT_COMMAND='install'
COMMANDS={
'install': cmd_install,
- 'show-info': cmd_show_info
+ 'show-info': cmd_show_info,
+ 'sudo': cmd_sudo
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]