New upstream version

This commit is contained in:
Colin Walters 2016-12-12 13:19:30 -05:00
parent 846be19124
commit f934bc16e6
4 changed files with 7 additions and 120 deletions

1
.gitignore vendored
View File

@ -42,3 +42,4 @@
/rpm-ostree-2016.10.tar.xz
/rpm-ostree-2016.11.tar.xz
/rpm-ostree-2016.12.tar.xz
/rpm-ostree-2016.13.tar.xz

View File

@ -1,116 +0,0 @@
From 351832f29e7dfbdcd3dcfc6decbfe236e7d17e45 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Wed, 23 Nov 2016 21:16:01 -0500
Subject: [PATCH] Fix install-langs support
We're looking at changing Atomic Host to use multiple locales (but not all);
See: https://bugzilla.redhat.com/show_bug.cgi?id=1186757
This revealed our `install-langs` support didn't really work. Our
`treecompose-post.sh` was deleting the extraneous translations anyways,
which masked this. And for other cases like workstations where
we drag along all the translations anyways, it was fine too.
There were two bugs:
- In the keyfile spec it's `instlangs`
- We were setting the macro a bit too late, it should be before
`dnf_context_setup()`.
Closes: #525
Approved by: jlebon
---
src/app/rpmostree-compose-builtin-tree.c | 2 +-
src/libpriv/rpmostree-core.c | 44 ++++++++++++++++----------------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c
index 1998c8b..938132f 100644
--- a/src/app/rpmostree-compose-builtin-tree.c
+++ b/src/app/rpmostree-compose-builtin-tree.c
@@ -277,7 +277,7 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
if (json_object_has_member (treedata, "install-langs"))
{
JsonArray *a = json_object_get_array_member (treedata, "install-langs");
- if (!set_keyfile_string_array_from_json (treespec, "tree", "install-langs", a, error))
+ if (!set_keyfile_string_array_from_json (treespec, "tree", "instlangs", a, error))
goto out;
}
diff --git a/src/libpriv/rpmostree-core.c b/src/libpriv/rpmostree-core.c
index 9b923df..0ea7322 100644
--- a/src/libpriv/rpmostree-core.c
+++ b/src/libpriv/rpmostree-core.c
@@ -575,6 +575,8 @@ rpmostree_context_setup (RpmOstreeContext *self,
char **enabled_repos = NULL;
char **instlangs = NULL;
+ self->spec = g_object_ref (spec);
+
if (install_root)
dnf_context_set_install_root (self->hifctx, install_root);
else
@@ -590,14 +592,32 @@ rpmostree_context_setup (RpmOstreeContext *self,
if (source_root)
dnf_context_set_source_root (self->hifctx, source_root);
+ if (g_variant_dict_lookup (self->spec->dict, "instlangs", "^a&s", &instlangs))
+ {
+ GString *opt = g_string_new ("");
+ char **iter;
+ gboolean first = TRUE;
+
+ for (iter = instlangs; iter && *iter; iter++)
+ {
+ const char *v = *iter;
+ if (!first)
+ g_string_append_c (opt, ':');
+ else
+ first = FALSE;
+ g_string_append (opt, v);
+ }
+
+ dnf_context_set_rpm_macro (self->hifctx, "_install_langs", opt->str);
+ g_string_free (opt, TRUE);
+ }
+
if (!dnf_context_setup (self->hifctx, cancellable, error))
goto out;
/* This is what we use as default. */
set_rpm_macro_define ("_dbpath", "/usr/share/rpm");
- self->spec = g_object_ref (spec);
-
/* NB: missing repo --> let hif figure it out for itself */
if (g_variant_dict_lookup (self->spec->dict, "repos", "^a&s", &enabled_repos))
if (!context_repos_enable_only (self, (const char *const*)enabled_repos, error))
@@ -613,26 +633,6 @@ rpmostree_context_setup (RpmOstreeContext *self,
require_enabled_repos (repos);
- if (g_variant_dict_lookup (self->spec->dict, "instlangs", "^a&s", &instlangs))
- {
- GString *opt = g_string_new ("");
- char **iter;
- gboolean first = TRUE;
-
- for (iter = instlangs; iter && *iter; iter++)
- {
- const char *v = *iter;
- if (!first)
- g_string_append_c (opt, ':');
- else
- first = FALSE;
- g_string_append (opt, v);
- }
-
- dnf_context_set_rpm_macro (self->hifctx, "_install_langs", opt->str);
- g_string_free (opt, TRUE);
- }
-
{ gboolean docs;
g_variant_dict_lookup (self->spec->dict, "documentation", "b", &docs);
--
2.9.3

View File

@ -1,11 +1,10 @@
Summary: Client side upgrade program and server side compose tool
Name: rpm-ostree
Version: 2016.12
Release: 4%{?dist}
Version: 2016.13
Release: 1%{?dist}
#VCS: https://github.com/cgwalters/rpm-ostree
# This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot"
Source0: rpm-ostree-%{version}.tar.xz
Patch0: 0001-Fix-install-langs-support.patch
License: LGPLv2+
URL: https://github.com/projectatomic/rpm-ostree
# We always run autogen.sh
@ -123,6 +122,9 @@ python autofiles.py > files.devel \
%files devel -f files.devel
%changelog
* Mon Dec 12 2016 walters@redhat.com - 2016.13-1
- New upstream version
* Sat Nov 26 2016 walters@redhat.com - 2016.12-4
- Backport patch to fix install-langs

View File

@ -1 +1 @@
7825658e24e2d9ecd6a00429dfe0a555 rpm-ostree-2016.12.tar.xz
SHA512 (rpm-ostree-2016.13.tar.xz) = 5406b54aa86ab37cca833e8dcf5e27f267c4d336b361ac848da3762b3357164a756b9eccda289321ac470eb7e145097815064f9368b9961e57b442eb006b41d5