summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/packaging/rpm.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/packaging/rpm.py')
-rw-r--r--src/engine/SCons/Tool/packaging/rpm.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/engine/SCons/Tool/packaging/rpm.py b/src/engine/SCons/Tool/packaging/rpm.py
index f7a6e45..f7e2577 100644
--- a/src/engine/SCons/Tool/packaging/rpm.py
+++ b/src/engine/SCons/Tool/packaging/rpm.py
@@ -25,7 +25,7 @@ The rpm packager.
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Tool/packaging/rpm.py rel_2.3.5:3347:d31d5a4e74b6 2015/07/31 14:36:10 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/packaging/rpm.py rel_2.4.0:3365:9259ea1c13d7 2015/09/21 14:03:43 bdbaddog"
import os
@@ -130,8 +130,7 @@ def build_specfile(target, source, env):
""" Builds a RPM specfile from a dictionary with string metadata and
by analyzing a tree of nodes.
"""
- file = open(target[0].abspath, 'w')
- str = ""
+ file = open(target[0].get_abspath(), 'w')
try:
file.write( build_specfile_header(env) )
@@ -279,7 +278,9 @@ def build_specfile_filesection(spec, files):
tags = {}
for k in supported_tags.keys():
try:
- tags[k]=getattr(file, k)
+ v = file.GetTag(k)
+ if v:
+ tags[k] = v
except AttributeError:
pass
@@ -287,7 +288,7 @@ def build_specfile_filesection(spec, files):
str = str + SimpleTagCompiler(supported_tags, mandatory=0).compile( tags )
str = str + ' '
- str = str + file.PACKAGING_INSTALL_LOCATION
+ str = str + file.GetTag('PACKAGING_INSTALL_LOCATION')
str = str + '\n\n'
return str