From 9729e464a4b67d6d1158c837b8e52194529ad31c Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen (Fedora Unity) 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 should be included (True, default), or whether all builds of a package tagged with 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