From: Clark Williams williams@redhat.com
redhat: remove unused script redhat/configs/merge.pl
The perl script redhat/configs/merge.pl was rewritten for maintainability reasons into python as merge.py. Remove the unused script.
Signed-off-by: Clark Williams williams@redhat.com
diff --git a/redhat/configs/merge.pl b/redhat/configs/merge.pl deleted file mode 100755 index blahblah..blahblah 0 --- a/redhat/configs/merge.pl +++ /dev/null @@ -1,72 +0,0 @@ -#! /usr/bin/perl - -my @args=@ARGV; -my %configvalues; -my @configoptions; -my $configcounter = 0; - -# optionally print out the architecture as the first line of our output -my $arch = $args[2]; -if (defined $arch) { - print "# $arch\n"; -} - -# first, read the override file - -open (FILE,"$args[0]") || die "Could not open $args[0]"; -while (<FILE>) { - my $str = $_; - my $configname; - - if (/# ([\w]+) is not set/) { - $configname = $1; - } elsif (/^#/) { - # fall through on comments like 'avoid CONFIG_FOO=y' - ; - } elsif (/([\w]+)=/) { - $configname = $1; - } - - if (defined($configname) && !exists($configvalues{$configname})) { - $configvalues{$configname} = $str; - $configoptions[$configcounter] = $configname; - $configcounter ++; - } -}; - -# now, read and output the entire configfile, except for the overridden -# parts... for those the new value is printed. - -open (FILE2,"$args[1]") || die "Could not open $args[1]"; -while (<FILE2>) { - my $configname; - - if (/# ([\w]+) is not set/) { - $configname = $1; - } elsif (/^#/) { - # fall through on comments like 'avoid CONFIG_FOO=y' - ; - } elsif (/([\w]+)=/) { - $configname = $1; - } - - if (defined($configname) && exists($configvalues{$configname})) { - print "$configvalues{$configname}"; - delete($configvalues{$configname}); - } else { - print "$_"; - } -} - -# now print the new values from the overridden configfile -my $counter = 0; - -while ($counter < $configcounter) { - my $configname = $configoptions[$counter]; - if (exists($configvalues{$configname})) { - print "$configvalues{$configname}"; - } - $counter++; -} - -1;
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2246
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2246#note_1241282...
Looks like you have a few other files to modify:
``` [prarit@prarit redhat]$ git grep "merge.pl" Makefile:637: configs/merge.pl \ configs/merge.py:6:# merge.py - a direct replacement for merge.pl in the redhat/configs directory kernel.changelog-9.99:156:- redhat: python replacement for merge.pl (Clark Williams) kernel.changelog-9.99:1623:- merge.pl: Avoid comments but do not skip them (Don Zickus) kernel.spec.template:852:Source3000: merge.pl kernel.spec.template:1484:# merge.pl kernel.spec.template:1495: ./merge.pl %{SOURCE3001} $i.tmp > $i kernel.spec.template:1500: ./merge.pl %{SOURCE75} $i.tmp > $i ```
Of course, the changelog can be ignored but those other locations do need to be cleaned up.
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2246#note_1241293...
Wups, I'll clean that up and repush shortly
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2246#note_1244696...
Discovered a couple of corner-cases that need to be addressed in merge.py. Closing this MR and will file a new MR to address merge.py failures
kernel@lists.fedoraproject.org