Commit 3e503e02 authored by Héctor Orón Martínez's avatar Héctor Orón Martínez
Browse files

Merge branch 'handle-links-properly' into 'debian/master'

Handle links properly when doing backend build operations

See merge request ruby-team/open-build-service!6
parents 176c9511 daf31839
From be9fc5f2f7c564392948f127faff6486225ba8e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Geuken?= <>
Date: Mon, 26 Jun 2017 15:06:51 +0200
Subject: [PATCH] [dist] Use 2.7 packages for testing 2.7 branch in travis
dist/ci/ | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Origin: upstream,
diff --git a/dist/ci/ b/dist/ci/
index 85238dbd1..f9ecadaeb 100755
--- a/dist/ci/
+++ b/dist/ci/
@@ -8,7 +8,7 @@ sudo apt-key adv --keyserver --recv-keys C5C219E7
# Install updates from our own repository
sudo chmod a+w /etc/apt/sources.list.d
-echo 'deb /' > /etc/apt/sources.list.d/opensuse.list
+echo 'deb /' > /etc/apt/sources.list.d/opensuse.list
# We could use this to only update the package list from the OBS,
# but apprently this is not possible anymore. So we update all package lists.
commit d4bddd6df495cc436185961fb497dacedc046008
Author: Adrian Schröter <>
Date: Thu Jun 22 12:12:01 2017 +0200
[webui] Handle links properly when doing backend build operations
OBS wasn't properly handling linked projects when triggering rebuilds,
wipe binaries and abort build. This resulted in packages of linked
projects being aborted, wiped, rebuilt.
This fixes the falsey code.
Pair-programmed with @eduardoj and @bgeuken
Origin: upstream,
--- a/src/api/app/models/package.rb
+++ b/src/api/app/models/package.rb
@@ -1344,22 +1344,23 @@ class Package < ActiveRecord::Base
+ #### WARNING: these operations run in build object, not this package object
def rebuild(params)
- backend_build_command(:rebuild, params.slice(:package, :arch, :repository))
+ backend_build_command(:rebuild, params[:project], params.slice(:package, :arch, :repository))
def wipe_binaries(params)
- backend_build_command(:wipe, params.slice(:package, :arch, :repository))
+ backend_build_command(:wipe, params[:project], params.slice(:package, :arch, :repository))
def abort_build(params)
- backend_build_command(:abortbuild, params.slice(:package, :arch, :repository))
+ backend_build_command(:abortbuild, params[:project], params.slice(:package, :arch, :repository))
- def backend_build_command(command, params)
+ def backend_build_command(command, build_project, params)
-"/build/#{URI.escape(}?cmd=#{command}&#{params.to_query}", '')
- rescue ActiveXML::Transport::Error, Timeout::Error => e
+"/build/#{URI.escape(build_project)}?cmd=#{command}&#{params.to_query}", '')
+ rescue ActiveXML::Transport::Error, Timeout::Error, Project::WritePermissionError => e
errors.add(:base, e.message)
return false
......@@ -17,3 +17,5 @@ localgem.patch
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment