Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 595682

Summary: net-news/newsbeuter-2.9-r1 - installs locales with wrong filename
Product: Gentoo Linux Reporter: Thibaut Quentin <thibaut.quentin>
Component: Current packagesAssignee: Tim Harder <radhermit>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch fixing the wrong locale name.

Description Thibaut Quentin 2016-09-30 16:07:07 UTC
Created attachment 448504 [details, diff]
Patch fixing the wrong locale name.

When installing Newsbeuter, the locale file is named newsbeuter-<version>.mo, however at run-time Newsbeuter search for the file newsbeuter.mo.

I supply a patch that correct this by changing the value of PACKAGE to ${P} during the install phase instead of ${PF}.
Comment 1 Thibaut Quentin 2016-10-01 08:36:16 UTC
Comment on attachment 448504 [details, diff]
Patch fixing the wrong locale name.

diff --git a/Makefile b/Makefile
index ed13fe8..787af1b 100644
--- a/Makefile
+++ b/Makefile
@@ -214,8 +214,8 @@ install-mo: mo-files
 		lang=`echo $$mofile | sed 's/\.mo$$//'`; \
 		dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
 		$(MKDIR) $$dir ; \
-		$(INSTALL) -m 644 $$mof $$dir/$(PACKAGE).mo ; \
-		echo "Installing $$mofile as $$dir/$(PACKAGE).mo" ; \
+		$(INSTALL) -m 644 $$mof $$dir/$(NEWSBEUTER).mo ; \
+		echo "Installing $$mofile as $$dir/$(NEWSBEUTER).mo" ; \
 	done
 
 uninstall-mo:
@@ -223,8 +223,8 @@ uninstall-mo:
 		mofile=`basename $$mof` ; \
 		lang=`echo $$mofile | sed 's/\.mo$$//'`; \
 		dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
-		$(RM) -f $$dir/$(PACKAGE).mo ; \
-		echo "Uninstalling $$dir/$(PACKAGE).mo" ; \
+		$(RM) -f $$dir/$(NEWSBEUTER).mo ; \
+		echo "Uninstalling $$dir/$(NEWSBEUTER).mo" ; \
 	done
 
 # tests and coverage reports
Comment 2 Tim Harder gentoo-dev 2016-10-03 14:33:53 UTC
Can you open a pull request for this upstream?
Comment 3 Thibaut Quentin 2016-10-04 11:55:19 UTC
(In reply to Tim Harder from comment #2)
> Can you open a pull request for this upstream?

Why can't we use the docdir variable instead of the PACKAGE one ? It doesn't change the name of the locale file and you can install the docs in the right place by setting it to "/usr/share/doc/${PF}".
Comment 4 Tim Harder gentoo-dev 2016-10-04 22:28:32 UTC
(In reply to Thibaut Quentin from comment #3)
> (In reply to Tim Harder from comment #2)
> > Can you open a pull request for this upstream?
> 
> Why can't we use the docdir variable instead of the PACKAGE one ? It doesn't
> change the name of the locale file and you can install the docs in the right
> place by setting it to "/usr/share/doc/${PF}".

Yep, that makes sense. Fixed in 2.9-r2, thanks.