[lttng-dev] [PATCH lttng-ust] Fix: Java Agent JAR file symlink should be created after objects install
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue Nov 4 16:30:51 EST 2014
----- Original Message -----
> From: "Christian Babeux" <christian.babeux at efficios.com>
> To: "Mathieu Desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Tuesday, November 4, 2014 4:26:13 PM
> Subject: Re: [PATCH lttng-ust] Fix: Java Agent JAR file symlink should be created after objects install
>
> Hi,
>
> > Why are there sometimes "&&" and sometimes ";" between the shell
> > commands ? I think we might want to have && everywhere, so the
> > following commands don't execute if the prior commands fail.
>
> The reasoning was to ensure that if the "rm" command returned a
> non-zero exit code when removing non-existent files, it would still
> proceed to create the symlink.
> It seems that "rm -f" will never return a non-zero exit code when
> removing non-existent file, so I will resubmit this patch with the
> appropriate &&.
I'm mainly concerned about "cd" failing, and then executing
"rm" nevertheless in a bad CWD.
Thanks,
Mathieu
>
> Thanks,
>
> Christian
>
> On Tue, Nov 4, 2014 at 4:06 PM, Mathieu Desnoyers
> <mathieu.desnoyers at efficios.com> wrote:
> > Hi Christian,
> >
> > Why are there sometimes "&&" and sometimes ";" between the shell
> > commands ? I think we might want to have && everywhere, so the
> > following commands don't execute if the prior commands fail.
> >
> > Thoughts ?
> >
> > Thanks,
> >
> > Mathieu
> >
> > ----- Original Message -----
> >> From: "Christian Babeux" <christian.babeux at efficios.com>
> >> To: lttng-dev at lists.lttng.org
> >> Cc: "mathieu desnoyers" <mathieu.desnoyers at efficios.com>, "Christian
> >> Babeux" <christian.babeux at efficios.com>
> >> Sent: Tuesday, November 4, 2014 3:40:47 PM
> >> Subject: [PATCH lttng-ust] Fix: Java Agent JAR file symlink should be
> >> created after objects install
> >>
> >> Signed-off-by: Christian Babeux <christian.babeux at efficios.com>
> >> ---
> >> liblttng-ust-java-agent/java/Makefile.am | 6 +++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/liblttng-ust-java-agent/java/Makefile.am
> >> b/liblttng-ust-java-agent/java/Makefile.am
> >> index 5a406e4..42b3ede 100644
> >> --- a/liblttng-ust-java-agent/java/Makefile.am
> >> +++ b/liblttng-ust-java-agent/java/Makefile.am
> >> @@ -46,7 +46,7 @@ classes += $(pkgpath)/log4j/*.class
> >> endif
> >>
> >> $(jarfile): classnoinst.stamp
> >> - $(JAR) cfm $(JARFLAGS) $@ $(jarfile_manifest) $(classes) && $(LN_S)
> >> $@
> >> $(jarfile_symlink)
> >> + $(JAR) cfm $(JARFLAGS) $@ $(jarfile_manifest) $(classes) && rm -f
> >> $(jarfile_symlink); $(LN_S) $@ $(jarfile_symlink)
> >>
> >> $(jarfile_old): classnoinst.stamp
> >> $(JAR) cf $(JARFLAGS) $@ $(pkgpath)/*.class \
> >> @@ -62,10 +62,10 @@ log4j-jni-header.stamp: $(dist_noinst_JAVA)
> >>
> >> all-local: $(stamp)
> >>
> >> -install-data-local:
> >> +install-data-hook:
> >> cd $(DESTDIR)/$(jardir); rm -f $(jarfile_symlink); $(LN_S)
> >> $(jarfile)
> >> $(jarfile_symlink)
> >>
> >> -uninstall-local:
> >> +uninstall-hook:
> >> cd $(DESTDIR)/$(jardir); rm -f $(jarfile_symlink)
> >>
> >> CLEANFILES = $(jarfile) $(jarfile_old) $(pkgpath)/*.class
> >> $(pkgpath_old)/*.class $(pkgpath)/jul/*.class \
> >> --
> >> 2.1.1
> >>
> >>
> >
> > --
> > Mathieu Desnoyers
> > EfficiOS Inc.
> > http://www.efficios.com
>
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list