public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH] targets: Remove ancient locale-deleting code
@ 2020-10-03  3:35 Matt Turner
  2020-10-03 12:02 ` Ben Kohler
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Turner @ 2020-10-03  3:35 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Matt Turner

This block of code was added in commit ef648688ce8b ("Forward port the
changes from catalyst 1.1.9 to 1.1.10.10 to catalyst2.") in 2005 without
any further explanation. Since locale-gen was first committed to our
glibc package in 2006, we think that locales were handled differently
before (and not packed into /usr/${libdir}/locale/locale-archive).

Not only is this code unneeded, it can actually cause the locale-archive
to be deleted if the livecd is using a multilib profile! E.g. on a
multilib amd64 profile, where /usr/lib/locale is a symlink to
/usr/lib64/locale, it deletes /usr/lib64/locale/l* which matches
/usr/lib64/locale/locale-archive.

Because the minimal livecd uses a non-multilib profile, this explains
why it still contained the expected set of locales, while the multilib
admincd did not.

Thanks go to Ben Kohler, Thomas Deutschmann, and  Andreas Hüttel for
figuring out this mystery!

Bug: https://bugs.gentoo.org/710762
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 targets/support/livecdfs-update.sh | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 53844d9f..557d990b 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -174,13 +174,6 @@ esac
 
 rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/livecd.motd.txt
 
-# Clear out locales
-case ${clst_livecd_type} in
-	gentoo-release-minimal|gentoo-release-universal)
-		rm -rf /usr/lib/locale/{a,b,c,d,e{l,n_{A,B,C,D,G,H,I,N,P,S,US.,Z},s,t,u},f,g,h,i,j,k,l,m,n,o,p,r,s,t,u,v,w,x,y,z}*
-	;;
-esac
-
 # Post configuration
 case ${clst_livecd_type} in
 	gentoo-release-live*)
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-catalyst] [PATCH] targets: Remove ancient locale-deleting code
  2020-10-03  3:35 [gentoo-catalyst] [PATCH] targets: Remove ancient locale-deleting code Matt Turner
@ 2020-10-03 12:02 ` Ben Kohler
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Kohler @ 2020-10-03 12:02 UTC (permalink / raw
  To: gentoo-catalyst


On 10/2/20 10:35 PM, Matt Turner wrote:
> This block of code was added in commit ef648688ce8b ("Forward port the
> changes from catalyst 1.1.9 to 1.1.10.10 to catalyst2.") in 2005 without
> any further explanation. Since locale-gen was first committed to our
> glibc package in 2006, we think that locales were handled differently
> before (and not packed into /usr/${libdir}/locale/locale-archive).
>
> Not only is this code unneeded, it can actually cause the locale-archive
> to be deleted if the livecd is using a multilib profile! E.g. on a
> multilib amd64 profile, where /usr/lib/locale is a symlink to
> /usr/lib64/locale, it deletes /usr/lib64/locale/l* which matches
> /usr/lib64/locale/locale-archive.
>
> Because the minimal livecd uses a non-multilib profile, this explains
> why it still contained the expected set of locales, while the multilib
> admincd did not.
>
> Thanks go to Ben Kohler, Thomas Deutschmann, and  Andreas Hüttel for
> figuring out this mystery!
>
> Bug: https://bugs.gentoo.org/710762
> Signed-off-by: Matt Turner <mattst88@gentoo.org>
> ---
>   targets/support/livecdfs-update.sh | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
> index 53844d9f..557d990b 100755
> --- a/targets/support/livecdfs-update.sh
> +++ b/targets/support/livecdfs-update.sh
> @@ -174,13 +174,6 @@ esac
>   
>   rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/livecd.motd.txt
>   
> -# Clear out locales
> -case ${clst_livecd_type} in
> -	gentoo-release-minimal|gentoo-release-universal)
> -		rm -rf /usr/lib/locale/{a,b,c,d,e{l,n_{A,B,C,D,G,H,I,N,P,S,US.,Z},s,t,u},f,g,h,i,j,k,l,m,n,o,p,r,s,t,u,v,w,x,y,z}*
> -	;;
> -esac
> -
>   # Post configuration
>   case ${clst_livecd_type} in
>   	gentoo-release-live*)

Good writeup, look good, thanks!

-Ben



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-03 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-03  3:35 [gentoo-catalyst] [PATCH] targets: Remove ancient locale-deleting code Matt Turner
2020-10-03 12:02 ` Ben Kohler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox