[PATCH] Clean up Tramp version check

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Clean up Tramp version check

Nicholas Drozd
[continuation of
https://lists.gnu.org/archive/html/bug-gnu-emacs/2020-07/msg00183.html]

> Well, this code snippet has its history.

This turned out to be quite a piece of code indeed. I think this
change respects all the existing requirements. As I said before, this
shouldn't change any behavior, apart from adding the new function and
variable. Feel free to reject.

0001-Clean-up-Tramp-version-check.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up Tramp version check

Michael Albinus
Nicholas Drozd <[hidden email]> writes:

Hi Nicholas,

> This turned out to be quite a piece of code indeed. I think this
> change respects all the existing requirements. As I said before, this
> shouldn't change any behavior, apart from adding the new function and
> variable. Feel free to reject.

Thanks. However,

> +  (let ((tramp-minimum-emacs-version "30.1"))
> +    (should-error (tramp-check-version))))

this does not work as expected. What is this check good for? I
understand your intention, but do we need to test this case?

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up Tramp version check

Nicholas Drozd
> Thanks. However,
>
> > +  (let ((tramp-minimum-emacs-version "30.1"))
> > +    (should-error (tramp-check-version))))
>
> this does not work as expected. What is this check good for? I
> understand your intention, but do we need to test this case?

That test has already justified its existence, for it has revealed a
flaw in the implementation! TRAMP_EMACS_REQUIRED_VERSION was getting
substituted in two separate places, so tramp-check-version wasn't
checking against tramp-minimum-emacs-version, but rather a hardcoded
value. I've attached a new version of the patch. Hopefully this one is
right.

0001-Clean-up-Tramp-version-check.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up Tramp version check

Michael Albinus
Nicholas Drozd <[hidden email]> writes:

Hi Nicholas,

> I've attached a new version of the patch. Hopefully this one is right.

Still problems:

--8<---------------cut here---------------start------------->8---
# ./configure
configure: Tramp 2.5.0-pre
checking for gmake... no
checking for make... make
checking for reasonable make version... ok
checking whether make sets $(MAKE)... yes
checking for emacs... /usr/local/bin/emacs
./configure: command substitution: line 1880: unexpected EOF while looking for matching `''
./configure: command substitution: line 1881: syntax error: unexpected end of file
checking for /usr/local/bin/emacs version... ok
...
--8<---------------cut here---------------end--------------->8---

And this:

--8<---------------cut here---------------start------------->8---
# ./configure --with-emacs=~/src/emacs-25/src/emacs
configure: Tramp 2.5.0-pre
checking for gmake... no
checking for make... make
checking for reasonable make version... ok
checking whether make sets $(MAKE)... yes
checking for ~/src/emacs-25/src/emacs... no
configure: error: no not found
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up Tramp version check

Michael Albinus
Michael Albinus <[hidden email]> writes:

Hi Nicholas,

> # ./configure --with-emacs=~/src/emacs-25/src/emacs
> configure: Tramp 2.5.0-pre
> checking for gmake... no
> checking for make... make
> checking for reasonable make version... ok
> checking whether make sets $(MAKE)... yes
> checking for ~/src/emacs-25/src/emacs... no
> configure: error: no not found

Sorry, this wasn't caused by your patch. I've fixed this error.

Best regards, Michael.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Clean up Tramp version check

Michael Albinus
Nicholas Drozd <[hidden email]> writes:

> Hey Michael,

Hi Nicholas,

> I just wanted to check and see the status of this one.

Not relevant for your changes. "./configure" doesn't like a tilde in the
file name. So we have only one problem with your patch

--8<---------------cut here---------------start------------->8---
# ./configure
configure: Tramp 2.5.0-pre
checking for gmake... gmake
checking for reasonable gmake version... ok
checking whether gmake sets $(MAKE)... yes
checking for emacs... /usr/local/bin/emacs
./configure: command substitution: line 1867: unexpected EOF while looking for matching `''
./configure: command substitution: line 1868: syntax error: unexpected end of file
...
--8<---------------cut here---------------end--------------->8---


--8<---------------cut here---------------start------------->8---
# ./configure --with-emacs=/usr/local/src/emacs-25/src/emacs
configure: Tramp 2.5.0-pre
checking for gmake... gmake
checking for reasonable gmake version... ok
checking whether gmake sets $(MAKE)... yes
checking for /usr/local/src/emacs-25/src/emacs... /usr/local/src/emacs-25/src/emacs
./configure: command substitution: line 1867: unexpected EOF while looking for matching `''
./configure: command substitution: line 1868: syntax error: unexpected end of file
...
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.