summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHéctor Orón Martínez <hector.oron@collabora.co.uk>2016-02-08 17:19:13 (GMT)
committerHéctor Orón Martínez <hector.oron@collabora.co.uk>2016-02-08 17:19:13 (GMT)
commitb2d10ae15a487f8b8b2af0130752cc57857c2df6 (patch)
treeea8115548ccd9379bc1c5966007c9affe44d1ff3
parentceb593848706dba720e31cc7ed3442e69889908f (diff)
downloadopen-build-service-b2d10ae15a487f8b8b2af0130752cc57857c2df6.tar.gz
open-build-service-b2d10ae15a487f8b8b2af0130752cc57857c2df6.tar.xz
Revert "Translate <buildenv>…</buildenv> entries into per-repo build env variables"
This reverts commit ceb593848706dba720e31cc7ed3442e69889908f.
-rwxr-xr-xsrc/backend/bs_worker42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/backend/bs_worker b/src/backend/bs_worker
index 96d6bd4..f03ec32 100755
--- a/src/backend/bs_worker
+++ b/src/backend/bs_worker
@@ -1424,43 +1424,6 @@ sub patchkiwi {
writexml($kiwifile, undef, $kiwi, $BSKiwiXML::kiwidesc);
}
-sub write_repo_config ($$)
-{
- my $xml = XML::Structured::XMLin( $BSXML::proj, $_[0] );
- my $rid = $_[1];
- my $repos = ( $xml && $xml->{repository} );
- my $env = "$buildroot/.repo-env.sh";
- my $done = 0;
-
- $repos || return $done;
-
- foreach my $r (grep { $_->{name} eq $rid } @$repos)
- {
- my $envars = $r->{ buildenv } || [];
- my @envsh = ("repoid=$rid;", "export repoid;");
-
- foreach my $var ( @$envars )
- {
- my $n = $var->{ name };
- my $v = $var->{ _content };
-
- # sanitise the name: alphanumeric_ only, must start with alpha_:
- $n =~ s|[^A-Z0-9_]||ig;
- $n =~ s|^([^A-Z_])|_$1|i;
-
- # sanitise value: escape metacharacters + LF (but not \') and quote:
- $v =~ s/([;<>\*\|`&\$!#\(\)\[\]\{\}:"\n\\])/\\$1/g;
- push( @envsh, qq@$n="$v";@, "export $n;" );
- }
-
- writestr($env, undef, join("\n", @envsh, ''));
- $done++;
- last;
- }
-
- return $done;
-}
-
sub dobuild {
my ($buildinfo) = @_;
@@ -1530,12 +1493,7 @@ sub dobuild {
}
my $server = $buildinfo->{'srcserver'} || $srcserver;
my $config = BSRPC::rpc("$server/getconfig", undef, "project=$projid", "repository=$repoid", @configpath);
- my $prjxml = BSRPC::rpc("$server/source/$projid/_meta", undef);
-
writestr("$buildroot/.build.config", undef, $config);
- writestr("$buildroot/.project.xml", undef, $prjxml);
- writestr("$buildroot/.repo", undef, $repoid);
- write_repo_config($prjxml, $repoid);
my $release = $buildinfo->{'release'};
my $obsinstance = $BSConfig::obsname || '';