RESOLVED FIXED 76585
[GTK] ensure the jhbuild used by webkit is as up-to-date as needed
https://bugs.webkit.org/show_bug.cgi?id=76585
Summary [GTK] ensure the jhbuild used by webkit is as up-to-date as needed
Gustavo Noronha (kov)
Reported 2012-01-18 15:57:09 PST
[GTK] ensure the jhbuild used by webkit is as up-to-date as needed
Attachments
Patch (3.42 KB, patch)
2012-01-18 15:59 PST, Gustavo Noronha (kov)
no flags
Patch (3.43 KB, patch)
2012-01-19 03:21 PST, Gustavo Noronha (kov)
no flags
Patch (5.84 KB, patch)
2012-01-19 11:22 PST, Gustavo Noronha (kov)
no flags
Gustavo Noronha (kov)
Comment 1 2012-01-18 15:59:14 PST
Martin Robinson
Comment 2 2012-01-18 17:51:34 PST
Comment on attachment 123029 [details] Patch Won't this break if we bump jhbuild_revision after someone has already called update-webkitgtk-libs?
Gustavo Noronha (kov)
Comment 3 2012-01-18 20:42:03 PST
Gustavo Noronha (kov)
Comment 4 2012-01-19 03:21:53 PST
Gustavo Noronha (kov)
Comment 5 2012-01-19 03:29:47 PST
Somehow a bad revision hash (it's actually from soup!) sneaked into the patch, I wonder how. This new one should work =)
Gustavo Noronha (kov)
Comment 6 2012-01-19 03:51:48 PST
Comment on attachment 123094 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123094&action=review > Tools/gtk/run-with-jhbuild:23 > +jhbuild_revision = '1eedc423f75c605224b430579e4c303292199507' (In reply to comment #2) > (From update of attachment 123029 [details]) > Won't this break if we bump jhbuild_revision after someone has already called update-webkitgtk-libs? It won't, my main concern when writing this patch was actually to bring existing jhbuild checkouts up-to-date, for cases like the one we had recently, where we required a bug fix, so we don't need to manually update it. Here's how it works: > Tools/gtk/run-with-jhbuild:83 > + process = subprocess.Popen(['git', 'rev-list', 'HEAD^..'], cwd=jhbuild_source_path, > + stdout=subprocess.PIPE, stderr=subprocess.PIPE) This code is here to check that we have the desired revision - this is the code path we'll hit when jhbuild is already cloned/installed. Then it calls install_and_run_jhbuild(), where this change makes it do the right thing: > Tools/gtk/run-with-jhbuild:44 > + else: > + process = subprocess.Popen(['git', 'remote', 'update', 'origin'], cwd=source_path) > + process.wait() > + if process.returncode != 0: > + raise Exception('jhbuild remote update origin failed with return code: %i' % process.returncode) This else block is the code path we'll hit in this case as well - it will run git remote update origin to fetch the new data from the repository, = so that the checkout that follows is able to checkout the revision =)
Martin Robinson
Comment 7 2012-01-19 09:17:26 PST
Comment on attachment 123094 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123094&action=review >> Tools/gtk/run-with-jhbuild:83 >> + stdout=subprocess.PIPE, stderr=subprocess.PIPE) > > This code is here to check that we have the desired revision - this is the code path we'll hit when jhbuild is already cloned/installed. Then it calls install_and_run_jhbuild(), where this change makes it do the right thing: Ah, I get it now! I would suggest a small refactor. Make a helper function called install_or_update_jhbuild that does the outer check and then move this code and the code above to a helper function called "update_jhbuild." This patch has the unintended consequence of updating jhbuild modules even when the user didn't request it.
Gustavo Noronha (kov)
Comment 8 2012-01-19 11:22:51 PST
Martin Robinson
Comment 9 2012-01-19 11:27:51 PST
Comment on attachment 123155 [details] Patch Thanks!
Gustavo Noronha (kov)
Comment 10 2012-01-19 18:45:27 PST
Comment on attachment 123155 [details] Patch Clearing flags on attachment: 123155 Committed r105472: <http://trac.webkit.org/changeset/105472>
Gustavo Noronha (kov)
Comment 11 2012-01-19 18:45:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.