Hi,
please merge.
Thanks,
Dirk
From ac737b9ff8205fe3c320ee0b41b093c7ad92c348 Mon Sep 17 00:00:00 2001
From: Dirk Mueller
Date: Thu, 4 Nov 2010 11:01:08 +0100
Subject: [PATCH] linkpac: Only include src_project if it differs
osc copypac copies _link files verbatim, so if they refer
to the same project, copying them should make them also
refer to the new project. This can be done by leaving
out the project part if it is the same like the destination
project
---
osc/core.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/osc/core.py b/osc/core.py
index 22ad8b0..de3c6aa 100644
--- a/osc/core.py
+++ b/osc/core.py
@@ -3850,8 +3850,14 @@ def link_pac(src_project, src_package, dst_project,
dst_package, force, rev='',
cicount = ''
print 'Creating _link...',
+
+ # only include project if it is different
+ src_project_snippet=" project=\"%s\"" % (src_project)
+ if src_project == dst_project:
+ src_project_snippet = ""
+
link_template = """\
-
+
<patches>
<!-- <apply name="patch" /> apply a patch on the source directory -->
<!-- <topadd>%%define build_with_feature_x 1</topadd> add a line on the top
(spec file only) -->
@@ -3859,7 +3865,7 @@ def link_pac(src_project, src_package, dst_project,
dst_package, force, rev='',
<!-- <delete>filename</delete> delete a file -->
</patches>
</link>
-""" % (src_project, src_package, rev, cicount)
+""" % (src_project_snippet, src_package, rev, cicount)
u = makeurl(apiurl, ['source', dst_project, dst_package, '_link'])
http_PUT(u, data=link_template)
--
1.7.3.1
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-buildservice+help@opensuse.org