Remove checking of target project, fix #475
authorZhang Qiang <qiang.z.zhang@intel.com>
Mon, 22 Oct 2012 07:35:52 +0000 (15:35 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Tue, 23 Oct 2012 05:42:43 +0000 (13:42 +0800)
If no permission to create target project, gbs return:
error <obs>: Can't set meta for Tools:Devel1: HTTP Error 403:  Forbidden
Without this patch, gbs rb can only create target project with name start
with home, which does not make sense.

Change-Id: I7ba7f2f01b9b01a1beca920412fdc53c4641e292

gitbuildsys/cmd_remotebuild.py

index aaebef86ff955c234b18844efd0ea54576bff82d..a58652daac81a0294bcd53219cfe3b4dbef51c6c 100644 (file)
@@ -162,14 +162,6 @@ def main(args):
 
         msger.info('checking status of obs project: %s ...' % target_prj)
         if not api.exists(target_prj):
-            # FIXME: How do you know that a certain user does not have
-            # permissions to create any project, anywhewre?
-            if args.target_obsprj and \
-                   not target_prj.startswith('home:%s:' % apiurl.user):
-                msger.error('no permission to create project %s, only sub '
-                            'projects of home:%s are '
-                            'allowed ' % (target_prj, apiurl.user))
-
             msger.info('copying settings of %s to %s' % (base_prj, target_prj))
             api.copy_project(base_prj, target_prj)