summaryrefslogtreecommitdiffstats
path: root/bin/patch_capabilities.pl
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-01-27 14:43:54 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-01-27 14:57:07 +0200
commit0b2bde7af1ec6cec5c1bc674c9049b12fe0deb20 (patch)
treedc0a3541c65e5e908da7b929472b48db59394e98 /bin/patch_capabilities.pl
parentac1a7e4469050aa70d065e3c7def9b3fe7aca4a8 (diff)
Added support for embedded sis name/uid patching for Symbian
Patch_capabilities.pl script now also patches any embedded sis file entries in pkg to embed corresponding *_selfsigned.sis instead. Also the script now removes dependencies to other packages from patched pkg to reduce unnecessary warnings about missing dependencies when said dependencies were installed via patched sises. Reviewed-by: Janne Koskinen
Diffstat (limited to 'bin/patch_capabilities.pl')
-rwxr-xr-xbin/patch_capabilities.pl21
1 files changed, 20 insertions, 1 deletions
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index b6bf5c3bcf..9daa13eb2e 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -111,12 +111,31 @@ if (@ARGV)
# Parse each line.
while (<PKG>)
{
+ # Patch pkg UID
my $line = $_;
my $newLine = $line;
- if ( $line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/)
+ if ($line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/)
{
$newLine =~ s/\(0x./\(0xE/;
}
+
+ # Patch embedded sis name and UID
+ if ($line =~ m/^@.*\.sis.*\(0x[0-9|a-f|A-F]*\).*$/)
+ {
+ $newLine =~ s/\(0x./\(0xE/;
+ if ($line !~ m/^.*_selfsigned.sis.*$/)
+ {
+ $newLine =~ s/\.sis/_selfsigned\.sis/i;
+ }
+ }
+
+ # 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]*\).*\{.*\}$/)
+ {
+ $newLine = ""
+ }
+
print NEW_PKG $newLine;
chomp ($line);