diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2013-03-01 01:07:05 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-02-26 13:38:16 +0100 |
commit | 2964ebc7c67e3b36a3ea6ed1cddaa1a85b5e9fe2 (patch) | |
tree | fda66158f5ec6a7f686f6a1389096f0886f9c18c | |
parent | b7258f6dd8c30a4f4ce8149d2e83d4d76f493ea2 (diff) | |
download | bcfg2-2964ebc7c67e3b36a3ea6ed1cddaa1a85b5e9fe2.tar.gz bcfg2-2964ebc7c67e3b36a3ea6ed1cddaa1a85b5e9fe2.tar.bz2 bcfg2-2964ebc7c67e3b36a3ea6ed1cddaa1a85b5e9fe2.zip |
Packages/Apt: add pin attribute for extra pinning information
-rw-r--r-- | schemas/packages.xsd | 9 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Packages/Source.py | 6 |
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, |