From b1df563bfa6919d074a4216fc7d408c965a0c0df Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Mar 19 2009 20:26:05 +0000 Subject: - Set retval to 1 if we get an error, to make life easier for folks who wrap dvgrab to tell if something went wrong (#486061). --- diff --git a/dvgrab-3.4-set-proper-retval-on-failure.patch b/dvgrab-3.4-set-proper-retval-on-failure.patch new file mode 100644 index 0000000..eeb095a --- /dev/null +++ b/dvgrab-3.4-set-proper-retval-on-failure.patch @@ -0,0 +1,33 @@ +Set retval to 1 if we get an error, to make life easier for folks +who wrap dvgrab to tell if something went wrong (rhbz #486061). + +Signed-off-by: Jarod Wilson + +--- dvgrab-3.4/main.cc.orig 2009-03-19 16:12:55.417171454 -0400 ++++ dvgrab-3.4/main.cc 2009-03-19 16:12:22.321109256 -0400 +@@ -93,6 +93,8 @@ int rt_raisepri (int pri) + + int main( int argc, char *argv[] ) + { ++ int ret = 0; ++ + fcntl( fileno( stderr ), F_SETFL, O_NONBLOCK ); + try + { +@@ -137,13 +139,15 @@ int main( int argc, char *argv[] ) + { + fprintf( stderr, "Error: %s\n", s.c_str() ); + fflush( stderr ); ++ ret = 1; + } + catch ( ... ) + { + fprintf( stderr, "Error: unknown\n" ); + fflush( stderr ); ++ ret = 1; + } + + fprintf( stderr, "\n" ); +- return 0; ++ return ret; + } diff --git a/dvgrab.spec b/dvgrab.spec index 1008693..1264d9c 100644 --- a/dvgrab.spec +++ b/dvgrab.spec @@ -1,12 +1,13 @@ Summary: Utility to capture video from a DV camera Name: dvgrab Version: 3.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.kinodv.org/ Source: http://dl.sf.net/kino/dvgrab-%{version}.tar.gz Patch0: dvgrab-3.3-fix-gcc-4.4-build.patch +Patch1: dvgrab-3.4-set-proper-retval-on-failure.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libraw1394-devel libavc1394-devel libdv-devel BuildRequires: libiec61883-devel libjpeg-devel @@ -19,6 +20,7 @@ The dvgrab utility will capture digital video from a DV source on the firewire %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %configure @@ -38,6 +40,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/dvgrab.1* %changelog +* Thu Mar 19 2009 Jarod Wilson - 3.4-2 +- Set retval to 1 if we get an error, to make life easier for folks + who wrap dvgrab to tell if something went wrong (#486061). + * Tue Feb 24 2009 Jarod Wilson - 3.4-1 - New upstream release, v3.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild