Add a generic utility to get data dir #2

Merged
merged 2 commits into from Nov 23, 2015

Conversation

Projects
None yet
2 participants
Contributor

didrocks commented Nov 23, 2015

Some functions in upstream code are checking first master, then virtualenv/system installed version and other functions are doing the opposite. Introduce a generic get data dir utility to ensure we always check first a possible checkout, and then virtualenv/system installed version.

Also, when using it, ensure we always look in the "default" directory, even for system templates, as this is what is installed (/share/dep11/templates/default). This fix a bug when the template won't be found.
Ensure we always look for default. Templating system will then be able to be implemented.

I'm opened to any suggestion if anything is needed :)

didrocks added some commits Nov 23, 2015

Add a generic utility to get data dir
Some functions in upstream code are checking first master, then
virtualenv/system installed version and other functions are doing the opposite.
Introduce a generic get data dir utility to ensure we always check first
a possible checkout, and then virtualenv/system installed version.
Look templates and hinting using get_data_dir()
Both functions will now check first master, and then installed version.
Also, we ship even on installed version templates in "default", so the current
version won't work if you are not in upstream directory.
Ensure we always look for default. Templating system will then be able to be
implemented.

ximion added a commit that referenced this pull request Nov 23, 2015

Merge pull request #2 from didrocks/data_dir
Add a generic utility to get data dir

@ximion ximion merged commit d8901a1 into ximion:master Nov 23, 2015

iainlane pushed a commit to iainlane/appstream-dep11 that referenced this pull request Feb 19, 2016

Merge pull request #2 from dantti/dantti
Use QLoggingCategory and remove some cruft

Will help with debugging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment