SV: compatibility issue in environment-modules version 4.1.1-1

2019-05-06 Thread Gösta Ljungdahl
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

"The shebang line is ignored if a file is sourced, isn't it?"

You tell me! I'm sure your guess is better than mine. All I really know is that 
at some point in the initialization process dash comes into play and is not 
equal to the task. I know this because the initialization works as expected if 
I change /bin/sh to point to /bin/bash.

/Gösta

- -Ursprungligt meddelande-
Från: Gunnar Hjalmarsson [mailto:gunna...@ubuntu.com]
Skickat: den 5 maj 2019 22:35
Till: Josefsson-Ljungdahl ; Ubuntu Developers 
; Gösta Ljungdahl 

Ämne: Re: compatibility issue in environment-modules version 4.1.1-1

On 2019-05-05 21:38, Josefsson-Ljungdahl wrote:
> Den sön 5 maj 2019 kl 21:26 skrev Gunnar Hjalmarsson
> mailto:gunna...@ubuntu.com>>:
>> Ubuntu does that as well, at least when GDM or LightDM is used. Maybe
>> worth mentioning that the scripts in the Ubuntu versions of those DMs
>> are run as bash processes. (That was changed a few years ago;
>> previously they were run as dash processes.)
>
> OK, that's good but since Ubuntu does have /bin/sh pointing to
> /bin/dash and the initialisation procedure sources scripts with
> #!/bin/sh it doesn't go all the way in this case.

The shebang line is ignored if a file is sourced, isn't it?

 From a quick look at the code in environment-modules I see that it seems to 
test for the BASH_VERSION variable. That makes me think of this change of 
LightDM:

https://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/2168/debian/lightdm-session

which was made in response to:

https://launchpad.net/bugs/1482641

Can this possibly be a reason for the confusion you have observed?

- --
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj
_

Signed with OpenPGP for Outlook by Encryptomatic LLC. Free for personal use.
Learn more at https://www.encryptomatic.com/openpgp/

-BEGIN PGP SIGNATURE-
Version: Encryptomatic OpenPGP Add-in for MS Outlook 2.5.7.0

iG0EAREIAC0FAlzP5AQmHEf2c3RhIExqdW5nZGFobCAoZm9pKSA8Z29zdGFsQGZv
aS5zZT4ACgkQLSNIFXAmA1dLWgCg6eWskZ+cArPtrGeGaDhr09O5g0YAoIngoOPr
9XJHD3W5nK8gbeZ8tTI/
=4tsH
-END PGP SIGNATURE-

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: SV: compatibility issue in environment-modules version 4.1.1-1

2019-05-06 Thread Gunnar Hjalmarsson

On 2019-05-06 09:36, Gösta Ljungdahl wrote:

On 2019-05-05 22:35, Gunnar Hjalmarsson wrote:

From a quick look at the code in environment-modules I see that it
seems to test for the BASH_VERSION variable. That makes me think of
this change of LightDM:

https://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/revision/2168/debian/lightdm-session 


which was made in response to:

https://launchpad.net/bugs/1482641

Can this possibly be a reason for the confusion you have observed?

> All I really know is that at some point in the initialization process
dash comes into play and is not equal to the task. I know this
because the initialization works as expected if I change /bin/sh to
point to /bin/bash.


Right. But it could be useful to know what happens if you

1. Change the /bin/sh symlink back to point to dash, and

2. (assuming that MINT uses LightDM) edit /usr/sbin/lightdm-session and
   change the line

BASH_VERSION= . "$CONFIG_FILE" 2>"$ERR"

   to

. "$CONFIG_FILE" 2>"$ERR"

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss