[PATCH koji] Allow untracked packages in the buildroot
Mike McLean
mikem at redhat.com
Mon May 7 21:43:58 UTC 2007
Enrico Scholz wrote:
> When using koji to build a local repository, it is often unwanted to
> import the >4000 packages of Fedora 6/7. Although direct support for this
> mode is missing, it is easy to add it (e.g. I use a wrapper around mock
> which generates a new configuration with additional repositories).
>
> Unfortunately, koji will refuse to build packages because buildroot
> contains untracked packages. This patch makes koji ignore such packages.
Such refusal is deliberate and a design goal of Koji. That goal is
reproducibility. Note that the other implicit feature (building from a
repository that was not generated by koji) is also contrary to this goal.
If you're going to the trouble of generating a custom repo, perhaps you
should just skip koji and use mock directly.
> Signed-off-by: Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de>
> ---
> hub/kojihub.py | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/hub/kojihub.py b/hub/kojihub.py
> index 2830ad1..a3bbe5f 100644
> --- a/hub/kojihub.py
> +++ b/hub/kojihub.py
> @@ -5565,7 +5565,12 @@ class BuildRoot(object):
> VALUES (%(brootid)s,%(rpm_id)s,%(update)s)"""
> rpm_ids = []
> for an_rpm in rpmlist:
> - rpm_id = get_rpm(an_rpm, strict=True)['id']
> + rpm_id = get_rpm(an_rpm, strict=False)
> + if rpm_id == None:
> + #ignore unknown packages (e.g. from untracked repositories)
> + continue
> +
> + rpm_id = rpm_id['id']
> if update and current.has_key(rpm_id):
> #ignore duplicate packages for updates
> continue
More information about the buildsys
mailing list