• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Uninstalling with ANT's RPM target

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Can we uninstall a package from an ant's script. If yes, how?
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://ant.apache.org/manual/Tasks/rpm.html lists the capabilities.
 
Fawad Ali
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Verburg,
Thanks. Actually I have seen that page earlier. There is a task named "command". That seems helpful to me. But the thing is that we need to include the spec file in each step as it is mandatory. That is kind of a problem. Because I want to have two tasks in ant file
1)ant install from spec file
2)Ant uninstall by simply running the Linux's rpm -e foobar command.
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use Ant's exec task to execute commands on the command line
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't confuse the "rpm" command with the "rpmbuild" command. Unless at long last they finally laid it to rest, the official RPM docs say that the command to build RPMs is "rpm -ba" and that hasn't been the case for years.

To create an RPM, use Ant's rpmbuild task. To install, update, validate or remove an RPM, use the OS "rpm" command via Ant's exec task.
 
reply
    Bookmark Topic Watch Topic
  • New Topic