Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ports/179637: patch for new feature

1 view
Skip to first unread message

Marcel Bonnet

unread,
Jun 17, 2013, 12:22:17 PM6/17/13
to

>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"

Mark Linimon

unread,
Jun 17, 2013, 2:30:00 PM6/17/13
to
The following reply was made to PR ports/179637; it has been noted by GNATS.

From: Mark Linimon <lin...@lonesome.com>
To: Marcel Bonnet <monov...@gmail.com>
Cc: bug-fo...@FreeBSD.org
Subject: Re: ports/179637: patch for new feature
Date: Mon, 17 Jun 2013 13:25:08 -0500

to which port does this PR apply?

Mono Vox

unread,
Jun 18, 2013, 9:10:01 AM6/18/13
to
The following reply was made to PR ports/179637; it has been noted by GNATS.

From: Mono Vox <monov...@gmail.com>
To: Mark Linimon <lin...@lonesome.com>
Cc: bug-fo...@freebsd.org
Subject: Re: ports/179637: patch for new feature
Date: Tue, 18 Jun 2013 10:01:46 -0300

--089e0149c9cecb3b2104df6d503d
Content-Type: text/plain; charset=ISO-8859-1

On 17 June 2013 15:25, Mark Linimon <lin...@lonesome.com> wrote:

> to which port does this PR apply?
>

I'm sorry, it applies to: ports-mgmt/portupdate-scan

thanks.

--089e0149c9cecb3b2104df6d503d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On 17 June 2013 15:25, Mark Linimon <spa=
n dir=3D"ltr">&lt;<a href=3D"mailto:lin...@lonesome.com" target=3D"_blank"=
>lin...@lonesome.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x">
to which port does this PR apply?<br>
</blockquote></div><br>I&#39;m sorry, it applies to: ports-mgmt/portupdate-=
scan<br><br>thanks.<br>

--089e0149c9cecb3b2104df6d503d--
0 new messages