Skip to content

Commit

Permalink
Merge pull request #8457 from adrianschroeter/update_marker
Browse files Browse the repository at this point in the history
tag maintenance repositories
  • Loading branch information
adrianschroeter committed Sep 27, 2019
2 parents 9519417 + d5f611e commit a9b4cab
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 @@ -585,12 +585,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 @@ -601,7 +604,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 a9b4cab

Please sign in to comment.