Changeset 223536 in webkit
- Timestamp:
- Oct 17, 2017 6:54:55 AM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r223502 r223536 1 2017-10-17 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr> 2 3 [GStreamer][GTK][WPE] update-webkit-libs-jhbuild fails to detect changes in included moduleset files 4 https://bugs.webkit.org/show_bug.cgi?id=178206 5 6 Reviewed by Michael Catanzaro. 7 8 The update-webkit-libs-jhbuild scripts computes MD5 sum of GTK/WPE jhbuild configuration files to check if it 9 needs to rebuild the dependencies libraries. This patch fixes a bug when main GTK/WPE jhbuild modules 10 configuration file includes additional files (for example GStreamer module). It parses jhbuild.modules file to 11 check if additional files are included. If any, it computes MD5 sum for each of these included files. 12 13 * Scripts/update-webkit-libs-jhbuild: 14 (getJhbuildIncludedFilePaths): New function that returns included files in jhbuild.modules 15 (jhbuildConfigurationCheckFile): New function to check if MD5 sum file changes. 16 (jhbuildConfigurationChanged): Add MD5 sum check for included files. 17 (saveMd5File): New function to save MD5 sum of a file. 18 (saveJhbuildMd5): Add saving included files MD5 sum. 19 (deleteJhbuildMd5): Delete included files MD5 sum 20 * gtk/install-dependencies: Add perl-libXML lib that is used to parse jhbuild file. 21 * wpe/install-dependencies: Ditto. 22 1 23 2017-10-17 Tomas Popela <tpopela@redhat.com> 2 24 -
trunk/Tools/Scripts/update-webkit-libs-jhbuild
r223326 r223536 3 3 # Copyright (C) 2012 Intel Corporation 4 4 # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies). 5 # Copyright (C) 2016 Canon Inc. 5 6 # 6 7 # This library is free software; you can redistribute it and/or … … 22 23 use webkitdirs; 23 24 use Getopt::Long qw(:config pass_through); 25 use XML::LibXML; 24 26 25 27 my $platform = ""; … … 39 41 ); 40 42 43 sub getJhbuildIncludedFilePaths 44 { 45 my $jhbuildFile = shift; 46 my $dom = XML::LibXML->load_xml(location => $jhbuildFile); 47 my @includes; 48 49 foreach my $includeFile ($dom->findnodes('/moduleset/include/@href')) { 50 push(@includes, $includeFile->to_literal()); 51 } 52 return @includes; 53 } 54 41 55 sub getMD5HashForFile($) 42 56 { … … 55 69 } 56 70 71 sub jhbuildConfigurationCheckFile 72 { 73 my $file = shift; 74 my $path = join('/', getJhbuildPath(), $platform, $file . '.md5sum'); 75 if (! -e $path) { 76 return 1; 77 } 78 79 # Get the md5 sum of the file we're testing, look in the right platform directory. 80 my $actualFile = join('/', sourceDir(), 'Tools', $platform, $file); 81 my $currentSum = getMD5HashForFile($actualFile); 82 83 # Get our previous record. 84 open(PREVIOUS_MD5, $path); 85 chomp(my $previousSum = <PREVIOUS_MD5>); 86 close(PREVIOUS_MD5); 87 88 if ($previousSum ne $currentSum) { 89 return 1; 90 } 91 } 92 57 93 sub jhbuildConfigurationChanged() 58 94 { 59 foreach my $file (qw(jhbuildrc jhbuild.modules)) { 60 my $path = join('/', getJhbuildPath(), $file . '.md5sum'); 61 if (! -e $path) { 62 return 1; 63 } 95 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules'); 96 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules); 97 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 64 98 65 # Get the md5 sum of the file we're testing, look in the right platform directory. 66 my $actualFile = join('/', sourceDir(), 'Tools', $platform, $file); 67 my $currentSum = getMD5HashForFile($actualFile); 68 69 # Get our previous record. 70 open(PREVIOUS_MD5, $path); 71 chomp(my $previousSum = <PREVIOUS_MD5>); 72 close(PREVIOUS_MD5); 73 74 if ($previousSum ne $currentSum) { 99 foreach my $file (@jhbuildFiles) { 100 if (jhbuildConfigurationCheckFile($file)) { 75 101 return 1; 76 102 } … … 78 104 } 79 105 106 sub saveMd5File 107 { 108 my $file = shift; 109 my $path = realpath(dirname(join('/', getJhbuildPath(), $platform, $file))); 110 (-d $path) || mkpath $path; 111 112 $path = join('/', getJhbuildPath(), $platform); 113 my $source = join('/', sourceDir(), "Tools", $platform, $file); 114 my $destination = join('/', $path, $file); 115 open(SUM, ">$destination" . ".md5sum"); 116 print SUM getMD5HashForFile($source); 117 close(SUM); 118 } 119 80 120 sub saveJhbuildMd5() { 81 121 # Save md5sum for jhbuild-related files.saveJhbuildMd5(); 82 122 my $jhbuildPath = getJhbuildPath(); 123 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules'); 124 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules); 125 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 126 83 127 (-d $jhbuildPath) || mkpath $jhbuildPath; 84 foreach my $file (qw(jhbuildrc jhbuild.modules)) { 85 my $source = join('/', sourceDir(), "Tools", $platform, $file); 86 my $destination = join('/', $jhbuildPath, $file); 87 open(SUM, ">$destination" . ".md5sum"); 88 print SUM getMD5HashForFile($source); 89 close(SUM); 128 foreach my $file (@jhbuildFiles) { 129 saveMd5File($file); 90 130 } 91 131 } … … 96 136 return; 97 137 } 98 foreach my $file (qw(jhbuildrc jhbuild.modules)) { 99 my $md5File = join('/', $jhbuildPath, $file) . ".md5sum"; 138 139 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules'); 140 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules); 141 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 142 143 foreach my $file (@jhbuildFiles) { 144 my $md5File = join('/', $jhbuildPath, $platform, $file) . ".md5sum"; 100 145 unlink($md5File) if -e $md5File; 101 146 } -
trunk/Tools/gtk/install-dependencies
r222834 r223536 204 204 libtool-bin \ 205 205 libudev-dev \ 206 libxml-libxml-perl \ 206 207 python-dev \ 207 208 ragel \ … … 352 353 mtdev \ 353 354 orc \ 355 perl-xml-libxml\ 354 356 python2 \ 355 357 python2-lxml \ … … 495 497 mtdev-devel \ 496 498 orc-devel \ 499 perl-libxml-perl \ 497 500 ragel \ 498 501 systemd-devel \ -
trunk/Tools/wpe/install-dependencies
r221010 r223536 121 121 libvpx-dev \ 122 122 libxcb-xkb-dev \ 123 libxml-libxml-perl \ 123 124 luajit" 124 125 … … 208 209 opus \ 209 210 orc \ 211 perl-xml-libxml\ 210 212 v4l-utils" 211 213 … … 285 287 opus-devel \ 286 288 orc-devel \ 289 perl-libxml-perl \ 287 290 pulseaudio-libs-devel" 288 291
Note: See TracChangeset
for help on using the changeset viewer.