With providing both Python 2 and Python 3 packages we need to make sure both have the translations available. This commit makes the translations shared by both Python 2 and 3 subpackages by putting them into a separate subpackage required by both.
From: Vratislav Podzimek vpodzime@redhat.com
With providing both Python 2 and Python 3 packages we need to make sure both have the translations available. This commit makes the translations shared by both Python 2 and 3 subpackages by putting them into a separate subpackage required by both. --- python-blivet.spec | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/python-blivet.spec b/python-blivet.spec index e58f6ae..78bc890 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -45,11 +45,19 @@ Requires: libblockdev-plugins-all >= %{libblockdevver} Requires: libselinux-python Requires: python-hawkey Requires: pygobject3 +Requires: %{realname}-data
%description The python-blivet package is a python module for examining and modifying storage configuration.
+%package -n %{realname}-data +Summary: Data for the %{realname} python module. + +%description -n %{realname}-data +The %{realname}-data package provides data files required by the %{realname} +python module. + %if 0%{with_python3} %package -n python3-%{realname} Summary: A python3 package for examining and modifying storage configuration. @@ -68,6 +76,7 @@ Requires: e2fsprogs >= %{e2fsver} Requires: lsof Requires: python3-hawkey Requires: python3-gobject +Requires: %{realname}-data
%description -n python3-%{realname} The python3-%{realname} is a python3 package for examining and modifying storage @@ -102,6 +111,8 @@ popd %doc README ChangeLog examples %{python_sitelib}/*
+%files -n %{realname}-data -f %{realname}.lang + %if 0%{?with_python3} %files -n python3-%{realname} %license COPYING
Shouldn't the Requires for blivet-data be matched by version?
This is kind of one of those things where it would be nice if the Fedora package committee came up with some recommendations, because all the solutions are haphazard and gross. I'm not real keen on the idea of a new package to begin with, and if you match the python3?-blivet version to the blivet-data version, which I think it should be, then if you have python-blivet and python3-blivet on the same system then those versions would need to match too, which isn't terrible but is kind of weird.
The solution a lot of packages seem to be using, including pykickstart, is to install the .mo files into the python directory, something like site-packages/blivet/locale.
Yeah, I think the version should be matched. I'll fix this as I think it's a "lesser evil" when compared to the version mismatch between the data package and the code.
Generally, the idea is to have these files in the system only once. And if we need some more "non-code" stuff in the future (like a config file or something), it should go into this subpackage.
anaconda-patches@lists.fedorahosted.org