Nilesh Patra pushed to branch master at lintian / lintian
Commits: a1805c7a by Nilesh Patra at 2024-05-06T04:00:45+00:00 Remove strict check for comma in "Origin" field in DEP3 header According to https://dep-team.pages.debian.net/deps/dep3/ it is optional. Added some extra validation checks for the value in origin field. It should either be a commit prefixed by "commit:" or a URL prefixed by http:// or https:// - - - - - 1 changed file: - lib/Lintian/Check/Debian/Patches/Dep3.pm Changes: ===================================== lib/Lintian/Check/Debian/Patches/Dep3.pm ===================================== @@ -80,10 +80,16 @@ sub visit_patched_files { # use last mention when present multiple times my $origin = $deb822->last_mention('Origin'); - my ($category) = split(m{\s*,\s*}, $origin, 2); - $category //= $EMPTY; - return - if any { $category eq $_ } qw(upstream backport); + if ($origin =~ /,/) { + my ($category, $origin_value) = split(m{\s*,\s*}, $origin, 2); + $category //= $EMPTY; + return + if ($origin_value =~ /^(?:http|https):\/\/|commit:/) + && any { $category eq $_ } qw(upstream backport); + } else { + $origin =~ s/\s//g; + return if $origin =~ (/^(?:http|https):\/\/|commit:/); + } $self->pointed_hint('patch-not-forwarded-upstream', $item->pointer) if $deb822->last_mention('Forwarded') eq 'no' View it on GitLab: https://salsa.debian.org/lintian/lintian/-/commit/a1805c7ab887cf6ed949b9dfe3fa271deb0eab9b -- View it on GitLab: https://salsa.debian.org/lintian/lintian/-/commit/a1805c7ab887cf6ed949b9dfe3fa271deb0eab9b You're receiving this email because of your account on salsa.debian.org.

