After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768693 - Info panel: show build id when available
Info panel: show build id when available
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-11 17:50 UTC by Georges Basile Stavracas Neto
Modified: 2016-07-12 15:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
info: factor out os info retrieval function (2.11 KB, patch)
2016-07-11 17:50 UTC, Georges Basile Stavracas Neto
none Details | Review
info: show build-id (3.74 KB, patch)
2016-07-11 17:50 UTC, Georges Basile Stavracas Neto
none Details | Review
info: factor out os info retrieval function (3.42 KB, patch)
2016-07-12 14:05 UTC, Georges Basile Stavracas Neto
committed Details | Review
info: show build-id (2.38 KB, patch)
2016-07-12 14:05 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Georges Basile Stavracas Neto 2016-07-11 17:50:41 UTC
When developing and testing an operational system,
it's useful to show the build id. The following
patches add this ability to the Details panel.
Comment 1 Georges Basile Stavracas Neto 2016-07-11 17:50:51 UTC
Created attachment 331256 [details] [review]
info: factor out os info retrieval function

This code will be reused in the future to retrieve
information stored in /etc/os-release file and, as
preparation for the next patch that retrieves and
displays the build-id of the OS.
.
Comment 2 Georges Basile Stavracas Neto 2016-07-11 17:50:56 UTC
Created attachment 331258 [details] [review]
info: show build-id

While developing, it's useful to show the build
id of the installed OS whenever available, which
the info panel doesn't handle for now.

This patch adds the ability to display the build
id of the installed OS when available.
Comment 3 Bastien Nocera 2016-07-11 18:04:07 UTC
Review of attachment 331256 [details] [review]:

::: panels/info/cc-info-panel.c
@@ +395,2 @@
 static char *
+get_os_info (const gchar* field)

That means re-reading the file for every field, probably not the best.

I would have something like:
GHashTable *parse_os_release(void);
which returns a hashtable of key/values.

Open it once, stuff all the key values, and keep it around until you've used all the fields you needed.
Comment 4 Bastien Nocera 2016-07-11 18:04:49 UTC
Review of attachment 331258 [details] [review]:

That looks fine, but will need changes for the API proposed in the other patch.
Comment 5 Georges Basile Stavracas Neto 2016-07-12 14:05:21 UTC
Created attachment 331334 [details] [review]
info: factor out os info retrieval function

Done.
Comment 6 Georges Basile Stavracas Neto 2016-07-12 14:05:35 UTC
Created attachment 331335 [details] [review]
info: show build-id

Done.
Comment 7 Bastien Nocera 2016-07-12 15:41:04 UTC
Review of attachment 331334 [details] [review]:

OK.

Just this:
> This patch also changes the function signature to return a hash
> table instead of simply reading the field,

This information is already in the patch itself. Remove it.
Comment 8 Bastien Nocera 2016-07-12 15:43:16 UTC
Review of attachment 331335 [details] [review]:

> installed OS whenever available, which the info panel doesn't

when available.

> This patch adds the ability to display the build id of the
> installed OS when available.

You already said that in the commit subject, and in the first paragraph.

Looks fine otherwise.
Comment 9 Georges Basile Stavracas Neto 2016-07-12 15:46:00 UTC
Thanks for the reviews.

Attachment 331334 [details] pushed as 8b70c44 - info: factor out os info retrieval function
Attachment 331335 [details] pushed as 6052e46 - info: show build-id