I'm writing a script where I can automatically submit GNOME packages. However, I want to keep most of the intelligence out of the script. Ideally, mgarepo, bm, and so on should be smart. So I'd like mgarepo to be able to increase the version number. This by: 1. Increasing the version to what was given on the command line 2. Resetting the release back to 1 I asked on IRC and wally said that "mdvsys update" used to have such functionality. <bkor> does anyone have an existing script to automatically update the version number in a spec file? (I mean increasing version, setting release back to 1) <wally_> I guess it could be implemented to mgarepo as mdvsys has 'mdvsys update'
CC: (none) => juan.baptiste
To increase the release number, or update the version number, you can use Youri::Package::RPM::Updater. Install perl-RPM4 and perl-Youri-Package-RPM-Updater, then you can run a command like this to increase release : $ perl -MYouri::Package::RPM::Updater -e 'Youri::Package::RPM::Updater->new->update_from_spec(glob("SPECS/*.spec"))' Or like this to update the version : $ perl -MYouri::Package::RPM::Updater -e 'Youri::Package::RPM::Updater->new->update_from_spec(glob("SPECS/*.spec"), '0.1')'
CC: (none) => boklm
CC: boklm => (none)