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 | 9 +++++++++ anaconda.spec.in | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..cee2b4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite TX_PUSH_ARGS = -s +tx_installed=`rpm -qa transifex-client`
$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in $(sed_verbose)sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@ @@ -56,6 +57,10 @@ tag: po-pull: rm -f po/en@boldquot.gmo po/en@boldquot.po rm -f po/en@quot.gmo po/en@quot.po + + if [ -z "$tx_installed" ]; then \ + yum install transifex-client + fi tx pull $(TX_PULL_ARGS)
scratch: po-pull @@ -81,6 +86,10 @@ bumpver: po-pull fi ; \ scripts/makebumpver $${opts} || exit 1 ; \ $(MAKE) -C po $(PACKAGE_NAME).pot-update ; \ + + if [ -z "$tx_installed" ]; then \ + yum install transifex-client + fi 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
Comments below...
On Wed, Nov 14, 2012 at 10:43:17AM -0500, Samantha N. Bueno wrote:
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 | 9 +++++++++ anaconda.spec.in | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..cee2b4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite TX_PUSH_ARGS = -s +tx_installed=`rpm -qa transifex-client`
$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in $(sed_verbose)sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@ @@ -56,6 +57,10 @@ tag: po-pull: rm -f po/en@boldquot.gmo po/en@boldquot.po rm -f po/en@quot.gmo po/en@quot.po
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi tx pull $(TX_PULL_ARGS)
scratch: po-pull @@ -81,6 +86,10 @@ bumpver: po-pull fi ; \ scripts/makebumpver $${opts} || exit 1 ; \ $(MAKE) -C po $(PACKAGE_NAME).pot-update ; \
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi tx push $(TX_PUSH_ARGS)
Two things, which are make(1) things:
1) The lines under a make target have to be indented with at least one real tab character.
2) Each line is a subshell, unless you join the line to the next one with "; "
3) I lied, three things. Can't easily have blank lines in make targets.
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.
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 -- 1.7.11.7 _______________________________________________ anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On Wed, 2012-11-14 at 10:43 -0500, Samantha N. Bueno wrote:
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 | 9 +++++++++ anaconda.spec.in | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..cee2b4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite TX_PUSH_ARGS = -s +tx_installed=`rpm -qa transifex-client`
$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in $(sed_verbose)sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@ @@ -56,6 +57,10 @@ tag: po-pull: rm -f po/en@boldquot.gmo po/en@boldquot.po rm -f po/en@quot.gmo po/en@quot.po
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi tx pull $(TX_PULL_ARGS)
scratch: po-pull @@ -81,6 +86,10 @@ bumpver: po-pull fi ; \ scripts/makebumpver $${opts} || exit 1 ; \ $(MAKE) -C po $(PACKAGE_NAME).pot-update ; \
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi 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
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?
On Wed, Nov 14, 2012 at 06:43:57PM +0100, Vratislav Podzimek wrote:
On Wed, 2012-11-14 at 10:43 -0500, Samantha N. Bueno wrote:
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 | 9 +++++++++ anaconda.spec.in | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..cee2b4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite TX_PUSH_ARGS = -s +tx_installed=`rpm -qa transifex-client`
$(PACKAGE_NAME).spec: $(PACKAGE_NAME).spec.in $(sed_verbose)sed -e 's/#VERSION#/$(PACKAGE_VERSION)/' < $< > $@ @@ -56,6 +57,10 @@ tag: po-pull: rm -f po/en@boldquot.gmo po/en@boldquot.po rm -f po/en@quot.gmo po/en@quot.po
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi tx pull $(TX_PULL_ARGS)
scratch: po-pull @@ -81,6 +86,10 @@ bumpver: po-pull fi ; \ scripts/makebumpver $${opts} || exit 1 ; \ $(MAKE) -C po $(PACKAGE_NAME).pot-update ; \
- if [ -z "$tx_installed" ]; then \
yum install transifex-client
- fi 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
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?
We don't have a bug report for this right now. The concern is preventing the import of things not explicitly needed for building the SRPM in to brew.
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
On Wed, 2012-11-14 at 16:04 -0500, Samantha N. Bueno wrote:
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)
Adding this to the po-pull target should be enough as the other (relevant) targets have it as dependency.
On Thu, Nov 15, 2012 at 10:23:31AM +0100, Vratislav Podzimek wrote:
On Wed, 2012-11-14 at 16:04 -0500, Samantha N. Bueno wrote:
<>
Adding this to the po-pull target should be enough as the other (relevant) targets have it as dependency.
Ah, ok, good catch. I've fixed that now; although it's simple, new patch below, since I still need to receive an ack on this.
=======
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 | 1 + anaconda.spec.in | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..0badc99 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 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
On Thu, 2012-11-15 at 11:17 -0500, Samantha N. Bueno wrote:
On Thu, Nov 15, 2012 at 10:23:31AM +0100, Vratislav Podzimek wrote:
On Wed, 2012-11-14 at 16:04 -0500, Samantha N. Bueno wrote:
<>
Adding this to the po-pull target should be enough as the other (relevant) targets have it as dependency.
Ah, ok, good catch. I've fixed that now; although it's simple, new patch below, since I still need to receive an ack on this.
=======
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 | 1 + anaconda.spec.in | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..0badc99 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 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
Looks good to me.
On Wed, Nov 14, 2012 at 10:43:17AM -0500, Samantha N. Bueno wrote:
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 | 9 +++++++++ anaconda.spec.in | 1 - 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index 4f76895..cee2b4a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,6 +45,7 @@ sed_verbose_0 = @echo " SED "$@;
TX_PULL_ARGS = -a --disable-overwrite TX_PUSH_ARGS = -s +tx_installed=`rpm -qa transifex-client`
-q transifex-client will query for it, -qa queries all installed packages. Same result but -qa takes longer and probably more memory.
anaconda-patches@lists.fedorahosted.org