Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bs_srcserver: configurable vendorname #157

Closed
wants to merge 1 commit into from

3 participants

@cschneemann

Make the vendortag set by srcserver configurable through new variable
in BSConfig.pm.

If variable is not set (default) the current "obs://$obsname/$vprojid"

@cschneemann cschneemann bs_srcserver: configurable vendorname
Make the vendortag set by srcserver configurable through new variable
in BSConfig.pm.

If variable is not set (default) the current "obs://$obsname/$vprojid"
9bcc355
@coolo
Owner

hmm, wouldn't it make sense to put things like that in the API /configuration and have that upload to the backend? And support %obsname and stuff in there?

Just an idea - pretty much unrelated to your very change

The problem which I see in this implementation is that it is not possible to make it configurable per project or to extend the current string.

I think you should just use

our $extramacros = {
'^Your:PROJECT$' => "%vendor YOUR STRING\n",
}

Is that sufficient for you ?

extramacros does exactly what is needed. So the change in this pull request is not needed.

@adrianschroeter

okay, great, closing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2012
  1. @cschneemann

    bs_srcserver: configurable vendorname

    cschneemann authored
    Make the vendortag set by srcserver configurable through new variable
    in BSConfig.pm.
    
    If variable is not set (default) the current "obs://$obsname/$vprojid"
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +1 −0  src/backend/BSConfig.pm.template
  2. +2 −1  src/backend/bs_srcserver
View
1  src/backend/BSConfig.pm.template
@@ -45,6 +45,7 @@ if ($frontend) {
}
our $obsname = $hostname; # unique identifier for this Build Service instance
+# our $vendorname = "Open Build Service";
# Change also the SLP reg files in /etc/slp.reg.d/ when you touch hostname or port
our $srcserver = "http://$hostname:5352";
our $reposerver = "http://$hostname:5252";
View
3  src/backend/bs_srcserver
@@ -3597,7 +3597,8 @@ sub concatconfigs {
}
$vprojid = $projid if $vprojid eq '';
my $obsname = $BSConfig::obsname || 'build.opensuse.org';
- $macros .= "%vendor obs://$obsname/$vprojid\n";
+ my $vendorname = $BSConfig::vendorname || "obs://$obsname/$vprojid";
+ $macros .= "%vendor $vendorname\n";
$macros .= "%_project $projid\n";
my $lastr = '';
Something went wrong with that request. Please try again.