[PATCH 1/1] Mash: Either the latest in a tag, or all
Jeroen van Meeuwen
kanarip at kanarip.com
Mon Jan 11 16:48:17 UTC 2010
Hi there,
this patch provides the capability to configure whether only the latest
build of a package tagged with <tag> should be included in the mash, or
whether all builds of a package tagged with <tag> should be included (and
thus be available in the repository).
-- Jeroen
-------------- next part --------------
From 9729e464a4b67d6d1158c837b8e52194529ad31c Mon Sep 17 00:00:00 2001
From: Jeroen van Meeuwen (Fedora Unity) <kanarip at fedoraunity.org>
Date: Mon, 11 Jan 2010 17:41:12 +0100
Subject: [PATCH] Add configuration option "latest";
The latest option controls whether only the latest build from a
package tagged with <tag> should be included (True, default), or
whether all builds of a package tagged with <tag> should be
included.
---
mash/__init__.py | 3 ++-
mash/config.py | 3 +++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py
index 9a0c4aa..d6fee3c 100644
--- a/mash/__init__.py
+++ b/mash/__init__.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
@@ -282,7 +283,7 @@ class Mash:
# Get package list. This is an expensive operation.
self.logger.info("Getting package lists for %s..." % (self.config.tag))
- (pkglist, buildlist) = self.session.listTaggedRPMS(self.config.tag, inherit = self.config.inherit, latest = True, rpmsigs = True)
+ (pkglist, buildlist) = self.session.listTaggedRPMS(self.config.tag, inherit = self.config.inherit, latest = self.config.latest, rpmsigs = True)
# filter by key
biglist = PackageList(self.config)
for pkg in pkglist:
diff --git a/mash/config.py b/mash/config.py
index 66ce2cd..253ec0d 100644
--- a/mash/config.py
+++ b/mash/config.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
@@ -45,6 +46,7 @@ class MashConfig(config.BaseConfig):
delta = config.BoolOption(False)
delta_dirs = config.ListOption()
make_ancient = config.BoolOption(False)
+ latest = config.BoolOption(True)
distro_tags = config.Option()
content_tags = config.ListOption()
distros = []
@@ -77,6 +79,7 @@ class MashDistroConfig(config.BaseConfig):
delta = config.Inherit(MashConfig.delta)
delta_dirs = config.Inherit(MashConfig.delta_dirs)
make_ancient = config.Inherit(MashConfig.make_ancient)
+ latest = config.Inherit(MashConfig.latest)
distro_tags = config.Inherit(MashConfig.distro_tags)
content_tags = config.Inherit(MashConfig.content_tags)
hash_packages = config.BoolOption(False)
--
1.6.5.2
More information about the buildsys
mailing list