Opened on 09/18/2014 at 02:59:09 PM
Closed on 09/22/2014 at 05:08:43 PM
#1398 closed defect (fixed)
Improve backwards-compatibility of ensure_dependencies.py
Reported by: | matze | Assignee: | AAlvz |
---|---|---|---|
Priority: | P4 | Milestone: | |
Module: | Automation | Keywords: | infrastructure hg git |
Cc: | trev, fhd, AAlvz, poz2k4444 | Blocked By: | |
Blocking: | Platform: | Unknown | |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
http://codereview.adblockplus.org/5254149566365696/ |
Description
Reading the current version of git(1) repositories in ensure_dependencies.py currently fails in less recent versions of the tool - which do not understand the -C option.
Attachments (0)
Change History (9)
comment:1 Changed on 09/18/2014 at 03:08:36 PM by matze
- Owner set to AAlvz
comment:2 Changed on 09/18/2014 at 03:09:26 PM by matze
- Component changed from Unknown to Build-and-Release-Tools
comment:3 Changed on 09/18/2014 at 03:34:30 PM by AAlvz
comment:4 Changed on 09/18/2014 at 07:29:51 PM by trev
- Priority changed from Unknown to P4
- Ready set
According to this answer, the --git-dir flag isn't sufficient - one has to use --work-dir as well. However, if it is really that problematic then there is a much simpler solution - just pass in cwd=repo parameter to subprocess.check_call().
comment:6 Changed on 09/22/2014 at 01:07:33 PM by matze
@trev: You're right, the call in the Git.update() method requires a --work-tree option as well (this issue was masked before, as the process bailed out way earlier). Since your suggested cwd= solution seems like the most simple and portable one, we'll simply use it for each invocation of git(1) - rather than only the one requiring both --git-dir and --work-tree.
comment:7 Changed on 09/22/2014 at 01:20:12 PM by matze
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:8 Changed on 09/22/2014 at 03:20:42 PM by matze
After the LGTM in review, the only thing missing so far is the push into the buildtools repo - which I cannot perform due to missing permission for both, buildtools and jshydra. @trev/@fhd Do you want to commit there or grant me the permissions?
The changes have been merged and pushed into the infrastructure repo already, however.
comment:9 Changed on 09/22/2014 at 05:08:43 PM by trev
- Resolution set to fixed
- Status changed from reviewing to closed
Since this is a standard package from an active Ubuntu LTS, which is also an OS used in our production environment, I consider this a supported version of Ubuntu and this issue a valid bug:
We've patched the ensure_dependencies.py script, applying the following modifications:
This seems to be a valid workaround that is compatible with more recent versions of git(1) (e.g. 2.1.0, deb/jessie) as well.
We'll publish a more sophisticated version (using native path merging, for example) for review later.