From 51a9e580b81d14b8a45da46e1f6e27e0932c132b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Wed, 6 Oct 2010 20:33:28 +0000 Subject: [PATCH] build: Hold an identifier for the host the package is built on This can be changed using build_host option in pisi.conf. The default value is "localhost". This can be used to distinguish buildfarm packages and the packages built by the user. --- pisi/configfile.py | 1 + pisi/metadata.py | 1 + pisi/operations/build.py | 2 ++ 3 files changed, 4 insertions(+) diff --git a/pisi/configfile.py b/pisi/configfile.py index cb0126e5..554f0e1a 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -80,6 +80,7 @@ class GeneralDefaults: class BuildDefaults: """Default values for [build] section""" + build_host = "localhost" host = "i686-pc-linux-gnu" jobs = "-j3" generateDebug = False diff --git a/pisi/metadata.py b/pisi/metadata.py index f3aa3807..5c72ca4a 100644 --- a/pisi/metadata.py +++ b/pisi/metadata.py @@ -46,6 +46,7 @@ class Package(specfile.Package, xmlfile.XmlFile): __metaclass__ = autoxml.autoxml t_Build = [ autoxml.Integer, autoxml.optional] + t_BuildHost = [autoxml.String, autoxml.optional] t_Distribution = [ autoxml.String, autoxml.mandatory] t_DistributionRelease = [ autoxml.String, autoxml.mandatory] t_Architecture = [ autoxml.String, autoxml.mandatory] diff --git a/pisi/operations/build.py b/pisi/operations/build.py index 66a3987b..a6418c70 100644 --- a/pisi/operations/build.py +++ b/pisi/operations/build.py @@ -831,6 +831,8 @@ class Builder: metadata = pisi.metadata.MetaData() metadata.from_spec(self.spec.source, package, self.spec.history) + metadata.package.buildHost = ctx.config.values.build.build_host + metadata.package.distribution = ctx.config.values.general.distribution metadata.package.distributionRelease = ctx.config.values.general.distribution_release metadata.package.architecture = ctx.config.values.general.architecture