Thu Nov 17 00:20:28 2022 UTC ()
revbump: correct an error message in check-cvs-diff

While here, also add an RCS ID to the file.

XXX the file is also missing its copyright header block.


(gutteridge)
diff -r1.46 -r1.47 pkgsrc/pkgtools/revbump/Makefile
diff -r1.3 -r1.4 pkgsrc/pkgtools/revbump/files/check-cvs-diff

cvs diff -r1.46 -r1.47 pkgsrc/pkgtools/revbump/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/revbump/Makefile 2022/11/12 11:26:20 1.46
+++ pkgsrc/pkgtools/revbump/Makefile 2022/11/17 00:20:28 1.47
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.46 2022/11/12 11:26:20 gdt Exp $ 1# $NetBSD: Makefile,v 1.47 2022/11/17 00:20:28 gutteridge Exp $
2 2
3PKGNAME= revbump-2.15 3PKGNAME= revbump-2.15
4PKGREVISION= 4 4PKGREVISION= 5
5CATEGORIES= pkgtools 5CATEGORIES= pkgtools
6 6
7MAINTAINER= wiz@NetBSD.org 7MAINTAINER= wiz@NetBSD.org
8HOMEPAGE= https://www.pkgsrc.org/ 8HOMEPAGE= https://www.pkgsrc.org/
9COMMENT= Tools for bumping PKGREVISIONs (for pkgsrc developers) 9COMMENT= Tools for bumping PKGREVISIONs (for pkgsrc developers)
10LICENSE= modified-bsd 10LICENSE= modified-bsd
11 11
12WRKSRC= ${WRKDIR} 12WRKSRC= ${WRKDIR}
13NO_CONFIGURE= yes 13NO_CONFIGURE= yes
14USE_TOOLS+= perl:run 14USE_TOOLS+= perl:run
15USE_LANGUAGES= # empty 15USE_LANGUAGES= # empty
16 16
17INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 17INSTALLATION_DIRS= bin ${PKGMANDIR}/man1

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/revbump/files/Attic/check-cvs-diff (expand / switch to unified diff)

--- pkgsrc/pkgtools/revbump/files/Attic/check-cvs-diff 2020/03/08 17:06:16 1.3
+++ pkgsrc/pkgtools/revbump/files/Attic/check-cvs-diff 2022/11/17 00:20:28 1.4
@@ -1,16 +1,18 @@ @@ -1,16 +1,18 @@
1#!@PERL@ -w 1#!@PERL@ -w
2# -*- perl -*- 2# -*- perl -*-
3# 3#
 4# $NetBSD: check-cvs-diff,v 1.4 2022/11/17 00:20:28 gutteridge Exp $
 5#
4# read output of (cd /usr/pkgsrc; cvs diff -u ) and check if 6# read output of (cd /usr/pkgsrc; cvs diff -u ) and check if
5# py* and ruby* strings are left in buildlink3.mk. 7# py* and ruby* strings are left in buildlink3.mk.
6# They are then modified to Variable representation. 8# They are then modified to Variable representation.
7#" 9#"
8use strict; 10use strict;
9use Getopt::Std; 11use Getopt::Std;
10our(@ARGV); 12our(@ARGV);
11my (%opts); 13my (%opts);
12 14
13my($my_name) = $0; 15my($my_name) = $0;
14$my_name =~ s#(.*)/##; 16$my_name =~ s#(.*)/##;
15 17
16sub usage(){ 18sub usage(){
@@ -55,27 +57,27 @@ sub main() { @@ -55,27 +57,27 @@ sub main() {
55 57
56 open(CVS_DIFF, $CVS_DIFF) || die "Problem opening file $CVS_DIFF: $!\n"; 58 open(CVS_DIFF, $CVS_DIFF) || die "Problem opening file $CVS_DIFF: $!\n";
57 while(<CVS_DIFF>){ 59 while(<CVS_DIFF>){
58 # Looking for the +++ filename line in cvs diff (supposed to use 'cvs diff -u') 60 # Looking for the +++ filename line in cvs diff (supposed to use 'cvs diff -u')
59 $file_to_edit = ''; 61 $file_to_edit = '';
60 if ( /^\+\+\+ (\S+)/) { 62 if ( /^\+\+\+ (\S+)/) {
61 $file_to_edit = $1; } 63 $file_to_edit = $1; }
62 if ( $file_to_edit && -f $file_to_edit ) { 64 if ( $file_to_edit && -f $file_to_edit ) {
63 if ( $file_to_edit =~ /Makefile$/ ) { $Makefile++;} 65 if ( $file_to_edit =~ /Makefile$/ ) { $Makefile++;}
64 elsif ( $file_to_edit =~ /buildlink3.mk$/ ) { $buildlink3++; 66 elsif ( $file_to_edit =~ /buildlink3.mk$/ ) { $buildlink3++;
65 # print __LINE__, ' ', $file_to_edit,"\n"; 67 # print __LINE__, ' ', $file_to_edit,"\n";
66 my ($new_file) = $file_to_edit. '.new'; 68 my ($new_file) = $file_to_edit. '.new';
67 my ($edit) = 0; 69 my ($edit) = 0;
68 open(NEW, "> $new_file" ) || print STDERR "Problem to write $edit: $! \n"; 70 open(NEW, "> $new_file" ) || print STDERR "Problem opening file $new_file: $! \n";
69 open(EDIT, $file_to_edit ) || print STDERR "Problem opening file $file_to_edit: $! \n"; 71 open(EDIT, $file_to_edit ) || print STDERR "Problem opening file $file_to_edit: $! \n";
70 while(<EDIT>) { 72 while(<EDIT>) {
71 if ( /^BUILDLINK.*py27/ ) { $_=~ s/py27/\${PYPKGPREFIX}/ ; $edit++;} 73 if ( /^BUILDLINK.*py27/ ) { $_=~ s/py27/\${PYPKGPREFIX}/ ; $edit++;}
72 if ( /^BUILDLINK.*py3[0-9]/ ) { $_=~ s/py3[0-9]/\${PYPKGPREFIX}/ ; 74 if ( /^BUILDLINK.*py3[0-9]/ ) { $_=~ s/py3[0-9]/\${PYPKGPREFIX}/ ;
73 print STDERR " py3[0-9] found at $file_to_edit\n"; 75 print STDERR " py3[0-9] found at $file_to_edit\n";
74 ; $edit++;} 76 ; $edit++;}
75 if ( /^BUILDLINK.*ruby[0-9][0-9]*/ ) { $_=~ s/ruby[0-9][0-9]*/\${RUBY_PKGPREFIX}/ ; $edit++;} 77 if ( /^BUILDLINK.*ruby[0-9][0-9]*/ ) { $_=~ s/ruby[0-9][0-9]*/\${RUBY_PKGPREFIX}/ ; $edit++;}
76 print NEW $_; 78 print NEW $_;
77 } 79 }
78 close(EDIT); 80 close(EDIT);
79 close(NEW); 81 close(NEW);
80 if ($edit) { unlink $file_to_edit; 82 if ($edit) { unlink $file_to_edit;
81 rename $new_file, $file_to_edit; 83 rename $new_file, $file_to_edit;