summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--schemas/packages.xsd9
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Source.py6
2 files changed, 14 insertions, 1 deletions
diff --git a/schemas/packages.xsd b/schemas/packages.xsd
index be8595fe2..e1d9a3945 100644
--- a/schemas/packages.xsd
+++ b/schemas/packages.xsd
@@ -230,6 +230,15 @@
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
+ <xsd:attribute type="xsd:string" name="pin">
+ <xsd:annotation>
+ <xsd:documentation>
+ Extra information for pinning. This information is used
+ to differ between the sources. Should be used in the
+ supported format of apt.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
</xsd:complexType>
<xsd:complexType name="PackagesGroupType">
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
index d186be04f..7edbf44b4 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Source.py
@@ -215,6 +215,9 @@ class Source(Bcfg2.Server.Plugin.Debuggable): # pylint: disable=R0902
#: The "name" attribute from :attr:`xsource`
self.name = xsource.get('name', '')
+ #: The "priority" attribute from :attr:`xsource`
+ self.pin = xsource.get('pin', '')
+
#: A list of predicates that are used to determine if this
#: source applies to a given
#: :class:`Bcfg2.Server.Plugins.Metadata.ClientMetadata`
@@ -290,7 +293,8 @@ class Source(Bcfg2.Server.Plugin.Debuggable): # pylint: disable=R0902
for arch in self.arches:
if self.url:
usettings = [dict(version=self.version, component=comp,
- arch=arch, priority=self.priority)
+ arch=arch, priority=self.priority,
+ pin=self.pin)
for comp in self.components]
else: # rawurl given
usettings = [dict(version=self.version, component=None,