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:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user