Mailinglist Archive: opensuse-buildservice (225 mails)

< Previous Next >
Re: [opensuse-buildservice] Re: [PATCH] make project name available to source services
  • From: Adrian Schröter <adrian@xxxxxxx>
  • Date: Thu, 15 Sep 2011 15:50:59 +0200
  • Message-id: <5024580.8cy37Njyc4@scherben>
Am Dienstag, 13. September 2011, 16:09:14 schrieb Troy Telford:
A modified tar_scm that uses a 'cfgterm' that is searched for in the
obs project config.

It's a little hackish, but it's an example of what you can do. This
way, it's possible to have the same _service file in:

well, I can't import it in this form at least, since breaks current setups.
(not supporting --revision anymore)




due to differences in the 'cfgterm', the end result can be very
different - because it's pulling from an entirely different scm branch.
It makes it a lot easier to have multiple developers, each working on
their own piece of the code

To set up a new user, it just takes a loop of 'osc copy' and one 'osc
meta prjconf'. It's a lot less work than modifying the _service file
in x packages each time there's a new user.

I can't follow you here. The purpose of the _service file is that the
generation of the sources is reproducable by everybody in the same way.
And this code makes it dependend now on local configurations ?

Why should it be needed to modify a _service file when a new user gets added ?
Because each user works in his own branch ? But which branch gets built on the
server then ?


--- tar_scm 2011-09-13 13:40:51.873444973 -0600
+++ tar_scm_branch 2011-09-13 16:03:25.665728335 -0600
@@ -19,6 +19,7 @@
MYGITARGS="--depth 1"

while test $# -gt 0; do
case $1 in
@@ -34,8 +35,8 @@
- *-revision)
+ *-cfgterm)
+ CFGTERM="$2"
@@ -83,6 +84,27 @@

+# Get the actual revision from the configuration file(s):
+# Verify config file exists:
+if [[ -f /srv/obs/projects/${PROJECT}.conf ]]
+ if [[ ! -z ${CFGTERM} ]]
+ then
+ MYREVISION=$(cat /srv/obs/projects/${PROJECT}.conf | grep -E
${CFGTERM} | awk '{print $2}')
+ if [[ -z MYREVISION ]]
+ then
+ echo "Revision search term not found."
+ exit 1
+ fi
+ else
+ echo "Config search term not defined!"
+ exit 1
+ fi
+ echo "project config for ${PROJECT} does not exist."
+ exit 1
if [ -z "$MYPACKAGEMETA" ]; then
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx
< Previous Next >
Follow Ups