From a1d411fafa0d3b212d98f0230c9b650ab5a1cc7a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Feb 11 2011 09:18:26 +0000 Subject: Patch fix spec parsing. --- diff --git a/0001-Don-t-error-out-just-from-stderr-from-rpm.patch b/0001-Don-t-error-out-just-from-stderr-from-rpm.patch new file mode 100644 index 0000000..785c74d --- /dev/null +++ b/0001-Don-t-error-out-just-from-stderr-from-rpm.patch @@ -0,0 +1,35 @@ +From 9ff587cf36f042f12e8c350f8897b13690a984fd Mon Sep 17 00:00:00 2001 +From: Jesse Keating +Date: Fri, 11 Feb 2011 02:15:18 -0700 +Subject: [PATCH] Don't error out just from stderr from rpm + +Rpm can be bitchy, but also return 0, so handle that. Also try to do +something meaningful / useful with the error output. +--- + src/pyfedpkg/__init__.py | 10 +++++++++- + 1 files changed, 9 insertions(+), 1 deletions(-) + +diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py +index 3bb414d..a9d090f 100644 +--- a/src/pyfedpkg/__init__.py ++++ b/src/pyfedpkg/__init__.py +@@ -109,7 +109,15 @@ def _name_from_spec(spec): + except OSError, e: + raise FedpkgError(e) + if error: +- raise FedpkgError(error) ++ if sys.stdout.isatty(): ++ sys.stderr.write(error) ++ else: ++ # Yes, we could wind up sending error output to stdout in the ++ # case of no local tty, but I don't have a better way to do this. ++ log.info(error) ++ if proc.returncode: ++ raise FedpkgError('Could not parse the spec, exited %s' % ++ proc.returncode) + return output.split()[0] + + def _run_command(cmd, shell=False, env=None, pipe=[], cwd=None): +-- +1.7.4 + diff --git a/fedora-packager.spec b/fedora-packager.spec index 3a770a7..ed62ca2 100644 --- a/fedora-packager.spec +++ b/fedora-packager.spec @@ -4,7 +4,7 @@ Name: fedora-packager Version: 0.5.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tools for setting up a fedora maintainer environment Group: Applications/Productivity @@ -24,6 +24,7 @@ Requires: fedora-cert = %{version}-%{release} Requires: ykpers BuildArch: noarch +Patch0: 0001-Don-t-error-out-just-from-stderr-from-rpm.patch %description Set of utilities useful for a fedora packager in setting up their environment. @@ -58,6 +59,7 @@ Provides fedora-cert and the fedora_cert python library %prep %setup -q +%patch0 -p1 %build %configure @@ -96,6 +98,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 11 2011 Jesse Keating - 0.5.5.0-2 +- Patch fix spec parsing. + * Wed Feb 09 2011 Jesse Keating - 0.5.5.0-1 - Re-add 'lint' command hookup into argparse magic (hun) - Catch errors parsing spec to get name. (#676383) (jkeating)