>Number: 179637
>Category: ports
>Synopsis: patch for new feature
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 17 16:30:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Marcel Bonnet
>Release: 8.3-RELEASE
>Organization:
>Environment:
>Description:
The simple patch above adds the "-a [date]" option, limiting the affected ports list between the informed date and the last UPDATING entry.
>How-To-Repeat:
>Fix:
--- portupdate-scan.orig 2013-04-11 14:15:42.000000000 -0300
+++ portupdate-scan 2013-06-07 17:25:20.000000000 -0300
@@ -29,7 +29,8 @@
# Display usage and exit
sub HELP_MESSAGE() {
print <<EOF;
-Usage: portupdate-scan [-dhmuvV] [-D portsdir] [--help] [--version]
+Usage: portupdate-scan [-dhmuvV] [-D portsdir] [-a date yyyymmdd ] [--help] [--version]
+ -a check for /usr/ports/UPDATING sections after the given date [yyyymmdd]
-d display additional debugging info
-D portsdir override default port directory
-h, --help display this help and exit
@@ -49,10 +50,12 @@
$Getopt::Std::STANDARD_HELP_VERSION=1; # std, not paranoia behavior
# our($opt_d, $opt_h, $opt_m, $opt_u, $opt_v, $opt_V);
my %opt; # map of command-line options
-HELP_MESSAGE() unless getopts("dD:hmuvV", \%opt);
+HELP_MESSAGE() unless getopts("dD:hmuvVa:", \%opt);
HELP_MESSAGE() if $opt{h};
VERSION_MESSAGE() && exit if $opt{V};
+my $afterDate = $opt{a} ; #check for /usr/ports/UPDATING sections after the given date
+
my $portsdir = $opt{D} || "/usr/ports"; # ports directory
my $portIndexFile = "$portsdir/" . `make -f $portsdir/Makefile -V INDEXFILE`; # port index file
@@ -340,6 +343,13 @@
open(UPD, $updatingFile) or die "Can't open $updatingFile: $!";
while(<UPD>) {
chomp;
+ if ( /^[0-9]{8}/ ) { #implementing the new opt {-a}:
+ my $res = $_;
+ $res =~ s/\://;
+ if ( $res <= $afterDate ) {
+ exit;
+ }
+ }
if (/^\s*AFFECTS:/ && @bufferBlock > 0) {
processBlock(@bufferBlock);
@bufferBlock = ();
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-p...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "
freebsd-ports-b...@freebsd.org"