diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-23 16:55:05 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-23 16:55:05 +0200 |
commit | d240a76169c685e488fe7352adec69d39c60ef9f (patch) | |
tree | 144aeb4702d258b0cfaf99cffb9f21e94b026459 /src/engine/SCons/Tool/packaging/ipk.py | |
parent | 6ca68f29862bc7cbe5428426eee600cb1f3c05c1 (diff) | |
parent | c2d9eaeffe9d77d8d5087fb21a3256fde32047d4 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/engine/SCons/Tool/packaging/ipk.py')
-rw-r--r-- | src/engine/SCons/Tool/packaging/ipk.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/engine/SCons/Tool/packaging/ipk.py b/src/engine/SCons/Tool/packaging/ipk.py index 60cd3cb..dbf5be8 100644 --- a/src/engine/SCons/Tool/packaging/ipk.py +++ b/src/engine/SCons/Tool/packaging/ipk.py @@ -3,7 +3,7 @@ # # Copyright (c) 2001 - 2019 The SCons Foundation -# +# # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 103260fce95bf5db1c35fb2371983087d85dd611 2019-07-13 18:25:30 bdbaddog" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan" import os @@ -117,17 +117,17 @@ def build_specfiles(source, target, env): # # opened_files={} - def open_file(needle, haystack): + def open_file(needle, haystack=None): try: return opened_files[needle] except KeyError: files = filter(lambda x: x.get_path().rfind(needle) != -1, haystack) # Py3: filter returns an iterable, not a list file = list(files)[0] - opened_files[needle]=open(file.get_abspath(), 'w') + opened_files[needle] = open(file.get_abspath(), 'w') return opened_files[needle] - control_file=open_file('control', target) + control_file = open_file('control', target) if 'X_IPK_DESCRIPTION' not in env: env['X_IPK_DESCRIPTION']="%s\n %s"%(env['SUMMARY'], @@ -149,7 +149,7 @@ Description: $X_IPK_DESCRIPTION control_file.write(env.subst(content)) # - # now handle the various other files, which purpose it is to set post-, + # now handle the various other files, which purpose it is to set post-, # pre-scripts and mark files as config files. # # We do so by filtering the source files for files which are marked with @@ -161,14 +161,14 @@ Description: $X_IPK_DESCRIPTION # into the same named file. # for f in [x for x in source if 'PACKAGING_CONFIG' in dir(x)]: - config=open_file('conffiles') + config = open_file('conffiles') config.write(f.PACKAGING_INSTALL_LOCATION) config.write('\n') for str in 'POSTRM PRERM POSTINST PREINST'.split(): name="PACKAGING_X_IPK_%s"%str for f in [x for x in source if name in dir(x)]: - file=open_file(name) + file = open_file(name) file.write(env[str]) # |