summaryrefslogtreecommitdiffstats
path: root/BuildManager/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'BuildManager/package.py')
-rw-r--r--BuildManager/package.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/BuildManager/package.py b/BuildManager/package.py
index 031e36e..1c88bd3 100644
--- a/BuildManager/package.py
+++ b/BuildManager/package.py
@@ -26,15 +26,15 @@ def subst(s, vars):
raise Error("variable $%s not declared" % var)
class Package:
- def __init__(self, file, log=None):
+ def __init__(self, file, log=None, flag=False):
self._package = None
ext = self._filename_extension(file)
if not ext:
raise Error("unknown file extension of "+file)
if "_package_"+ext not in globals():
raise Error("unknown package extension of "+file)
- self._package = globals()["_package_"+ext](file, log)
-
+ self._package = globals()["_package_"+ext](file, log, flag)
+
def __getattr__(self, name):
return getattr(self._package, name)
@@ -47,7 +47,7 @@ class Package:
return filename[dotpos+1:]
class _package:
- def __init__(self, file, log):
+ def __init__(self, file, log, flag):
self.file = file
self.absfile = os.path.abspath(file)
self.type = None
@@ -58,6 +58,7 @@ class _package:
self.spec = None
self.builddir = None
self.log = log or "$builddir/SPECS/log.$name"
+ self.flag = flag or False
self._init()
def __cmp__(self, pkg):
@@ -150,6 +151,8 @@ class _package_rpm(_package):
h = rpm.headerFromPackage(file.fileno())[0]
else:
ts = rpm.TransactionSet()
+ if self.flag:
+ ts.setVSFlags(-1)
h = ts.hdrFromFdno(file.fileno())
file.close()
self.name = h[rpm.RPMTAG_NAME]