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.
This commit is contained in:
Fatih Aşıcı
2010-10-06 20:33:28 +00:00
parent bbf1446f0a
commit 51a9e580b8
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -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
+1
View File
@@ -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]
+2
View File
@@ -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