Skip to contentSkip to conversation

PoM-NG question

DISCUSSION KOVACS Krisztian 2 participants 3 messages Apr 7, 2004 – Apr 8, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

Is it possible to use more than one .patch file in a patchlet? I mean,
I'd like to incorporate a complete, broken-out patchtree into a patchlet. Is this possible ATM?

Signature · 2 lines
 Regards,
   Krisztian KOVACS
#1 lore raw
Quoted 6 lines · KOVACS Krisztian

Hi,

Is it possible to use more than one .patch file in a patchlet? I mean,
I'd like to incorporate a complete, broken-out patchtree into a patchlet. Is this possible ATM?

AFAIK it's not possible. Such a feature would be great, though.

Regards
Patrick

#2 lore raw

Hi,

Quoted 6 lines · Patrick McHardy
Quoted 4 lines

Is it possible to use more than one .patch file in a patchlet? I mean,
I'd like to incorporate a complete, broken-out patchtree into a patchlet. Is this possible ATM?

AFAIK it's not possible. Such a feature would be great, though.

I've created a patch which adds support for broken out patches in
pom-ng. Please review, I'm not much of a Perl user... The patch supports broken-out patch names like 01-foo-linux-2.4.patch, however, retains compatibility with previous versions, so that names like linux-2.4.patch can be used as well.

Another fix is attached, this is for the runme script to do not omit
warnings that OSPEED is not set.

Signature · 2 lines
 Regards,
   Krisztian KOVACS

Index: Netfilter_POM.pm
===================================================================
RCS file: /cvspublic/patch-o-matic-ng/Netfilter_POM.pm,v retrieving revision 1.19

Netfilter_POM.pm +14 -8
diff -u -r1.19 Netfilter_POM.pm
@@ -407,8 +407,11 @@
 
 	# save the filename of the patch itself
 	foreach my $pf (@dents) {
-		if ($pf =~ /(([^-]+)(-([\d\.]*))?\.patch)$/) {
-			$patchlet{patch}{$2}{$4} = $1;
+		if ($pf =~ /(((\d+-[^-]+)-)?(([^-]+)(-([\d\.]*)))?\.patch)$/) {
+			if (!defined($patchlet{patch}{$5}{$7})) {
+				$patchlet{patch}{$5}{$7} = [];
+			}
+			push @{$patchlet{patch}{$5}{$7}}, $1;
 		}
 	}
 
@@ -733,16 +736,19 @@
 			if ($test) {
 				$options .= "--dry-run ";
 			}
-			my $patchfile = ($$patchlet{basedir}.'/'.$$patchlet{patch}{$proj}{best});
-			my $cmd = sprintf("%s -f -p1 -d %s %s < %s", 
-					  $BIN_PATCH, $projpath, 
-					  $options,
-					  $patchfile);
+
+			my @patchfiles = sort map { $$patchlet{basedir}.'/'.$_ } @{$$patchlet{patch}{$proj}{best}};
+			my $patchfiles = join ' ', @patchfiles;
+			my $cmd = sprintf("cat %s | %s -f -p1 -d %s %s",
+					  $patchfiles,
+					  $BIN_PATCH, $projpath,
+					  $options);
 
 			my $missing_files;
 			my $rejects;
 			my $notempty;
-			my $hunks = count_hunks($patchfile);
+			my $hunks = 0;
+			map { $hunks += count_hunks($_) } @patchfiles;
 			open(PATCH, "$cmd|") || die("can't start patch '$cmd': $!\n");
 			while (my $line = <PATCH>) {
 				# FIXME: parse patch output

Index: runme
===================================================================
RCS file: /cvspublic/patch-o-matic-ng/runme,v
retrieving revision 1.15

runme +1 -1
diff -u -r1.15 runme
@@ -234,7 +234,7 @@
 }
 
 if (defined($ENV{TERM}) && !$opt_batch) {
-	my $terminal = Tgetent Term::Cap {};
+	my $terminal = Tgetent Term::Cap { OSPEED => 9600 };
 	$clrscr = $terminal->Tputs('cl', 1);
 }