Hi,
we are currently pushing out osc version 0.116. Beside some eagerly wanted bugfixes it provides some new commands to handle version source links more easily.
Source links can point to a certain revision of source package. This is not the default, because the usual use case when you prepare submissions for other projects should show new upcoming conflicts.
However in other use cases you might want to control when to upgrade to a newer revision. This is esp. the case when you use the OBS for release management.
Here are some examples how to use it:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
At some later point of time you might want to update to the current version again. The easiest way to do this is to use the new "setlinkrev" command. You can do this either via
osc co openSUSE:Tools osc cd openSUSE:Tools/osc osc setlinkrev
or call directly
osc setlinkrev openSUSE:Tools osc
bye adrian
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Am Donnerstag, 16. April 2009 20:53:12 schrieb James Oakley:
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Yes, I thought also about to support this directly with osc. But it will not run much faster than with your for script.
bye adrian
On Friday 17 April 2009 04:01:24 Adrian Schröter wrote:
Am Donnerstag, 16. April 2009 20:53:12 schrieb James Oakley:
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Yes, I thought also about to support this directly with osc. But it will not run much faster than with your for script.
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
On Fri, Apr 17, 2009 at 10:58:09AM -0300, James Oakley wrote:
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
No please, don't put too much stuff in the poor source server. Making a call per package can't be that expensive.
Cheers, Michael.
On Friday 17 April 2009 11:17:46 Michael Schroeder wrote:
On Fri, Apr 17, 2009 at 10:58:09AM -0300, James Oakley wrote:
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
No please, don't put too much stuff in the poor source server. Making a call per package can't be that expensive.
jfunk@maus:~> osc ls home:jimfunk | wc -l 81
jfunk@maus:~> cat oscprjsnapshot.sh #!/bin/bash
SRCPRJ="home:jimfunk" DSTPRJ="home:jimfunk:snapshot"
APISRV="https://api.opensuse.org"
for pkg in `osc -A $APISRV ls $SRCPRJ` ; do osc -A $APISRV linkpac --current $SRCPRJ $pkg $DSTPRJ done
jfunk@maus:~> time ./oscprjsnapshot.sh Sending meta data... Done. Creating _link... Done. Sending meta data... Done. ... snip ...
real 14m3.887s user 0m10.793s sys 0m3.368s
Ok, maybe not computationally expensive, but it takes way too long.
Imagine how long it would take on openSUSE:Factory :-)
Am Freitag, 17. April 2009 15:58:09 schrieb James Oakley:
On Friday 17 April 2009 04:01:24 Adrian Schröter wrote:
Am Donnerstag, 16. April 2009 20:53:12 schrieb James Oakley:
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Yes, I thought also about to support this directly with osc. But it will not run much faster than with your for script.
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
in that case you want to implement a single project source link and creating multiple source links in each package.
This is a wanted feature since quite some time ...
On Friday 17 April 2009 11:23:09 Adrian Schröter wrote:
Am Freitag, 17. April 2009 15:58:09 schrieb James Oakley:
On Friday 17 April 2009 04:01:24 Adrian Schröter wrote:
Am Donnerstag, 16. April 2009 20:53:12 schrieb James Oakley:
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Yes, I thought also about to support this directly with osc. But it will not run much faster than with your for script.
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
in that case you want to implement a single project source link and creating multiple source links in each package.
Yes, a project source link would be a good idea. I'm not sure what you mean by "multiple source links in each package," however.
Am Freitag, 17. April 2009 19:45:09 schrieb James Oakley:
On Friday 17 April 2009 11:23:09 Adrian Schröter wrote:
Am Freitag, 17. April 2009 15:58:09 schrieb James Oakley:
On Friday 17 April 2009 04:01:24 Adrian Schröter wrote:
Am Donnerstag, 16. April 2009 20:53:12 schrieb James Oakley:
On Thursday 16 April 2009 05:20:27 Adrian Schröter wrote:
Create a new source link with the new --current argument:
# osc linkpac --current openSUSE:Factory osc openSUSE:Tools
This means that osc checks now what is the current revision in Factory and refers to exactly this version (you see a rev="X" attribute in the _link file). The effect is that a change in openSUSE:Factory has no effect in openSUSE:Tools.
Oooh. I really like this. What would be even cooler is if you could do this to an entire project to create a snapshot that you could build against.
I just tried it with "for pkg in `osc ls $project` ; do osc linkpac --current $project $pkg $project:snapshot; done' but it takes a long time for a project with many packages.
Yes, I thought also about to support this directly with osc. But it will not run much faster than with your for script.
Yeah, the functionality would have to be implemented in the source server so that there would be one remote call, instead of one per package.
I'll take a look at the code and make an attempt.
in that case you want to implement a single project source link and creating multiple source links in each package.
Yes, a project source link would be a good idea. I'm not sure what you mean by "multiple source links in each package," however.
sorry, "one for each package" was what I had in mind.
buildservice@lists.opensuse.org