Merge lp:~zsombi/ubuntu-ui-toolkit/theme-paths into lp:ubuntu-ui-toolkit
- theme-paths
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Zsombor Egri |
Approved revision: | 794 |
Merged at revision: | 801 |
Proposed branch: | lp:~zsombi/ubuntu-ui-toolkit/theme-paths |
Merge into: | lp:ubuntu-ui-toolkit |
Diff against target: |
435 lines (+222/-30) 10 files modified
modules/Ubuntu/Components/plugin/uctheme.cpp (+84/-24) modules/Ubuntu/Components/plugin/uctheme.h (+3/-0) tests/resources/themes/CustomTheme/TestStyle.qml (+22/-0) tests/resources/themes/CustomTheme/parent_theme (+1/-0) tests/resources/themes/TestModule/TestTheme/TestStyle.qml (+22/-0) tests/resources/themes/TestModule/TestTheme/parent_theme (+1/-0) tests/resources/themes/TestModule/TestTheme/qmldir (+2/-0) tests/unit/unit.pro (+1/-2) tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp (+85/-3) tests/unit_x11/unit_x11.pro (+1/-1) |
To merge this branch: | bzr merge lp:~zsombi/ubuntu-ui-toolkit/theme-paths |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Cris Dywan | Approve | ||
Review via email: mp+190534@code.launchpad.net |
Commit message
Support for taking themes from XDG_DATA_DIRS as well as from ~/.local/share. These paths are also added as import paths. UBUNTU_
Description of the change
Zsombor Egri (zsombi) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:793
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
Cris Dywan (kalikiana) wrote : | # |
Nice stuff.
Seems like the MR is failing on unrelated stuff, also runs fine for me locally.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
- 794. By Zsombor Egri
-
trunk merge
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:794
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'modules/Ubuntu/Components/plugin/uctheme.cpp' |
2 | --- modules/Ubuntu/Components/plugin/uctheme.cpp 2013-09-09 08:03:42 +0000 |
3 | +++ modules/Ubuntu/Components/plugin/uctheme.cpp 2013-10-21 08:57:44 +0000 |
4 | @@ -20,6 +20,7 @@ |
5 | #include "uctheme.h" |
6 | #include "listener.h" |
7 | #include "quickutils.h" |
8 | +#include "i18n.h" |
9 | |
10 | #include <QtQml/qqml.h> |
11 | #include <QtQml/QQmlEngine> |
12 | @@ -69,11 +70,34 @@ |
13 | |
14 | const QString THEME_FOLDER_FORMAT("%1/%2/"); |
15 | const QString PARENT_THEME_FILE("parent_theme"); |
16 | +const char *ENV_PATH = "UBUNTU_UI_TOOLKIT_THEMES_PATH"; |
17 | + |
18 | +QStringList themeSearchPath() { |
19 | + QString envPath = QLatin1String(getenv("UBUNTU_UI_TOOLKIT_THEMES_PATH")); |
20 | + QStringList pathList = envPath.split(':', QString::SkipEmptyParts); |
21 | + if (pathList.isEmpty()) { |
22 | + // get the default path list from generic data location, which contains |
23 | + // ~/.local/share and XDG_DATA_DIRS |
24 | + pathList << QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); |
25 | + } |
26 | + // fix folders |
27 | + QStringList result; |
28 | + Q_FOREACH(const QString &path, pathList) { |
29 | + if (QDir(path).exists()) { |
30 | + result << path + '/'; |
31 | + } |
32 | + } |
33 | + // append standard QML2_IMPORT_PATH value |
34 | + result << QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); |
35 | + return result; |
36 | +} |
37 | |
38 | UCTheme::UCTheme(QObject *parent) : |
39 | QObject(parent), |
40 | m_name(""), |
41 | - m_palette(NULL) |
42 | + m_palette(NULL), |
43 | + m_engine(NULL), |
44 | + m_engineUpdated(false) |
45 | { |
46 | m_name = m_themeSettings.themeName(); |
47 | QObject::connect(&m_themeSettings, &UCThemeSettings::themeNameChanged, |
48 | @@ -85,6 +109,21 @@ |
49 | this, &UCTheme::loadPalette, Qt::UniqueConnection); |
50 | } |
51 | |
52 | +void UCTheme::updateEnginePaths() |
53 | +{ |
54 | + if (!m_engine || m_engineUpdated) { |
55 | + return; |
56 | + } |
57 | + |
58 | + QStringList paths = themeSearchPath(); |
59 | + Q_FOREACH(const QString &path, paths) { |
60 | + if (QDir(path).exists()) { |
61 | + m_engine->addImportPath(path); |
62 | + } |
63 | + } |
64 | + m_engineUpdated = true; |
65 | +} |
66 | + |
67 | void UCTheme::onThemeNameChanged() |
68 | { |
69 | if (m_themeSettings.themeName() != m_name) { |
70 | @@ -96,15 +135,17 @@ |
71 | |
72 | QUrl UCTheme::pathFromThemeName(QString themeName) |
73 | { |
74 | - QString themesPath = QLatin1String(getenv("UBUNTU_UI_TOOLKIT_THEMES_PATH")); |
75 | - if (themesPath.isEmpty()) { |
76 | - themesPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); |
77 | + themeName.replace('.', '/'); |
78 | + QStringList pathList = themeSearchPath(); |
79 | + Q_FOREACH(const QString &path, pathList) { |
80 | + QString themeFolder = THEME_FOLDER_FORMAT.arg(path, themeName); |
81 | + // QUrl needs a trailing slash to understand it's a directory |
82 | + QString absoluteThemeFolder = QDir(themeFolder).absolutePath().append('/'); |
83 | + if (QDir(absoluteThemeFolder).exists()) { |
84 | + return QUrl::fromLocalFile(absoluteThemeFolder); |
85 | + } |
86 | } |
87 | - |
88 | - QString themeFolder = THEME_FOLDER_FORMAT.arg(themesPath, themeName.replace('.', '/')); |
89 | - QString absoluteThemeFolder = QDir(themeFolder).absolutePath(); |
90 | - // QUrl needs a trailing slash to understand it's a directory |
91 | - return QUrl::fromLocalFile(absoluteThemeFolder.append("/")); |
92 | + return QUrl(); |
93 | } |
94 | |
95 | void UCTheme::updateThemePaths() |
96 | @@ -114,7 +155,9 @@ |
97 | QString themeName = m_name; |
98 | while (!themeName.isEmpty()) { |
99 | QUrl themePath = pathFromThemeName(themeName); |
100 | - m_themePaths.append(themePath); |
101 | + if (themePath.isValid()) { |
102 | + m_themePaths.append(themePath); |
103 | + } |
104 | themeName = parentThemeName(themeName); |
105 | } |
106 | } |
107 | @@ -152,26 +195,28 @@ |
108 | |
109 | QUrl UCTheme::styleUrl(QString styleName) |
110 | { |
111 | - QUrl styleUrl; |
112 | - |
113 | Q_FOREACH (QUrl themePath, m_themePaths) { |
114 | - styleUrl = themePath.resolved(styleName); |
115 | - if (QFile::exists(styleUrl.toLocalFile())) { |
116 | - break; |
117 | + QUrl styleUrl = themePath.resolved(styleName); |
118 | + if (styleUrl.isValid() && QFile::exists(styleUrl.toLocalFile())) { |
119 | + return styleUrl; |
120 | } |
121 | } |
122 | |
123 | - return styleUrl; |
124 | + return QUrl(); |
125 | } |
126 | |
127 | QString UCTheme::parentThemeName(QString themeName) |
128 | { |
129 | QString parentTheme; |
130 | QUrl themePath = pathFromThemeName(themeName); |
131 | - QFile file(themePath.resolved(PARENT_THEME_FILE).toLocalFile()); |
132 | - if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { |
133 | - QTextStream in(&file); |
134 | - parentTheme = in.readLine(); |
135 | + if (!themePath.isValid()) { |
136 | + qWarning() << UbuntuI18n::instance().tr("Theme not found: ") << themeName; |
137 | + } else { |
138 | + QFile file(themePath.resolved(PARENT_THEME_FILE).toLocalFile()); |
139 | + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { |
140 | + QTextStream in(&file); |
141 | + parentTheme = in.readLine(); |
142 | + } |
143 | } |
144 | return parentTheme; |
145 | } |
146 | @@ -187,12 +232,22 @@ |
147 | |
148 | if (parent != NULL) { |
149 | QQmlEngine* engine = qmlEngine(parent); |
150 | + if (engine != m_engine && !m_engine) { |
151 | + m_engine = engine; |
152 | + updateEnginePaths(); |
153 | + } |
154 | + // make sure we have the paths |
155 | if (engine != NULL) { |
156 | QUrl url = styleUrl(styleName); |
157 | - component = new QQmlComponent(engine, url, QQmlComponent::PreferSynchronous, parent); |
158 | - if (component->isError()) { |
159 | - delete component; |
160 | - component = NULL; |
161 | + if (url.isValid()) { |
162 | + component = new QQmlComponent(engine, url, QQmlComponent::PreferSynchronous, parent); |
163 | + if (component->isError()) { |
164 | + delete component; |
165 | + component = NULL; |
166 | + } |
167 | + } else { |
168 | + qmlInfo(parent) << |
169 | + UbuntuI18n::instance().tr(QString("Warning: Style %1 not found in theme %2").arg(styleName).arg(m_name)); |
170 | } |
171 | } |
172 | } |
173 | @@ -202,6 +257,10 @@ |
174 | |
175 | void UCTheme::registerToContext(QQmlContext* context) |
176 | { |
177 | + // add paths to engine search folder |
178 | + m_engine = context->engine(); |
179 | + updateEnginePaths(); |
180 | + |
181 | // register Theme |
182 | context->setContextProperty("Theme", this); |
183 | |
184 | @@ -209,6 +268,7 @@ |
185 | new ContextPropertyChangeListener(context, "Theme"); |
186 | QObject::connect(this, SIGNAL(nameChanged()), |
187 | themeChangeListener, SLOT(updateContextProperty())); |
188 | + |
189 | } |
190 | |
191 | void UCTheme::loadPalette() |
192 | |
193 | === modified file 'modules/Ubuntu/Components/plugin/uctheme.h' |
194 | --- modules/Ubuntu/Components/plugin/uctheme.h 2013-07-01 06:32:40 +0000 |
195 | +++ modules/Ubuntu/Components/plugin/uctheme.h 2013-10-21 08:57:44 +0000 |
196 | @@ -54,6 +54,7 @@ |
197 | void paletteChanged(); |
198 | |
199 | private Q_SLOTS: |
200 | + void updateEnginePaths(); |
201 | void onThemeNameChanged(); |
202 | QUrl pathFromThemeName(QString themeName); |
203 | void updateThemePaths(); |
204 | @@ -64,8 +65,10 @@ |
205 | private: |
206 | QString m_name; |
207 | QObject* m_palette; |
208 | + QQmlEngine *m_engine; |
209 | QList<QUrl> m_themePaths; |
210 | UCThemeSettings m_themeSettings; |
211 | + bool m_engineUpdated; |
212 | }; |
213 | |
214 | #endif // UCTHEME_H |
215 | |
216 | === added directory 'tests/resources/themes' |
217 | === added directory 'tests/resources/themes/CustomTheme' |
218 | === added file 'tests/resources/themes/CustomTheme/TestStyle.qml' |
219 | --- tests/resources/themes/CustomTheme/TestStyle.qml 1970-01-01 00:00:00 +0000 |
220 | +++ tests/resources/themes/CustomTheme/TestStyle.qml 2013-10-21 08:57:44 +0000 |
221 | @@ -0,0 +1,22 @@ |
222 | +/* |
223 | + * Copyright 2013 Canonical Ltd. |
224 | + * |
225 | + * This program is free software; you can redistribute it and/or modify |
226 | + * it under the terms of the GNU Lesser General Public License as published by |
227 | + * the Free Software Foundation; version 3. |
228 | + * |
229 | + * This program is distributed in the hope that it will be useful, |
230 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
231 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
232 | + * GNU Lesser General Public License for more details. |
233 | + * |
234 | + * You should have received a copy of the GNU Lesser General Public License |
235 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
236 | + */ |
237 | + |
238 | +import QtQuick 2.0 |
239 | +import TestTheme 1.0 as Parent |
240 | + |
241 | +Parent.TestStyle { |
242 | + Component.onCompleted: console.log("CUSTOMTHEME") |
243 | +} |
244 | |
245 | === added file 'tests/resources/themes/CustomTheme/parent_theme' |
246 | --- tests/resources/themes/CustomTheme/parent_theme 1970-01-01 00:00:00 +0000 |
247 | +++ tests/resources/themes/CustomTheme/parent_theme 2013-10-21 08:57:44 +0000 |
248 | @@ -0,0 +1,1 @@ |
249 | +TestTheme |
250 | |
251 | === added directory 'tests/resources/themes/TestModule' |
252 | === added directory 'tests/resources/themes/TestModule/TestTheme' |
253 | === added file 'tests/resources/themes/TestModule/TestTheme/TestStyle.qml' |
254 | --- tests/resources/themes/TestModule/TestTheme/TestStyle.qml 1970-01-01 00:00:00 +0000 |
255 | +++ tests/resources/themes/TestModule/TestTheme/TestStyle.qml 2013-10-21 08:57:44 +0000 |
256 | @@ -0,0 +1,22 @@ |
257 | +/* |
258 | + * Copyright 2013 Canonical Ltd. |
259 | + * |
260 | + * This program is free software; you can redistribute it and/or modify |
261 | + * it under the terms of the GNU Lesser General Public License as published by |
262 | + * the Free Software Foundation; version 3. |
263 | + * |
264 | + * This program is distributed in the hope that it will be useful, |
265 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
266 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
267 | + * GNU Lesser General Public License for more details. |
268 | + * |
269 | + * You should have received a copy of the GNU Lesser General Public License |
270 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
271 | + */ |
272 | + |
273 | +import QtQuick 2.0 |
274 | +import Ubuntu.Components.Themes.Ambiance 0.1 |
275 | + |
276 | +Item { |
277 | + Component.onCompleted: console.log("PARENT") |
278 | +} |
279 | |
280 | === added file 'tests/resources/themes/TestModule/TestTheme/parent_theme' |
281 | --- tests/resources/themes/TestModule/TestTheme/parent_theme 1970-01-01 00:00:00 +0000 |
282 | +++ tests/resources/themes/TestModule/TestTheme/parent_theme 2013-10-21 08:57:44 +0000 |
283 | @@ -0,0 +1,1 @@ |
284 | +Ubuntu.Components.Themes.Ambiance |
285 | |
286 | === added file 'tests/resources/themes/TestModule/TestTheme/qmldir' |
287 | --- tests/resources/themes/TestModule/TestTheme/qmldir 1970-01-01 00:00:00 +0000 |
288 | +++ tests/resources/themes/TestModule/TestTheme/qmldir 2013-10-21 08:57:44 +0000 |
289 | @@ -0,0 +1,2 @@ |
290 | +module TestTheme |
291 | +TestStyle 1.0 TestStyle.qml |
292 | \ No newline at end of file |
293 | |
294 | === modified file 'tests/unit/unit.pro' |
295 | --- tests/unit/unit.pro 2013-09-23 08:47:39 +0000 |
296 | +++ tests/unit/unit.pro 2013-10-21 08:57:44 +0000 |
297 | @@ -10,8 +10,7 @@ |
298 | # https://bugs.launchpad.net/qemu-linaro/+bug/1084148 |
299 | ####################################### |
300 | #!contains(QMAKE_HOST.arch,armv7l) { |
301 | - SUBDIRS += tst_theme_engine \ |
302 | - tst_components \ |
303 | + SUBDIRS += tst_components \ |
304 | tst_components_benchmark |
305 | #} |
306 | |
307 | |
308 | === renamed directory 'tests/unit/tst_theme_engine' => 'tests/unit_x11/tst_theme_engine' |
309 | === modified file 'tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp' |
310 | --- tests/unit/tst_theme_engine/tst_theme_enginetest.cpp 2013-07-17 14:17:18 +0000 |
311 | +++ tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp 2013-10-21 08:57:44 +0000 |
312 | @@ -21,20 +21,37 @@ |
313 | #include <QtQml/QQmlComponent> |
314 | #include "uctheme.h" |
315 | |
316 | - |
317 | class tst_UCTheme : public QObject |
318 | { |
319 | Q_OBJECT |
320 | +private: |
321 | + QString m_xdgDataPath; |
322 | |
323 | private Q_SLOTS: |
324 | + void initTestCase(); |
325 | + void cleanupTestCase(); |
326 | void testInstance(); |
327 | void testNameDefault(); |
328 | void testNameSet(); |
329 | void testCreateStyleComponent(); |
330 | void testCreateStyleComponent_data(); |
331 | void testThemesRelativePath(); |
332 | + void testThemesRelativePathWithParent(); |
333 | + void testThemesRelativePathWithParentXDGDATA(); |
334 | + void testThemesRelativePathWithParentNoVariablesSet(); |
335 | + void testThemesRelativePathWithParentOneXDGPathSet(); |
336 | }; |
337 | |
338 | +void tst_UCTheme::initTestCase() |
339 | +{ |
340 | + m_xdgDataPath = QLatin1String(getenv("XDG_DATA_DIRS")); |
341 | +} |
342 | + |
343 | +void tst_UCTheme::cleanupTestCase() |
344 | +{ |
345 | + qputenv("XDG_DATA_DIRS", m_xdgDataPath.toLocal8Bit()); |
346 | +} |
347 | + |
348 | void tst_UCTheme::testInstance() |
349 | { |
350 | UCTheme& theme = UCTheme::instance(); |
351 | @@ -92,8 +109,73 @@ |
352 | QQmlComponent* component = theme.createStyleComponent("TestStyle.qml", parent); |
353 | |
354 | QCOMPARE(component != NULL, true); |
355 | -} |
356 | - |
357 | + QCOMPARE(component->status(), QQmlComponent::Ready); |
358 | +} |
359 | + |
360 | +void tst_UCTheme::testThemesRelativePathWithParent() |
361 | +{ |
362 | + qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", "../../resources/themes:../../resources/themes/TestModule"); |
363 | + |
364 | + UCTheme theme; |
365 | + theme.setName("CustomTheme"); |
366 | + QQmlEngine engine; |
367 | + theme.registerToContext(engine.rootContext()); |
368 | + QQmlComponent parentComponent(&engine, "Parent.qml"); |
369 | + QObject* parent = parentComponent.create(); |
370 | + QQmlComponent* component = theme.createStyleComponent("TestStyle.qml", parent); |
371 | + |
372 | + QCOMPARE(component != NULL, true); |
373 | + QCOMPARE(component->status(), QQmlComponent::Ready); |
374 | +} |
375 | + |
376 | +void tst_UCTheme::testThemesRelativePathWithParentXDGDATA() |
377 | +{ |
378 | + qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", ""); |
379 | + qputenv("XDG_DATA_DIRS", "../../resources/themes:../../resources/themes/TestModule"); |
380 | + |
381 | + UCTheme theme; |
382 | + theme.setName("CustomTheme"); |
383 | + QQmlEngine engine; |
384 | + theme.registerToContext(engine.rootContext()); |
385 | + QQmlComponent parentComponent(&engine, "Parent.qml"); |
386 | + QObject* parent = parentComponent.create(); |
387 | + QQmlComponent* component = theme.createStyleComponent("TestStyle.qml", parent); |
388 | + |
389 | + QCOMPARE(component != NULL, true); |
390 | + QCOMPARE(component->status(), QQmlComponent::Ready); |
391 | +} |
392 | + |
393 | +void tst_UCTheme::testThemesRelativePathWithParentNoVariablesSet() |
394 | +{ |
395 | + qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", ""); |
396 | + qputenv("XDG_DATA_DIRS", ""); |
397 | + |
398 | + UCTheme theme; |
399 | + QQmlEngine engine; |
400 | + QSignalSpy spy(&engine, SIGNAL(warnings(QList<QQmlError>))); |
401 | + theme.registerToContext(engine.rootContext()); |
402 | + QQmlComponent parentComponent(&engine, "Parent.qml"); |
403 | + QObject* parent = parentComponent.create(); |
404 | + QQmlComponent* component = theme.createStyleComponent("TestStyle.qml", parent); |
405 | + // warning about TestStyle not defined in Ubuntu.Components.Themes.Ambiance should be shown |
406 | + QCOMPARE(spy.count(), 1); |
407 | + QCOMPARE(component == NULL, true); |
408 | +} |
409 | + |
410 | +void tst_UCTheme::testThemesRelativePathWithParentOneXDGPathSet() |
411 | +{ |
412 | + qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", ""); |
413 | + qputenv("XDG_DATA_DIRS", "../tst_theme_engine"); |
414 | + |
415 | + UCTheme theme; |
416 | + theme.setName("TestModule.TestTheme"); |
417 | + QQmlEngine engine; |
418 | + QQmlComponent parentComponent(&engine, "Parent.qml"); |
419 | + QObject* parent = parentComponent.create(); |
420 | + QQmlComponent* component = theme.createStyleComponent("TestStyle.qml", parent); |
421 | + |
422 | + QCOMPARE(component != NULL, true); |
423 | + QCOMPARE(component->status(), QQmlComponent::Ready);} |
424 | |
425 | QTEST_MAIN(tst_UCTheme) |
426 | |
427 | |
428 | === modified file 'tests/unit_x11/unit_x11.pro' |
429 | --- tests/unit_x11/unit_x11.pro 2013-09-24 09:59:29 +0000 |
430 | +++ tests/unit_x11/unit_x11.pro 2013-10-21 08:57:44 +0000 |
431 | @@ -1,3 +1,3 @@ |
432 | TEMPLATE = subdirs |
433 | |
434 | -SUBDIRS += tst_components tst_test tst_inversemousearea tst_recreateview tst_statesaver |
435 | +SUBDIRS += tst_components tst_test tst_inversemousearea tst_recreateview tst_statesaver tst_theme_engine |
I had to resubmit the previous MP as that got completely messed.
Support for XDG_CONFIG_DIRS removed as not being required at all (see Scott Sweeny (ssweeny) wrote on 2013-10-04 on the bug).