diff options
author | Adam Stokes <ajs@redhat.com> | 2010-07-29 09:10:00 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2012-01-16 20:54:25 +0000 |
commit | de0f14aaf6750a5191be57247f950ff40eed78d4 (patch) | |
tree | 12a361c4facc1ea771523aa207f9bd6bdca2d4fa | |
parent | 3cba334b7213d962682ae6967a93e4bb2e326860 (diff) | |
download | sos-rhel-6.0.tar.gz |
Set SOSVERSION during build to ensure it is reported correctlyrhel-6.0
Resolves: bz585942
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | sos/__init__.py.in (renamed from sos/__init__.py) | 1 | ||||
-rwxr-xr-x | sos/sosreport.py | 2 |
3 files changed, 3 insertions, 1 deletions
@@ -37,6 +37,7 @@ install: install -m644 LICENSE README TODO $(DESTDIR)/usr/share/$(NAME)/. install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf install -m644 gpgkeys/rhsupport.pub $(DESTDIR)/usr/share/$(NAME)/. + sed 's/@SOSVERSION@/$(VERSION)/g'<sos/__init__.py.in >sos/__init__.py for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done $(NAME)-$(VERSION).tar.gz: clean gpgkey diff --git a/sos/__init__.py b/sos/__init__.py.in index 335332b1..64b87506 100644 --- a/sos/__init__.py +++ b/sos/__init__.py.in @@ -22,5 +22,6 @@ gettext_app = "sos" gettext.bindtextdomain(gettext_app, gettext_dir) +__version__="@SOSVERSION@" def _sos(msg): return gettext.dgettext(gettext_app, msg) diff --git a/sos/sosreport.py b/sos/sosreport.py index a5685b9e..ccacdff4 100755 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -46,8 +46,8 @@ from itertools import * from collections import deque from sos import _sos as _ +from sos import __version__ -__version__ = 2.1 if os.path.isfile('/etc/fedora-release'): __distro__ = 'Fedora' else: |