#4316 ensure repos dir
Opened 2 months ago by mikem. Modified 24 days ago
mikem/koji ensure-repos-1  into  master

file modified
+6
@@ -13586,8 +13586,14 @@ 

              pass

          else:

              context.session.assertPerm('regen-repo')

+ 

          # raise error when tag does not exist

          get_tag(tag, strict=True, event=event)

+ 

+         # make sure repos dir exists, otherwise hosts will reject task

+         repos_dir = joinpath(koji.pathinfo.topdir, 'repos')

+         koji.ensuredir(repos_dir)

+ 

          opts = {}

          if event is not None:

              opts['event'] = event

file modified
+6
@@ -8,6 +8,7 @@ 

  from . import kojihub

  

  from koji.context import context

+ from koji.util import joinpath

  from kojihub.db import (QueryView, UpdateProcessor, BulkUpdateProcessor, InsertProcessor, nextval,

                          Savepoint, QueryProcessor, db_lock, DeleteProcessor)

  
@@ -376,6 +377,11 @@ 

      # TODO should we error if user doesn't exist

      if user_id:

          taskopts['owner'] = user_id

+ 

+     # make sure repos dir exists, otherwise hosts will reject task

+     repos_dir = joinpath(koji.pathinfo.topdir, 'repos')

+     koji.ensuredir(repos_dir)

+ 

      task_id = kojihub.make_task('newRepo', args, **taskopts)

      return task_id

      # caller should update request entry if needed

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 months ago

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: testing-basic

24 days ago