From b83f8d6435295a0e56bb1b110c3d39e93fd332e3 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 13 Jan 2003 07:01:40 +0000 Subject: productname and productversion are now defined by passing args to buildinstall so that we don't have them hard coded in the package. they end up in /.buildstamp along with the timestamp for the image. add support for substituting @RHL@ and @RHLVER@ in the help with the product name or version to avoid having to change the help unless its needed --- product.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 product.py (limited to 'product.py') diff --git a/product.py b/product.py new file mode 100644 index 000000000..9287d03c7 --- /dev/null +++ b/product.py @@ -0,0 +1,28 @@ +# +# product.py: product identification string +# +# Copyright 2003 Red Hat, Inc. +# +# This software may be freely redistributed under the terms of the GNU +# library public license. +# +# You should have received a copy of the GNU Library Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +import os + +if not os.access("/.buildstamp", os.R_OK): + productName = "anaconda" + productVersion = "blueskyb" +else: + f = open("/.buildstamp", "r") + lines = f.readlines() + if len(lines) < 3: + productName = "anaconda" + productVersion = "bluesky" + else: + productName = lines[1][:-1] + productVersion = lines[2][:-1] + + -- cgit