Bug 4459

Summary: mgarepo should be able to increase the version number
Product: Infrastructure Reporter: Olav Vitters <olav>
Component: BuildSystemAssignee: Sysadmin Team <sysadmin-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Normal CC: juan.baptiste, sysadmin-bugs
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:

Description Olav Vitters 2012-02-09 20:11:23 CET
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'
Juan Luis Baptiste 2013-03-31 05:36:44 CEST

CC: (none) => juan.baptiste

Comment 1 Nicolas Vigier 2013-09-21 15:40:38 CEST
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

Nicolas Vigier 2014-03-24 10:52:45 CET

CC: boklm => (none)