FreeBSD Bugzilla – Attachment 224193 Details for
Bug 255153
ports-mgmt/portlint: Teach portlint that $FreeBSD$ is deprecated in Git
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-Teach-portlint-that-FreeBSD-is-deprecated-in-Git.patch
0001-Teach-portlint-that-FreeBSD-is-deprecated-in-Git.patch (text/plain), 3.68 KB, created by
Li-Wen Hsu
on 2021-04-17 16:20:15 UTC
(
hide
)
Description:
0001-Teach-portlint-that-FreeBSD-is-deprecated-in-Git.patch
Filename:
MIME Type:
Creator:
Li-Wen Hsu
Created:
2021-04-17 16:20:15 UTC
Size:
3.68 KB
patch
obsolete
>From a6daf890a16fb8c8ff52c175e3f64c43afab2de3 Mon Sep 17 00:00:00 2001 >From: Li-Wen Hsu <lwhsu@FreeBSD.org> >Date: Sun, 18 Apr 2021 00:17:53 +0800 >Subject: [PATCH] Teach portlint that $FreeBSD$ is deprecated in Git > >--- > ports-mgmt/portlint/Makefile | 2 +- > ports-mgmt/portlint/src/portlint.pl | 43 ++++++----------------------- > 2 files changed, 10 insertions(+), 35 deletions(-) > >diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile >index 548a5bf0e5bd..ad6edb127375 100644 >--- a/ports-mgmt/portlint/Makefile >+++ b/ports-mgmt/portlint/Makefile >@@ -1,7 +1,7 @@ > # Created by: Jun-ichiro itojun Hagino <itojun@itojun.org> > > PORTNAME= portlint >-PORTVERSION= 2.19.4 >+PORTVERSION= 2.19.5 > CATEGORIES= ports-mgmt > MASTER_SITES= # none > DISTFILES= # none >diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl >index 61c8d9902882..385d812db04b 100644 >--- a/ports-mgmt/portlint/src/portlint.pl >+++ b/ports-mgmt/portlint/src/portlint.pl >@@ -138,7 +138,6 @@ my $mfile_gids = "${portsdir}/GIDs"; > > if ($verbose) { > print "OK: config: portsdir: \"$portsdir\" ". >- "rcsidstr: \"$rcsidstr\" ". > "localbase: $localbase ". > "\n"; > } >@@ -727,6 +726,7 @@ sub checkplist { > } > } elsif ($_ =~ /^\@(comment)/) { > $rcsidseen++ if (/\$$rcsidstr[:\$]/); >+ &perror("FATAL", $file, $., "\$$rcsidstr\$ is deprecated in Git."); > } elsif ($_ =~ m!^\@(dirrm|dirrmtry)\s+/!) { > &perror("WARN", $file, $., "Using \@$1 with absolute path ". > "will not work as you expected in most cases. Use ". >@@ -1443,20 +1443,19 @@ sub checkmakefile { > print "OK: checking header in $file.\n" if ($verbose); > if ($lines[1] =~ /^# (?:New )?[Pp]orts collection [mM]akefile/) { > &perror("FATAL", $file, 1, "old style headers found."); >+ } elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/) { >+ &perror("FATAL", $file, 1, "\$$rcsidstr\$ is deprecated in Git."); > } elsif ($lines[1] =~ /^# Created by: \S/) { >- if ($lines[2] !~ /^# \$$rcsidstr[:\$]/) { >- &perror("FATAL", $file, 2, "header should be ". >- "followed by \$$rcsidstr\$."); >- } elsif ($lines[3] !~ /^$/) { >- #&perror("FATAL", $file, 3, "do not add extra ". >+ if ($lines[2] =~ /^# \$$rcsidstr[:\$]/) { >+ &perror("FATAL", $file, 2, "\$$rcsidstr\$ is deprecated in Git."); >+ } >+ if ($lines[2] !~ /^$/) { >+ #&perror("FATAL", $file, 2, "do not add extra ". > # "empty comments after header."); > } > # special case for $rcsidsrt\nMCom: >- } elsif ($lines[1] =~ /^# \$$rcsidstr[:\$]/ and $lines[2] =~ /^#\s+\$MCom[:\$]/ and $lines[3] =~ /^$/) { >+ } elsif ($lines[1] =~ /^#\s+\$MCom[:\$]/ and $lines[2] =~ /^$/) { > # DO NOTHING >- } elsif ($lines[1] !~ /^# \$$rcsidstr[:\$]/ or $lines[2] !~ /^$/) { >- &perror("FATAL", $file, 1, "incorrect header; ". >- "simply use \$$rcsidstr\$."); > } > > # >@@ -2685,30 +2684,6 @@ EOF > if ($tmp =~ m/Version [rR]equired/) { > &perror("WARN", $file, -1, "Version required is no longer needed in the comment section."); > } >- my $tmp2 = ""; >- for (split(/\n/, $tmp)) { >- $tmp2 .= $_ if (m/\$$rcsidstr/); >- } >- if ($tmp2 !~ /#(\s+)\$$rcsidstr([^\$]*)\$$/) { >- >- &perror("FATAL", $file, -1, "no \$$rcsidstr\$ line in comment ". >- "section."); >- } else { >- print "OK: \$$rcsidstr\$ seen in $file.\n" if ($verbose); >- if ($1 ne ' ') { >- &perror("WARN", $file, -1, "please use single whitespace ". >- "right before \$$rcsidstr\$ tag."); >- } >- if ($2 ne '') { >- if ($verbose || $newport) { # XXX >- &perror("WARN", $file, -1, >- ($newport ? 'for new port, ' >- : 'is it a new port? if so, '). >- "make \$$rcsidstr\$ tag in comment ". >- "section empty, to make SVN happy."); >- } >- } >- } > > # > # for the rest of the checks, comment lines are not important. >-- >2.31.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 255153
: 224193