2

I am using openSUSE 42.3 on WSL. During the last update I done (with sudo zypper refresh && sudo zypper update), Bash was updated from version 4.3.42(1) to version 4.3-83.3.1.

I closed the Bash window (simply using exit) and restarted Windows. When Windows restarted, I re-opened the Bash window, and pressed Control+X+V. What Bash output is still the old version number.

GNU bash, version 4.3.42(1)-release (x86_64-suse-linux-gnu)

I checked the output of zypper info bash, but it says version 4.3-83.3.1 is installed.

Loading repository data...
Reading installed packages...


Information for package bash:
-----------------------------
Repository     : oss_update
Name           : bash
Version        : 4.3-83.3.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 742.5 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : bash-4.3-83.3.1.src
Summary        : The GNU Bourne-Again Shell
Description    :
    Bash is an sh-compatible command interpreter that executes commands
    read from standard input or from a file.  Bash incorporates useful
    features from the Korn and C shells (ksh and csh).  Bash is intended to
    be a conformant implementation of the IEEE Posix Shell and Tools
    specification (IEEE Working Group 1003.2).

I also checked the output of zypper lr -d, but I don't see anything that would explain what is happening.

# | Alias                      | Name                                             | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                              | Service
--+----------------------------+--------------------------------------------------+---------+-----------+---------+----------+--------+--------------------------------------------------------------------------------------------------+--------
1 | devel_languages_go         | The Go Programming Language (openSUSE_Leap_42.3) | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_Leap_42.3/               |
2 | devel_languages_php        | devel:languages:php (openSUSE_Leap_42.3)         | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/devel:/languages:/php/openSUSE_Leap_42.3/              |
3 | oss                        | oss                                              | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/distribution/leap/42.3/repo/oss/suse/                               |
4 | oss_update                 | oss_update                                       | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/update/leap/42.3/oss/                                               |
5 | server_php_extensions_php7 | PHP7 extensions (php7_openSUSE_Leap_42.3)        | Yes     | (r ) Yes  | No      |   99     | rpm-md | http://download.opensuse.org/repositories/server:/php:/extensions:/php7/php7_openSUSE_Leap_42.3/ |

Why isn't the updated version of Bash being used?

I searched for any file with a name matching bash (with sudo find /[^m]* -name "bash" -type f, where /[^m]* is used to avoid the /mount directory, which is the only directory matching that pattern). The only file it finds is /bin/bash, for which the output of /bin/bash --version is the following.

GNU bash, version 4.3.42(1)-release (x86_64-suse-linux-gnu) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

How can Zypper think it installed an update for which I don't find the installed files?

As side note, I didn't alter the symbolic link Windows uses to start openSUSE, which means the Bash used from WSL is the one that for openSUSE is /bin/bash.

  • Have you tried to reboot your machine, since its Windows? :P – user34720 Feb 19 '18 at 20:54
  • Yes, I did. That's what I meant with I restarted Windows. – kiamlaluno Feb 19 '18 at 21:12
  • Why do you believe that it should be using openSUSE's bash? – Ignacio Vazquez-Abrams Feb 20 '18 at 6:08
  • @IgnacioVazquez-Abrams It is using openSUSE Bash, but not the latest version it got installed. If it were not the openSUSE Bash, the version identifier would not contain x86_64-suse-linux-gnu. – kiamlaluno Feb 20 '18 at 6:13
  • So then maybe you should try to figure out what it is using. – Ignacio Vazquez-Abrams Feb 20 '18 at 6:14
5

It is using the correct and newest version.

Download the original rpm package into a work folder:

wget http://download.opensuse.org/update/leap/42.3/oss/x86_64/bash-4.3-83.3.1.x86_64.rpm

Unpack it:

rpm2cpio bash-4.3-83.3.1.x86_64.rpm | cpio -idmv

And the included bash is:

./bin/bash --version    # The leading . is important
GNU bash, Version 4.3.42(1)-release (x86_64-suse-linux-gnu)

The version number of the package is not fully linked to the version of the installed software (here only the 4.3-Part). Imagine a scenario where the package maintainer made an error and wants to send out an update. The packaged software version remains the same, but he has to update the package, and therefore increases the package version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.