NetBSD Problem Report #53063

From www@NetBSD.org  Thu Mar  1 16:37:33 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 561E77A111
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  1 Mar 2018 16:37:33 +0000 (UTC)
Message-Id: <20180301163732.788AA7A219@mollari.NetBSD.org>
Date: Thu,  1 Mar 2018 16:37:32 +0000 (UTC)
From: triaxx@NetBSD.org
Reply-To: triaxx@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: USE_PKGLOCALEDIR broken?
X-Send-Pr-Version: www-1.0

>Number:         53063
>Category:       pkg
>Synopsis:       USE_PKGLOCALEDIR broken?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 01 16:40:00 +0000 2018
>Closed-Date:    Tue Jan 15 07:26:12 +0000 2019
>Last-Modified:  Tue Jan 15 07:26:12 +0000 2019
>Originator:     Frédéric Fauberteau
>Release:        pkgsrc-HEAD
>Organization:
>Environment:
FreeBSD cocoon.triaxx.org 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I am working on wip/lightdm and its Makefile includes USE_PKGLOCALEDIR=yes. But 'bmake print-PLIST' produces a file containing lines as share/locale/[...] instead of ${PKGLOCALEDIR}/locale/[...].
>How-To-Repeat:
bmake print-PLIST
>Fix:

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
Date: Fri, 2 Mar 2018 00:45:08 +0100

 On Thu, Mar 01, 2018 at 04:40:00PM +0000, triaxx@NetBSD.org wrote:
 > >Number:         53063
 > >Category:       pkg
 > >Synopsis:       USE_PKGLOCALEDIR broken?
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Mar 01 16:40:00 +0000 2018
 > >Originator:     Frédéric Fauberteau
 > >Release:        pkgsrc-HEAD
 > >Organization:
 > >Environment:
 > FreeBSD cocoon.triaxx.org 11.1-RELEASE-p4 FreeBSD 11.1-RELEASE-p4 #0: Tue Nov 14 06:12:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
 > >Description:
 > I am working on wip/lightdm and its Makefile includes USE_PKGLOCALEDIR=yes. But 'bmake print-PLIST' produces a file containing lines as share/locale/[...] instead of ${PKGLOCALEDIR}/locale/[...].
 > >How-To-Repeat:
 > bmake print-PLIST
 > >Fix:
 > 

 That's a misunderstanding. The PLIST always has share/locale, this is automatically fixed.

 Compare PKGMANDIR, the PLIST always has man/manX for that too.
  Thomas

From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
Date: Fri, 02 Mar 2018 08:48:36 +0100

 Le 2018-03-02 00:50, Thomas Klausner a écrit :
 > The following reply was made to PR pkg/53063; it has been noted by 
 > GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc:
 > Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
 > Date: Fri, 2 Mar 2018 00:45:08 +0100
 > 
 >  That's a misunderstanding. The PLIST always has share/locale, this is
 > automatically fixed.
 > 
 >  Compare PKGMANDIR, the PLIST always has man/manX for that too.
 >   Thomas

 Yes, I misunderstood USE_PKGLOCALEDIR because the PLIST of wip/lightdm 
 contained some lines like 
 ${PKGLOCALEDIR}/locale/af/LC_MESSAGES/lightdm.mo and its Makefile 
 explicitly declared USE_PKGLOCALDIR=yes.

 Since (1) a package is built for a given system and (2) PKGLOCALEDIR is 
 not a public configuration variable, ${PKGLOCALDIR} in PLIST seems 
 useless.

 According to mk/configure/replace-localedir.mk:
 ######################################################################
 ### replace-localedir (PRIVATE)
 ######################################################################
 [...]
 .if empty(USE_PKGLOCALEDIR:M[nN][oO])
 SUBST_CLASSES+=     pkglocaledir
 .endif

 Hence, I would remove the line 'USE_PKGLOCALDIR=yes' that sounds 
 confusing to me.

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
Date: Fri, 2 Mar 2018 08:56:05 +0100

 On Fri, Mar 02, 2018 at 08:48:36AM +0100, Frédéric Fauberteau wrote:
 > Le 2018-03-02 00:50, Thomas Klausner a écrit :
 > > The following reply was made to PR pkg/53063; it has been noted by
 > > GNATS.
 > > 
 > > From: Thomas Klausner <wiz@NetBSD.org>
 > > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > > Cc:
 > > Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
 > > Date: Fri, 2 Mar 2018 00:45:08 +0100
 > > 
 > >  That's a misunderstanding. The PLIST always has share/locale, this is
 > > automatically fixed.
 > > 
 > >  Compare PKGMANDIR, the PLIST always has man/manX for that too.
 > >   Thomas
 > 
 > Yes, I misunderstood USE_PKGLOCALEDIR because the PLIST of wip/lightdm
 > contained some lines like ${PKGLOCALEDIR}/locale/af/LC_MESSAGES/lightdm.mo

 That's wrong, just change it to "share/locale/..."

 > and its Makefile explicitly declared USE_PKGLOCALDIR=yes.
 > 
 > Since (1) a package is built for a given system and (2) PKGLOCALEDIR is not
 > a public configuration variable, ${PKGLOCALDIR} in PLIST seems useless.

 Correct.

 > According to mk/configure/replace-localedir.mk:
 > ######################################################################
 > ### replace-localedir (PRIVATE)
 > ######################################################################
 > [...]
 > .if empty(USE_PKGLOCALEDIR:M[nN][oO])
 > SUBST_CLASSES+=     pkglocaledir
 > .endif
 > 
 > Hence, I would remove the line 'USE_PKGLOCALDIR=yes' that sounds confusing
 > to me.

 That's wrong, the variable still does something useful on systems
 where LOCALEDIR is not share/locale.
  Thomas

From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
Date: Fri, 02 Mar 2018 09:10:41 +0100

 Le 2018-03-02 09:00, Thomas Klausner a écrit :
 > The following reply was made to PR pkg/53063; it has been noted by 
 > GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc:
 > Subject: Re: pkg/53063: USE_PKGLOCALEDIR broken?
 > Date: Fri, 2 Mar 2018 08:56:05 +0100
 >  > According to mk/configure/replace-localedir.mk:
 >  > 
 > ######################################################################
 >  > ### replace-localedir (PRIVATE)
 >  > 
 > ######################################################################
 >  > [...]
 >  > .if empty(USE_PKGLOCALEDIR:M[nN][oO])
 >  > SUBST_CLASSES+=     pkglocaledir
 >  > .endif
 >  >
 >  > Hence, I would remove the line 'USE_PKGLOCALDIR=yes' that sounds 
 > confusing
 >  > to me.
 > 
 >  That's wrong, the variable still does something useful on systems
 >  where LOCALEDIR is not share/locale.
 >   Thomas

 .if empty(USE_PKGLOCALEDIR:M[nN][oO])
 does not that mean USE_PKGLOCALEDIR=yes is the default behavior?

 If it is, why explicitly declare it?

 Fred

State-Changed-From-To: open->closed
State-Changed-By: triaxx@NetBSD.org
State-Changed-When: Tue, 15 Jan 2019 07:26:12 +0000
State-Changed-Why:
Nothing is broken and explanations are clear.
Thanks Thomas!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.