summaryrefslogtreecommitdiffstats
path: root/bin/patch_capabilities.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/patch_capabilities.pl')
-rwxr-xr-xbin/patch_capabilities.pl35
1 files changed, 31 insertions, 4 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 9daa13e..f82c48f 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -108,6 +108,8 @@ if (@ARGV)
open (NEW_PKG, ">>".$tempPkgFileName);
open (PKG, "<".$pkgFileName);
+ my $manufacturerElseBlock = 0;
+
# Parse each line.
while (<PKG>)
{
@@ -129,11 +131,36 @@ if (@ARGV)
}
}
- # Remove all dependencies to other packages to reduce unnecessary error messages
- # from depended packages that are also patched and therefore have different UID.
- if ($line =~ m/^\(0x[0-9|a-f|A-F]*\).*\{.*\}$/)
+ # Remove dependencies to known problem packages (i.e. packages that are likely to be patched, also)
+ # to reduce unnecessary error messages.
+ if ($line =~ m/^\(0x2002af5f\).*\{.*\}$/)
+ {
+ $newLine = "\n"
+ }
+ if ($line =~ m/^\(0x2001E61C\).*\{.*\}$/)
+ {
+ $newLine = "\n"
+ }
+
+ # Remove manufacturer ifdef
+ if ($line =~ m/^.*\(MANUFACTURER\)\=\(.*\).*$/)
+ {
+ $newLine = "\n";
+ }
+
+ if ($line =~ m/^ELSEIF.*MANUFACTURER$/)
+ {
+ $manufacturerElseBlock = 1;
+ }
+
+ if ($manufacturerElseBlock eq 1)
+ {
+ $newLine = "\n";
+ }
+
+ if ($line =~ m/^ENDIF.*MANUFACTURER$/)
{
- $newLine = ""
+ $manufacturerElseBlock = 0;
}
print NEW_PKG $newLine;