Bug 14650

Summary: RPM task with -b in command broken on RH8.0
Product: Ant Reporter: Cary Clark <cary>
Component: Optional TasksAssignee: Ant Notifications List <notifications>
Status: RESOLVED FIXED    
Severity: normal CC: josevnz, matthewli, notifications, ville.skytta
Priority: P5 Keywords: PatchAvailable
Version: 1.5.1   
Target Milestone: 1.6   
Hardware: All   
OS: Linux   

Description Cary Clark 2002-11-18 21:10:01 UTC
Since Redhat has now finalized the split between the installing/querying and 
building parts of rpm into rpm and rpmbuild, the Rpm ant task no longer works 
when using -b in the command. The message is "-b: unknown option". Possible to 
create task Rpmbuild? I might be able to help with a first pass of this, I have 
a little experience writing my own tasks and I think this should be a fairly 
straightforward "copy-with-tweaks" of the Rpm task.
Comment 1 Cary Clark 2002-11-18 21:18:01 UTC
fixed OS and Priority values
Comment 2 Conor MacNeill 2003-01-23 13:38:40 UTC
Sure - give it a go.

Whatever happened to backward compatability :-)

Rather than a new task, I'd probably suggest using an attribute to select in the
existing rpm task
Comment 3 Stefan Bodewig 2003-03-18 09:37:06 UTC
*** Bug 18071 has been marked as a duplicate of this bug. ***
Comment 4 Jesse 2003-04-08 17:59:56 UTC
*** Bug 18826 has been marked as a duplicate of this bug. ***
Comment 5 Ville Skyttä 2003-04-08 18:41:00 UTC
Please consider applying attachment 5711 [details] from bug 18826 to resolve this.
Comment 6 Jesse 2003-04-08 19:13:20 UTC
While that patch may resolve the issue for some users of rpm it breaks builds
for users of older versions of rpm.

If we can't determine the correct command to use 'rpm' vs 'rpmbuild' then the
default should be rpm, not rpmbuild as not to breaks existing builds.

I'll look into determining the command to use based on version of rpm installed.

Jesse
Comment 7 Ville Skyttä 2003-04-08 20:37:00 UTC
Ok.  AFAIK, instead of looking into the version of rpm, it should suffice to
check whether the "rpmbuild" command exists, and use it if it does, else fall
back to "rpm".  That should work for everyone (but my patch might still be
useful for people who eg. don't have either of these in PATH...).  Thanks for
looking into this.
Comment 8 Stefan Bodewig 2003-05-13 05:46:29 UTC
If there was a test case I'd be a good guinea pig for backwards compatibility
as I'm still using RedHat 7.x - and I do have access to a RedHat 8.0 box.
Comment 9 Stefan Bodewig 2003-05-13 07:24:21 UTC
OK, the CVS HEAD version of now and starting with nightly build 2003-05-14
the rpm task is supposed to auto-detect rpmbuild if it is in the PATH.  It also
has the new attribute Ville provided in his patch to explicitly specify the
command.

I'd very much appreciate if you could verify that the autodiscovery works as it
is more or less untested.
Comment 10 Ville Skyttä 2003-05-13 19:43:33 UTC
I built 1.6alpha from CVS a couple of minutes ago and the rpm task autodetects
rpmbuild on my RH9 box correctly, and the task works.  I don't have an old box
that wouldn't have the rpmbuild command to test the fallback to "rpm" command.  

Anyway, I'm happy now, Thanks a bunch, Stefan! :)
Comment 11 J.M. (Martijn) Kruithof 2003-07-27 19:56:19 UTC
*** Bug 16162 has been marked as a duplicate of this bug. ***