* [patch] POM-NG: runme message clarification and filename regex fixes (v3)
@ 2007-01-11 18:21 Alan Ezust
2007-01-11 23:44 ` Jonas Berlin
2007-01-12 16:20 ` Patrick McHardy
0 siblings, 2 replies; 3+ messages in thread
From: Alan Ezust @ 2007-01-11 18:21 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]
This patch (3rd attempt to submit), includes fixes to the messages, to clarify
where things went wrong (when they do go wrong), and also avoids picking up
backup files in the patchlets directory.
Cheers --alan
--
Alan Ezust www.presinet.com
Presinet, inc alan.ezust@presinet.com
Victoria, BC, Canada
[-- Attachment #1.2: runme.patch --]
[-- Type: text/x-diff, Size: 4003 bytes --]
Index: Netfilter_POM.pm
===================================================================
--- Netfilter_POM.pm (revision 6735)
+++ Netfilter_POM.pm (working copy)
@@ -361,12 +361,13 @@
opendir(DIR, $dir)
or croak "can't open directory $dir: $!";
# Don't miss .foo-test files!
- my @dents = sort grep {!/^(\.\.?|CVS|\.svn)$/} readdir(DIR);
+ my @dents = sort grep {!/^(\.\.?|CVS|\.svn|.*~)$/} readdir(DIR);
closedir(DIR);
foreach my $dent (@dents) {
my $fullpath = "$dir/$dent";
if (-f $fullpath) {
- push(@{$patchlet->{$dent =~ /\.ladd/ ? 'ladds' : 'files'}->{$proj}->{$ver}}, "$pdir/$fullpath");
+ my $key = ($dent =~ /\.ladd/ ? 'ladds' : 'files');
+ push(@{$patchlet->{$key}->{$proj}->{$ver}}, "$pdir/$fullpath");
} elsif (-d _) {
$self->recurse($pdir, $fullpath, $patchlet, $proj, $ver);
}
@@ -486,7 +487,7 @@
# get list of source files that we'd need to copy
opendir(PDIR, $patchdir)
or croak "unable to open patchdir $patchdir: $!";
- my @dents = sort readdir(PDIR);
+ my @dents = sort grep {!/^(\.\.?|CVS|\.svn|.*~)$/} readdir(PDIR);
closedir(PDIR);
foreach my $pf (@dents) {
@@ -494,7 +495,6 @@
my $ver;
my $oldpwd;
- next if $pf =~ /^(\.|CVS$)/;
if ($pf =~ /\.patch/) {
# Patch file of a project:
@@ -820,22 +820,22 @@
print "patch output was:\n$patch_output\n";
}
if ($missing_files != 0) {
- $self->{ERRMSG} .= "cannot apply ($missing_files missing files)\n";
+ $self->{ERRMSG} .= "cannot apply $patchfile: ($missing_files missing files)\n";
return 0;
# } elsif ($rejects*2 > $hunks) {
} elsif ($rejects != 0) {
- $self->{ERRMSG} .= "cannot apply ($rejects rejects out of $hunks hunks)\n";
+ $self->{ERRMSG} .= "cannot apply $patchfile: ($rejects rejects out of $hunks hunks)\n";
return 0;
} else {
# could be applied!
- #printf(" ALREADY APPLIED (%d rejects out of %d hunks)\n", $rejects, $hunks;
+ #printf(" ALREADY APPLIED $patchfile: (%d rejects out of %d hunks)\n", $rejects, $hunks;
}
} else {
if ($missing_files != 0) {
- $self->{ERRMSG} .= "ERROR ($missing_files missing files)\n";
+ $self->{ERRMSG} .= "$patchfile: ERROR ($missing_files missing files)\n";
return 0;
} elsif ($rejects != 0) {
- $self->{ERRMSG} .= "ERROR ($rejects rejects out of $hunks hunks)\n";
+ $self->{ERRMSG} .= "$patchfile: ERROR ($rejects rejects out of $hunks hunks)\n";
return 0;
}
}
Index: runme
===================================================================
--- runme (revision 6735)
+++ runme (working copy)
@@ -3,7 +3,7 @@
# runme.pl, part of the patch-o-matig 'next generation' package.
# (C) 2003-2004 by Harald Welte <laforge@netfilter.org>
# 2004 by Jozsef Kadlecsik <kadlec@blackhole.kfki.ho>
-#
+# 2006 small fixes by Alan Ezust <alan.ezust@presinet.com>
# This script is subject to the GNU GPLv2
#
# $Id$
@@ -75,7 +75,7 @@
my @patchlets;
my @repositories;
-my $clrscr = "\n\n\n\n\n\n\n\n\n\n";
+my $clrscr = "\n\n\n\n\n";
my $opt_batch;
my $opt_verbose;
@@ -346,15 +346,16 @@
print($clrscr);
print_header($session);
- print("Already applied: ", join(" ", @{$session->{applied}}),"\n\n");
+ print("Already applied: ", join(" ", @{$session->{applied}}),"\n");
next PATCHLET unless $session->requirements_fulfilled($patchlet);
print("Testing ${plname}... ");
if (grep($_ eq $plname, @{$session->{applied}})) {
- print("applied\n");
+ print("already applied.\n");
next PATCHLET;
- } elsif ($session->apply_patchlet($patchlet, !$opt_reverse, 1, "/tmp/pom-$$", $opt_verbose)) {
- print("applied\n");
+ }
+ elsif ($session->apply_patchlet($patchlet, !$opt_reverse, 1, "/tmp/pom-$$", $opt_verbose)) {
+ print("Reverse Test passed - assuming already applied.\n");
push(@{$session->{applied}}, $plname);
next PATCHLET;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] POM-NG: runme message clarification and filename regex fixes (v3)
2007-01-11 18:21 [patch] POM-NG: runme message clarification and filename regex fixes (v3) Alan Ezust
@ 2007-01-11 23:44 ` Jonas Berlin
2007-01-12 16:20 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: Jonas Berlin @ 2007-01-11 23:44 UTC (permalink / raw)
To: Alan Ezust; +Cc: netfilter-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
Quoting Alan Ezust on 01/11/2007 06:21 PM UTC:
> This patch (3rd attempt to submit), includes fixes to the messages, to clarify
> where things went wrong (when they do go wrong), and also avoids picking up
> backup files in the patchlets directory.
Nice! (haven't tested it yet though =)
- - xkr47
- --
"if I'd make up my own definitions, unrational would be the the end
result after someone unrationalized something i.e. actively worked
to cut down on rationality, whereas irrational would be more a
result of laziness or lack of skill"
- me, 23.11.2006
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFFpsvZxyF48ZTvn+4RA05cAJ4+BO5mfDWjqnbbRCoZAKrmFg1rVgCdE6v+
hoAfmU9EZZ9GSj5JpOIl2m0=
=1pyI
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] POM-NG: runme message clarification and filename regex fixes (v3)
2007-01-11 18:21 [patch] POM-NG: runme message clarification and filename regex fixes (v3) Alan Ezust
2007-01-11 23:44 ` Jonas Berlin
@ 2007-01-12 16:20 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2007-01-12 16:20 UTC (permalink / raw)
To: Alan Ezust; +Cc: netfilter-devel
Alan Ezust wrote:
> This patch (3rd attempt to submit), includes fixes to the messages, to clarify
> where things went wrong (when they do go wrong), and also avoids picking up
> backup files in the patchlets directory.
I fixed the whitespace damage and applied it, thanks.
> - } elsif ($session->apply_patchlet($patchlet, !$opt_reverse, 1, "/tmp/pom-$$", $opt_verbose)) {
> - print("applied\n");
> + }
> + elsif ($session->apply_patchlet($patchlet, !$opt_reverse, 1, "/tmp/pom-$$", $opt_verbose)) {
Please make sure you don't mix reformating like this with
real changes.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-12 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 18:21 [patch] POM-NG: runme message clarification and filename regex fixes (v3) Alan Ezust
2007-01-11 23:44 ` Jonas Berlin
2007-01-12 16:20 ` Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.