Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy: Also look for /usr/lib/os-release #59

Closed

Conversation

cgwalters
Copy link
Member

With newer versions of systemd, the file has moved there.

@mbarnes
Copy link
Contributor

mbarnes commented Feb 20, 2015

Seems a little weird using g_file_load_contents() for one directory and g_file_get_contents() for the other, but otherwise 👍.

Starting down the path of not using libgsystem.  The main win here
will be code sharing between ostree/rpm-ostree as well as going down
the path of not using GFile * for local files.
With newer versions of systemd, the file has moved there.
@cgwalters
Copy link
Member Author

Yeah, it was ugly...I was trying to do a partial transition away from GFile*. But let's shave this yak a bit. I just pushed https://git.gnome.org/browse/libglnx/commit/?id=1ebfefa565692ca033ba2d156c771d9e2c4017fc (post-review on that appreciated btw!)

Then the updated commit here uses it, and IMO it's much prettier, more efficient, etc.

@mbarnes
Copy link
Contributor

mbarnes commented Feb 22, 2015

libglnx post-review: Looks nice. Using a GByteArray in glnx_fd_readall_malloc() might shave off a few lines, but... eh. Not too important.

The updated commit is much cleaner indeed. 👍 👍

@cgwalters
Copy link
Member Author

I tried to use a GString but it's not really cleaner without a g_string_ensure_capacity() or something. Actually I just filed https://bugzilla.gnome.org/show_bug.cgi?id=744992 to track this.

@cgwalters cgwalters closed this Feb 23, 2015
@cgwalters cgwalters deleted the deploy-read-usrlib-os-release branch February 23, 2015 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants