Skip to content

Commit

Permalink
[backend] tag maintenance repositories
Browse files Browse the repository at this point in the history
for SLE-7695
  • Loading branch information
adrianschroeter committed Sep 27, 2019
1 parent bb87f17 commit d5f611e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/api/test/functional/maintenance_test.rb
Expand Up @@ -1620,6 +1620,9 @@ def test_create_maintenance_project_and_release_packages
IO.popen("cat #{ENV['OBS_BACKEND_TEMP']}/data/repos/BaseDistro2.0:/LinkedUpdateProject/BaseDistro2LinkedUpdateProject_repo/repodata/repomd.xml") do |io|
hashed = Xmlhash.parse(io.read)
end
# check repository markers
assert_equal hashed['tags']['content'], 'update'
assert_equal hashed['tags']['repo'].first, 'obsrepository://obstest/BaseDistro2.0:LinkedUpdateProject/BaseDistro2LinkedUpdateProject_repo'
found = nil
hashed['data'].each do |d|
found = true if d['type'] == 'updateinfo'
Expand Down
4 changes: 3 additions & 1 deletion src/backend/bs_publish
Expand Up @@ -584,12 +584,15 @@ sub createrepo_rpmmd {
$ENV{'CREATEREPO_CHECKSUMS'} = "$extrep/.chksums";
}
}
my $repoinfo = $data->{'repoinfo'};
# create generic rpm-md meta data
# --update requires a newer createrepo version, tested with version 0.4.10
my @createrepoargs;
push @createrepoargs, '--changelog-limit', '20';
push @createrepoargs, map { ('--repo', $_ ) } @repotags;
push @createrepoargs, '--content', 'debug' if $data->{'dbgsplit'};
push @createrepoargs, '--content', 'update' if ($repoinfo->{'projectkind'} || '') eq 'maintenance_incident';
push @createrepoargs, '--content', 'update' if ($repoinfo->{'projectkind'} || '') eq 'maintenance_release';
my @legacyargs;
if ($options{'legacy'}) {
push @legacyargs, '--simple-md-filenames', '--checksum=sha';
Expand All @@ -600,7 +603,6 @@ sub createrepo_rpmmd {
if ($options{'zchunk'}) {
# we currently do not support user generated zchunk dictionaries for
# security reasons.
my $repoinfo = $data->{'repoinfo'};
for my $sprp (@{$repoinfo->{'prpsearchpath'} || []}) {
my $zchunk_dict_dir = "$BSConfig::bsdir/zchunk/$sprp->{'project'}";
next unless -d $zchunk_dict_dir;
Expand Down

0 comments on commit d5f611e

Please sign in to comment.