Skip to content

Commit

Permalink
Support parsing of bcntsynctag from sources
Browse files Browse the repository at this point in the history
Supported in spec, kiwi and Dockerfile
  • Loading branch information
adrianschroeter committed Aug 9, 2023
1 parent d1101a2 commit e724701
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Build/Docker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ sub parse {
if ($line =~ /^#!BuildRelease:\s*(\S+)\s*$/) {
$ret->{'release'} = $1;
}
if ($line =~ /^#!BcntSyncTag:\s*(\S+)\s*$/) {
$ret->{'bcntsynctag'} = $1;
}
if ($line =~ /^#!BuildConstraint:\s*(\S.+?)\s*$/) {
push @{$ret->{'buildconstraint'}}, $1;
}
Expand Down
2 changes: 2 additions & 0 deletions Build/Kiwi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ sub kiwiparse_product {
$obsexclusivearch = $1 if $xml =~ /^\s*<!--\s+OBS-ExclusiveArch:\s+(.*)\s+-->\s*$/im;
$obsexcludearch = $1 if $xml =~ /^\s*<!--\s+OBS-ExcludeArch:\s+(.*)\s+-->\s*$/im;
$ret->{'milestone'} = $1 if $xml =~ /^\s*<!--\s+OBS-Milestone:\s+(.*)\s+-->\s*$/im;
$ret->{'bcntsynctag'} = $1 if $xml =~ /^\s*<!--\s+OBS-BcntSyncTag\s+(.*)\s+-->\s*$/im;

$ret->{'name'} = $kiwi->{'name'} if $kiwi->{'name'};
$ret->{'filename'} = $kiwi->{'name'} if $kiwi->{'name'};
Expand Down Expand Up @@ -245,6 +246,7 @@ sub kiwiparse {
$obsexcludearch = $1 if $xml =~ /^\s*<!--\s+OBS-ExcludeArch:\s+(.*)\s+-->\s*$/im;
$obsprofiles = $1 if $xml =~ /^\s*<!--\s+OBS-Profiles:\s+(.*)\s+-->\s*$/im;
$ret->{'milestone'} = $1 if $xml =~ /^\s*<!--\s+OBS-Milestone:\s+(.*)\s+-->\s*$/im;
$ret->{'bcntsynctag'} = $1 if $xml =~ /^\s*<!--\s+OBS-BcntSyncTag\s+(.*)\s+-->\s*$/im;
if ($obsprofiles) {
$obsprofiles = [ grep {defined($_)} map {$_ eq '@BUILD_FLAVOR@' ? $buildflavor : $_} split(' ', $obsprofiles) ];
}
Expand Down
3 changes: 3 additions & 0 deletions Build/Rpm.pm
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,9 @@ sub parse {
if ($preamble && $line =~ /^\#\!BuildConstraint:\s*(\S.+?)\s*$/i) {
push @{$ret->{'buildconstraint'}}, $1;
}
if ($preamble && $line =~ /^\#\!BcntSyncTag:\s*(\S.+?)\s*$/i) {
$ret->{'bcntsynctag'} = $1 if $1;
}
if ($line =~ /^(?:Requires\(pre\)|Requires\(post\)|PreReq)\s*:\s*(\S.*)$/i) {
my $deps = $1;
my @deps;
Expand Down

0 comments on commit e724701

Please sign in to comment.