From 64f95689eb7049a1a4d148011763c9fd027d7e63 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 17 Aug 2016 17:00:46 -0400 Subject: [PATCH] Backport patch to fix mutate-os-release --- 0001-mutate-os-release-skip-VERSION_ID.patch | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 0001-mutate-os-release-skip-VERSION_ID.patch diff --git a/0001-mutate-os-release-skip-VERSION_ID.patch b/0001-mutate-os-release-skip-VERSION_ID.patch new file mode 100644 index 0000000..147cf6f --- /dev/null +++ b/0001-mutate-os-release-skip-VERSION_ID.patch @@ -0,0 +1,34 @@ +From 0fe12fe6a37ee98de5dec70c345d9f0479c47803 Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Wed, 17 Aug 2016 16:33:51 -0400 +Subject: [PATCH] mutate-os-release: skip VERSION_ID + +I hit this with librepo subbing out the $releasever with e.g. 7.2016.1 +when trying to pull various URLs. It should be enough for the user to +see the ostree version in VERSION and PRETTY_NAME. For applications, +there's OSTREE_VERSION if they need just that. + +Closes: #433 +Approved by: cgwalters +--- + src/libpriv/rpmostree-postprocess.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/libpriv/rpmostree-postprocess.c b/src/libpriv/rpmostree-postprocess.c +index 17ec151..d0566bd 100644 +--- a/src/libpriv/rpmostree-postprocess.c ++++ b/src/libpriv/rpmostree-postprocess.c +@@ -1380,8 +1380,9 @@ mutate_os_release (const char *contents, + if (strlen (line) == 0) + continue; + ++ /* NB: we don't mutate VERSION_ID because some libraries expect well-known ++ * values there*/ + if (g_str_has_prefix (line, "VERSION=") || \ +- g_str_has_prefix (line, "VERSION_ID=") || \ + g_str_has_prefix (line, "PRETTY_NAME=")) + { + g_autofree char *new_line = NULL; +-- +2.7.4 +