Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2015 09:14:46 +0600
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        Mathieu Arnold <mat@mat.cc>, freebsd-pkg@freebsd.org
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: "poudriere distclean" complains about /etc/make.conf
Message-ID:  <20150219031446.GA32820@admin.sibptus.tomsk.ru>
In-Reply-To: <D0B4CE058DA7FBAEB1615050@atuin.in.mat.cc>
References:  <20150217043049.GA68755@admin.sibptus.tomsk.ru> <F8556CC1B58CDE1EE7646029@ogg.in.absolight.net> <20150218163739.GA24716@admin.sibptus.tomsk.ru> <D0B4CE058DA7FBAEB1615050@atuin.in.mat.cc>

next in thread | previous in thread | raw e-mail | index | archive | help
Mathieu Arnold wrote:
> +--On 18 f??vrier 2015 22:37:39 +0600 Victor Sudakov <vas@mpeks.tomsk.su>
> wrote:
> | Mathieu Arnold wrote:
> |> | 
> |> | I have the following construct in /etc/make.conf but not in
> |> | /usr/local/etc/poudriere.d/make.conf:
> |> | 
> |> | .if ${.CURDIR:M*/mail/spamassassin} && ${HOST} == "relay.sibptus.ru"
> |> | EXTRA_PATCHES+=/root/patches/Mail-SpamAssassin-3.3.1.sa-cgp.diff:-p1
> |> | .endif
> |> | 
> |> | When I run "poudriere distclean", it complains about this construct: 
> |> | 
> |> | WARNING (mail/spamassassin): "/etc/make.conf", line 15:
> |> | Malformed conditional (${.CURDIR:M*/mail/spamassassin} && ${HOST} ==
> |> | "relay.sibptus.ru") WARNING (mail/spamassassin):
> |> | "/usr/share/mk/sys.mk", line 340: if-less endif WARNING
> |> | (mail/spamassassin): make: fatal errors encountered -- cannot continue
> |> | 
> |> | I have two questions.
> |> | 
> |> | 1. Why does it complain? The conditional seems legit.
> |> 
> |> It seems like it is, but it is not, it should be:
> |> 
> |> .if !empty(.CURDIR:M*/mail/spamassassin) && ${HOST} == "relay.sibptus.ru"
> |> EXTRA_PATCHES+=/root/patches/Mail-SpamAssassin-3.3.1.sa-cgp.diff:-p1
> |> .endif
> |> 
> |> or
> |> 
> |> .if ${.CURDIR:M*/mail/spamassassin} != "" && ${HOST} ==
> |> "relay.sibptus.ru"
> | 
> | Sorry, Mathieu, your advice does not help:
> | 
> | [root@svn ~] poudriere distclean -y
> | [00:00:00] ====>> Gathering all expected distfiles for ports tree
> | 'default' WARNING (mail/spamassassin): "/etc/make.conf", line 15:
> | Malformed conditional (${.CURDIR:M*/mail/spamassassin} != "" && ${HOST}
> | == "relay.sibptus.ru")  WARNING (mail/spamassassin):
> | "/usr/share/mk/sys.mk", line 340: if-less endif  WARNING
> | (mail/spamassassin): make: fatal errors encountered -- cannot continue 
> 
> Ah, yes, HOST is not defined, it's why it fails, you need to add:
> 
> HOST?=

Mathieu, what makes you think that HOST is not defined? It's defined
in the environment and should be available to make:

[sudakov@relay ~] make -V HOST
relay.sibptus.ru
[sudakov@relay ~]

> 
> before that line, because you can't compare an undefined variable with
> anything.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov@sibptus.tomsk.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150219031446.GA32820>