annotate contrib/docker/fedora21 @ 24158:d414c28db84d stable

largefiles: access to specific fields only if largefiles enabled (issue4547) Even if largefiles extension is enabled in a repository, "repo" object, which isn't "largefiles.reposetup()"-ed, is passed to overridden functions in the cases below unexpectedly, because extensions are enabled for each repositories strictly. (1) clone without -U: (2) pull with -U: (3) pull with --rebase: combination of "enabled@src", "disabled@dst" and "not-required@src" cause this situation. largefiles requirement @src @dst @src result -------- -------- --------------- -------------------- enabled disabled not-required aborted unexpectedly required requirement error (intentional) -------- -------- --------------- -------------------- enabled enabled * success -------- -------- --------------- -------------------- disabled enabled * success (only for "pull") -------- -------- --------------- -------------------- disabled disabled not-required success required requirement error (intentional) -------- -------- --------------- -------------------- (4) update/revert with a subrepo disabling largefiles In these cases, overridden functions cause accessing to largefiles specific fields of not "largefiles.reposetup()"-ed "repo" object, and execution is aborted. - (1), (2), (4) cause accessing to "_lfstatuswriters" in "getstatuswriter()" invoked via "updatelfiles()" - (3) causes accessing to "_lfcommithooks" in "overriderebase()" For safe accessing to these fields, this patch examines whether passed "repo" object is "largefiles.reposetup()"-ed or not before accessing to them. This patch chooses examining existence of newly introduced "_largefilesenabled" instead of "_lfcommithooks" and "_lfstatuswriters" directly, because the former is better name for the generic "largefiles is enabled in this repo" mark than the latter. In the future, all other overridden functions should avoid largefiles specific processing for efficiency, and "_largefilesenabled" is better also for such purpose. BTW, "lfstatus" can't be used for such purpose, because some code paths set it forcibly regardless of existence of it in specified "repo" object.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 26 Feb 2015 06:03:39 +0900
parents 272b1cc3e83e
children 1baa077214ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23882
272b1cc3e83e docker: support Fedora 21
Mads Kiilerich <madski@unity3d.com>
parents: 22444
diff changeset
1 FROM fedora:21
21255
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
2 RUN yum install -y gcc
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
3 RUN yum install -y python-devel python-docutils
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
4 RUN yum install -y make
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5 RUN yum install -y rpm-build
62a2749895e4 build: initial support for in-tree autobuilding recipes
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 RUN yum install -y gettext
22444
49ea49823769 dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents: 22442
diff changeset
7 # For creating repo meta data
49ea49823769 dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents: 22442
diff changeset
8 RUN yum install -y createrepo