On Tue, 2011-02-08 at 12:16 -0200, Cleber Rosa wrote:
> Users of KojiDownloader usually rely on architecture detection
> to find an RPM package to download. In some cases, the package
> the user is trying to find is actually architecture independent.
>
> This patch adds another try with arch=noarch as a fallback when
> the platform specific packages are not found.
>
> Signed-off-by: Cleber Rosa <[email protected]>
> ---
> client/tests/kvm/kvm_utils.py | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
> index d8d3357..bb0ea36 100644
> --- a/client/tests/kvm/kvm_utils.py
> +++ b/client/tests/kvm/kvm_utils.py
> @@ -1652,6 +1652,14 @@ class KojiDownloader(object):
>
> rpms = self.session.listRPMs(buildID=info['id'],
> arches=arch)
> +
> + if not rpms:
> + logging.info("Attempting to find platform independent package "
> + "(arch=noarch)")
^ Did you verify if 'info' level is appropriate here? I mean, if 'info'
is preferable over 'debug' for example
> + arch = "noarch"
> + rpms = self.session.listRPMs(buildID=info['id'],
> + arches=arch)
> +
> if not rpms:
> raise ValueError("No %s packages available for %s" %
> arch, koji.buildLabel(info))
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest