pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkgsrc-todo



Module Name:    pkgsrc
Committed By:   wiz
Date:           Thu May 20 10:51:42 UTC 2021

Modified Files:
        pkgsrc/pkgtools/pkgsrc-todo: Makefile
        pkgsrc/pkgtools/pkgsrc-todo/files: add_todo.pl

Log Message:
pkgsrc-todo: fix old bug that broke adding entries at the end of the list

Bump version.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/pkgtools/pkgsrc-todo/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkgsrc-todo/Makefile
diff -u pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.17 pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.18
--- pkgsrc/pkgtools/pkgsrc-todo/Makefile:1.17   Mon Aug 31 18:10:59 2020
+++ pkgsrc/pkgtools/pkgsrc-todo/Makefile        Thu May 20 10:51:41 2021
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.17 2020/08/31 18:10:59 wiz Exp $
+# $NetBSD: Makefile,v 1.18 2021/05/20 10:51:41 wiz Exp $
 
-PKGNAME=       pkgsrc-todo-1.3
-PKGREVISION=   5
+PKGNAME=       pkgsrc-todo-1.4
 CATEGORIES=    pkgtools
 
 MAINTAINER=    wiz%NetBSD.org@localhost

Index: pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl
diff -u pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl:1.1.1.1 pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl:1.2
--- pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl:1.1.1.1       Sun Aug 30 10:40:34 2009
+++ pkgsrc/pkgtools/pkgsrc-todo/files/add_todo.pl       Thu May 20 10:51:42 2021
@@ -1,9 +1,8 @@
 #!@PERL@
 
-# $NetBSD: add_todo.pl,v 1.1.1.1 2009/08/30 10:40:34 wiz Exp $
+# $NetBSD: add_todo.pl,v 1.2 2021/05/20 10:51:42 wiz Exp $
 
 # TODO:
-# fix adding entry after last one (currently broken)
 # check if package was removed
 # check if package was downgraded (e.g. oto)
 # allow multiple command line arguments
@@ -17,7 +16,7 @@ use constant regex_pkgname      => qr"^(
 my ($comment, $entry, $grep_result, $newname, $newpkg, $newprinted,
     $newversion, %opt, $verbose);
 
-my $PKGSRCDIR = "@PKGSRCDIR@";
+ my $PKGSRCDIR = "@PKGSRCDIR@";
 my $input = "$PKGSRCDIR/doc/TODO";
 my $wipinput = "$PKGSRCDIR/wip/TODO";
 my $output = "$input.new";
@@ -90,11 +89,18 @@ if (update_done($newname, $newversion)) 
 open IN, $input or die "can't open input file ``$input''";
 open OUT, ">$output" or die "can't open output file ``$output''";
 
+my $todo_list_found = 0;
 while (<IN>) {
-       if ($newprinted or not m/^      o /) {
+        if ($newprinted or (not m/^    o / and $todo_list_found == 0)) {
                print OUT $_;
                next;
        }
+       if (not m/^     o / and $todo_list_found == 1) {
+               print OUT "     o $newpkg\n";
+               print OUT $_;
+               $newprinted = 1;
+               next;
+       }
 
        chomp();
        s/^\to //;
@@ -106,6 +112,7 @@ while (<IN>) {
                $comment = "";
        }
 
+       $todo_list_found = 1;
        $entry =~ regex_pkgname;
        my ($entryname, $entryversion) = ($1, $2);
 



Home | Main Index | Thread Index | Old Index