On Friday 11 January 2008, Dennis Gilmore wrote:
> The attached patch has koji build repos when you are building only for a
> non-canonical arch.  this would allow someone to shadowbuild fedora and
> build for i686  for instance.  they would get a 32 bit repo.  I dont see
> any issues with this unless you try to build for multiple sub-arches  but
> that is no different to what we have now.  with this patch you will not get
> ppc repos for instance if you are only building i386  but happen to have 
> ppc packages in the tree
>
> Dennis

Here is an updated patch that will work on python-2.3  this is against head

Dennis
From 00c28c59e206f6415b53994d1d92c4a1515b69e3 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <[EMAIL PROTECTED]>
Date: Mon, 14 Jan 2008 21:11:05 -0600
Subject: [PATCH] update repo creation for sub arches so that it works on python-2.3

---
 hub/kojihub.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/hub/kojihub.py b/hub/kojihub.py
index aa4b221..9a75552 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -1680,10 +1680,13 @@ def repo_init(tag, with_src=False, with_debuginfo=False):
     state = koji.REPO_INIT
     tinfo = get_tag(tag, strict=True)
     tag_id = tinfo['id']
+    repo_arches = []
     if tinfo['arches']:
         tag_arches = tinfo['arches'].split()
-    else:
-        tag_arches = []
+        for arch in tag_arches:
+            canonArch = koji.canonArch(arch)
+            if canonArch not in repo_arches:
+                repo_arches.append(canonArch)
     repo_id = _singleValue("SELECT nextval('repo_id_seq')")
     event_id = _singleValue("SELECT get_event()")
     q = """INSERT INTO repo(id, create_event, tag_id, state)
@@ -1708,7 +1711,7 @@ def repo_init(tag, with_src=False, with_debuginfo=False):
                 continue
         elif arch == 'noarch':
             pass
-        elif repoarch not in tag_arches:
+        elif repoarch not in repo_arches:
             # Do not create a repo for arches not in the arch list for this tag
             continue
         build = builds[rpminfo['build_id']]
-- 
1.5.3.8

--
Fedora-buildsys-list mailing list
Fedora-buildsys-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list

Reply via email to