From 35f1168734174d59151ced7f467d0856aea44dbc Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sat, 27 Oct 2007 10:39:29 +0200 Subject: [PATCH] Allow untracked packages in the buildroot 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. Signed-off-by: Enrico Scholz --- hub/kojihub.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index e2357a4..9a87653 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -5623,7 +5623,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 -- 1.5.5.1