[sysadmin-bin] Consider all install formats (+ tar.gz) when creating LATEST-IS
- From: Olav Vitters <ovitters src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Consider all install formats (+ tar.gz) when creating LATEST-IS
- Date: Mon, 6 Jun 2011 09:53:43 +0000 (UTC)
commit b243e1f2992f1cc7f27c042568dce1dbaef131ef
Author: Frédéric Péters <fpeters 0d be>
Date: Mon Jun 6 11:28:13 2011 +0200
Consider all install formats (+ tar.gz) when creating LATEST-IS
https://bugzilla.gnome.org/show_bug.cgi?id=651969
ftpadmin | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/ftpadmin b/ftpadmin
index 07cddbc..1050bf4 100755
--- a/ftpadmin
+++ b/ftpadmin
@@ -964,11 +964,13 @@ Install %s? [Y/n]""" % self.module,
print ", done"
sys.stdout.write(' - Updating LATEST-IS')
- latest = '%s-%s.%s' % (self.module, self.version, 'tar.gz')
- if os.path.exists(os.path.join(self.destination, latest)):
- for fn in glob.glob(os.path.join(self.destination, 'LATEST-IS-*')):
- os.remove(fn)
- os.symlink(latest, os.path.join(self.destination, 'LATEST-IS-%s' % self.version))
+ for extension in self.INSTALL_FORMATS + ('tar.gz',):
+ latest = '%s-%s.%s' % (self.module, self.version, extension)
+ if os.path.exists(os.path.join(self.destination, latest)):
+ for fn in glob.glob(os.path.join(self.destination, 'LATEST-IS-*')):
+ os.remove(fn)
+ os.symlink(latest, os.path.join(self.destination, 'LATEST-IS-%s' % self.version))
+ break
print ", done"
finally:
# cleanup temporary directory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]