On Wed, Nov 14, 2012 at 12:41:43PM -0500, David Cantrell wrote:
Comments below... <> Two things, which are make(1) things:
- The lines under a make target have to be indented with at least one real
tab character.
Each line is a subshell, unless you join the line to the next one with "; "
I lied, three things. Can't easily have blank lines in make targets.
Heh, so I should have paid attention when the color coding was off after all.
The other suggestion I have is to just say you should yum install transifex-client rather than doing that, because that won't (or probably won't in most cases) work unless the user is root.
If you go with the tx_installed variable you have, there are some other make(1) requirements. And since this is technically automake, it may be too difficult to capture the output from rpm in a variable. I'd just run the query silently in the target and check the return code, then either echo and exit failure or move to the tx usage.
Noted; I'd gone with stuffing the output into a variable since I thought that was actually a safer approach, but your suggestion works for me, especially since you're more familiar with automake.
On Wed, Nov 14, 2012 at 10:24:51AM -0800, Brian C. Lane wrote:
-q transifex-client will query for it, -qa queries all installed packages. Same result but -qa takes longer and probably more memory.
Heh, good catch. For some reason, I have *always* done -qa, despite being aware of -q. In this case it's probably worth using -q.
On Wed, Nov 14, 2012 at 06:43:57PM +0100, Vratislav Podzimek wrote:
Is there any bugreport for this? It looks good to me, but maybe we should ask user if he/she really wants us to install transifex-client and tell user to configure it before building anaconda. Maybe also point them to our docs/transifex.txt file?
Not officially; it just isn't going to be included into RHEL7, so needs to be removed. (Looks like David responded about this though.)
Updated patch below; thanks for the feedback, guys.
=======================
transifex-client shouldn't be listed as a BuildReq; only check for it and install as needed if the target requiring it is called by make --- Makefile.am | 2 ++ anaconda.spec.in | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..802836e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,6 +56,7 @@ tag: po-pull: rm -f po/en@boldquot.gmo po/en@boldquot.po rm -f po/en@quot.gmo po/en@quot.po + rpm -q transifex-client &>/dev/null || echo "need to run: yum install transifex-client"; exit 1 tx pull $(TX_PULL_ARGS)
scratch: po-pull @@ -81,6 +82,7 @@ bumpver: po-pull fi ; \ scripts/makebumpver $${opts} || exit 1 ; \ $(MAKE) -C po $(PACKAGE_NAME).pot-update ; \ + rpm -q transifex-client &>/dev/null || echo "need to run: yum install transifex-client"; exit 1 tx push $(TX_PUSH_ARGS)
install-buildrequires: diff --git a/anaconda.spec.in b/anaconda.spec.in index 61dd7ef..7b20a2a 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -80,7 +80,6 @@ BuildRequires: python-nose BuildRequires: rpm-devel BuildRequires: rpm-python >= %{rpmpythonver} BuildRequires: slang-devel >= %{slangver} -BuildRequires: transifex-client BuildRequires: xmlto BuildRequires: yum >= %{yumver} BuildRequires: zlib-devel