From e72470136fcecc94a427939d28d1c613970b0067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 9 Aug 2023 14:14:36 +0200 Subject: [PATCH] Support parsing of bcntsynctag from sources Supported in spec, kiwi and Dockerfile --- Build/Docker.pm | 3 +++ Build/Kiwi.pm | 2 ++ Build/Rpm.pm | 3 +++ 3 files changed, 8 insertions(+) diff --git a/Build/Docker.pm b/Build/Docker.pm index c792fc5e6..1c3e0f1e2 100644 --- a/Build/Docker.pm +++ b/Build/Docker.pm @@ -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; } diff --git a/Build/Kiwi.pm b/Build/Kiwi.pm index a89b37fce..889625daf 100644 --- a/Build/Kiwi.pm +++ b/Build/Kiwi.pm @@ -72,6 +72,7 @@ sub kiwiparse_product { $obsexclusivearch = $1 if $xml =~ /^\s*\s*$/im; $obsexcludearch = $1 if $xml =~ /^\s*\s*$/im; $ret->{'milestone'} = $1 if $xml =~ /^\s*\s*$/im; + $ret->{'bcntsynctag'} = $1 if $xml =~ /^\s*\s*$/im; $ret->{'name'} = $kiwi->{'name'} if $kiwi->{'name'}; $ret->{'filename'} = $kiwi->{'name'} if $kiwi->{'name'}; @@ -245,6 +246,7 @@ sub kiwiparse { $obsexcludearch = $1 if $xml =~ /^\s*\s*$/im; $obsprofiles = $1 if $xml =~ /^\s*\s*$/im; $ret->{'milestone'} = $1 if $xml =~ /^\s*\s*$/im; + $ret->{'bcntsynctag'} = $1 if $xml =~ /^\s*\s*$/im; if ($obsprofiles) { $obsprofiles = [ grep {defined($_)} map {$_ eq '@BUILD_FLAVOR@' ? $buildflavor : $_} split(' ', $obsprofiles) ]; } diff --git a/Build/Rpm.pm b/Build/Rpm.pm index e2b50cad1..ba142ed19 100644 --- a/Build/Rpm.pm +++ b/Build/Rpm.pm @@ -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;