Bug 1182110

Summary: [pt-BR] [pt-PT] [zh-Hans] [zh-Hant] rename these langpack packages
Product: [Fedora] Fedora Reporter: Parag Nemade <pnemade>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: caolanm, dtardon, erack, jgrulich, mstahl, sbergman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-13 09:22:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Parag Nemade 2015-01-14 13:05:53 UTC
Description of problem:
We have this packaging problem since long time though not reported as I wait long enough for the approved langpack guidelines to appear actually written in guidelines wiki page. 

Here is the guideline -> http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Addon_Packages_.28langpacks.29

I therefore request to rename packages as
libreoffice-langpack-pt-BR -> libreoffice-langpack-pt_BR
libreoffice-langpack-pt-PT -> libreoffice-langpack-pt_PT
libreoffice-langpack-zh-Hans -> libreoffice-langpack-zh_CN
libreoffice-langpack-zh-Hant -> libreoffice-langpack-zh_TW

Note the virtual provides will not work as yum-langpacks can read actual rpm package names only and there is no yum API that can help to find virtual package names.

Version-Release number of selected component (if applicable):
libreoffice-4.4.0.2-1.fc22

How reproducible:
always

Steps to Reproduce:
1. yum langinfo pt_BR
2. observe the output yum-langpacks code fails to find libreoffice-langpack-pt-BR as it want package named libreoffice-langpack-pt_BR


Actual results:
As given above are the current package names

Expected results:
should be changed to follow locale names

Additional info:

Comment 1 Parag Nemade 2015-01-16 11:37:24 UTC
This package naming problem exists in Fedora since long time, maybe not reported before but now we have naming guidelines which we can use and follow.

Comment 2 Caolan McNamara 2015-01-22 16:03:21 UTC
For a quiet life I can swap the name vs the provides. If I had enough resources I'd tackle things the other way around and change all our stacks to be langtag aware. Some other year maybe :-)

Comment 3 David Tardon 2015-01-27 15:49:49 UTC
(In reply to Parag from comment #0)
> Note the virtual provides will not work as yum-langpacks can read actual rpm
> package names only and there is no yum API that can help to find virtual
> package names.

Lacking yum API is irrelevant as an argument, as Fedora is switching to dnf. The question is: will a future dnf langpacks plugin be able to do this? If not, it should be proposed as an enhancement to dnf. Changing package names to fit a specific pattern is just a needless bureaucracy.

Comment 4 Parag Nemade 2015-01-27 15:57:38 UTC
yum-langpacks and dnf-langpacks will be same. We already have naming guidelines added for this in Fedora and it will be good if libreoffice also follows these guidelines.

I really not sure what to reply to existing bug that needs this change and maybe in future also we will get bugs reported that langpacks plugin failed to install libreoffice translation packages. Other packages in Fedora already follows pt_BR in their package names.

Comment 5 David Tardon 2015-01-27 17:34:43 UTC
(In reply to Parag from comment #4)
> yum-langpacks and dnf-langpacks will be same.

That does not answer my question. IIRC one of the reasons to start dnf was to have better API for plugins. So is there a _technical_ reason why this is not possible?

>  We already have naming
> guidelines added for this in Fedora and it will be good if libreoffice also
> follows these guidelines.

The reasoning, which led to acceptance of the naming guideline, was exactly the same as here: yum-langpacks is broken. If dnf-langpacks could handle virtual provides, it would not be necessary and could be removed again.

> 
> I really not sure what to reply to existing bug that needs this change and
> maybe in future also we will get bugs reported that langpacks plugin failed
> to install libreoffice translation packages.

And they would be bugs in dnf-langpacks.

> Other packages in Fedora
> already follows pt_BR in their package names.

That does not imply that all packages have to do it.

Comment 6 Parag Nemade 2015-01-29 13:46:26 UTC
(In reply to David Tardon from comment #5)
> (In reply to Parag from comment #4)
> > yum-langpacks and dnf-langpacks will be same.
> 
> That does not answer my question. IIRC one of the reasons to start dnf was
> to have better API for plugins. So is there a _technical_ reason why this is
> not possible?
> 
> >  We already have naming
> > guidelines added for this in Fedora and it will be good if libreoffice also
> > follows these guidelines.
> 
> The reasoning, which led to acceptance of the naming guideline, was exactly
> the same as here: yum-langpacks is broken. If dnf-langpacks could handle
> virtual provides, it would not be necessary and could be removed again.

I don't accept that because yum do not provide to find virtually provided package names then it is a bug. Langpacks plugin uses simple logic. Read the available packages in the repository. Read the given input locale code say pt_BR. Then search packages that ends with pt_BR and use that package set as supported langpack packages for pt_BR language.

Now consider if dnf people will modify filter api which will start giving virtually provided package names. Langpacks plugin will find both the names libreoffice-langpack-pt-BR and libreoffice-langpack-pt_BR. 

Now when enduser uses command "dnf langinfo pt_BR" he will see supported package name as "libreoffice-langpack-pt_BR" which is a lie to user as there is no such real package name. I really think this is not good to confuse end-users.

I just want to keep simple langpacks plugin.


> 
> > 
> > I really not sure what to reply to existing bug that needs this change and
> > maybe in future also we will get bugs reported that langpacks plugin failed
> > to install libreoffice translation packages.
> 
> And they would be bugs in dnf-langpacks.


I don't understand why dnf-langpacks need to face for packagers mistakes for not following naming guidelines? If that is the case I will end up writing such cases and that will be un-necessary code for this simple langpacks plugin.


> 
> > Other packages in Fedora
> > already follows pt_BR in their package names.
> 
> That does not imply that all packages have to do it.

The langpacks packaging naming guidelines is not for just langpacks plugin but to have some uniqueness in package names and identify easily that those are only translations providing packages.

Comment 7 Jaroslav Reznik 2015-03-03 17:06:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 8 Parag Nemade 2015-08-13 09:22:27 UTC
It's sad I have not got any help here for langpacks plugin for yum and dnf from libreoffice maintainers.