Bug 4459 - mgarepo should be able to increase the version number
Summary: mgarepo should be able to increase the version number
Status: NEW
Alias: None
Product: Infrastructure
Classification: Unclassified
Component: BuildSystem (show other bugs)
Version: unspecified
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Sysadmin Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 20:11 CET by Olav Vitters
Modified: 2014-03-24 10:52 CET (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

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)


Note You need to log in before you can comment on or make changes to this bug.