put dist repo rpms under Packages/
This commit is contained in:
parent
0171027224
commit
7a0acc00cb
3 changed files with 10 additions and 9 deletions
|
|
@ -5582,8 +5582,9 @@ enabled=1
|
|||
def link_pkgs(self):
|
||||
for bnp in self.kojipkgs:
|
||||
bnplet = bnp[0].lower()
|
||||
koji.ensuredir(os.path.join(self.repodir, bnplet))
|
||||
dst = os.path.join(self.repodir, bnplet, bnp)
|
||||
ddir = os.path.join(self.repodir, 'Packages', bnplet)
|
||||
koji.ensuredir(ddir)
|
||||
dst = os.path.join(ddir, bnp)
|
||||
pkgpath = self.kojipkgs[bnp]['_pkgpath']
|
||||
self.logger.debug("os.symlink(%r, %r(", pkgpath, dst)
|
||||
os.symlink(pkgpath, dst)
|
||||
|
|
@ -5605,9 +5606,9 @@ enabled=1
|
|||
if subrepo:
|
||||
# note the ../
|
||||
subrepo_pkgs.setdefault(subrepo, []).append(
|
||||
'../%s/%s\n' % (bnplet, bnp))
|
||||
'../Packages/%s/%s\n' % (bnplet, bnp))
|
||||
else:
|
||||
pkgs.append('%s/%s\n' % (bnplet, bnp))
|
||||
pkgs.append('Packages/%s/%s\n' % (bnplet, bnp))
|
||||
|
||||
with open('%s/pkglist' % self.repodir, 'w') as fo:
|
||||
for line in pkgs:
|
||||
|
|
|
|||
|
|
@ -12735,8 +12735,9 @@ class HostExports(object):
|
|||
rpmpath = rpminfo['_fullpath']
|
||||
bnp = fn
|
||||
bnplet = bnp[0].lower()
|
||||
koji.ensuredir(os.path.join(archdir, bnplet))
|
||||
l_dst = os.path.join(archdir, bnplet, bnp)
|
||||
ddir = os.path.join(archdir, 'Packages', bnplet)
|
||||
koji.ensuredir(ddir)
|
||||
l_dst = os.path.join(ddir, bnp)
|
||||
if os.path.exists(l_dst):
|
||||
raise koji.GenericError("File already in repo: %s", l_dst)
|
||||
logger.debug("os.link(%r, %r)", rpmpath, l_dst)
|
||||
|
|
@ -12744,8 +12745,7 @@ class HostExports(object):
|
|||
os.link(rpmpath, l_dst)
|
||||
except OSError as ose:
|
||||
if ose.errno == 18:
|
||||
shutil.copy2(
|
||||
rpmpath, os.path.join(archdir, bnplet, bnp))
|
||||
shutil.copy2(rpmpath, l_dst)
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class TestDistRepoMove(unittest.TestCase):
|
|||
fo.write('%s' % basename)
|
||||
f_pkglist.write(path)
|
||||
f_pkglist.write('\n')
|
||||
self.expected.append('x86_64/%s/%s' % (basename[0], basename))
|
||||
self.expected.append('x86_64/Packages/%s/%s' % (basename[0], basename))
|
||||
build_id = len(self.builds) + 10000
|
||||
rpm_id = len(self.rpms) + 20000
|
||||
binfo['id'] = build_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue