Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907061 - app-shells/bash: new globskipdots shopt in 5.2 raises minor backward-compatibility concerns
Summary: app-shells/bash: new globskipdots shopt in 5.2 raises minor backward-compatib...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://pubs.opengroup.org/onlinepubs...
Whiteboard:
Keywords:
Depends on:
Blocks: bash-5.2
  Show dependency tree
 
Reported: 2023-05-24 07:35 UTC by kfm
Modified: 2023-05-25 03:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2023-05-24 07:35:04 UTC
The release notes for 5.2 state the following:-

"The new `globskipdots' shell option forces pathname expansion never to return `.' or `..' unless explicitly matched. It is enabled by default."

This is a backwards-incompatible change, because the option in question defaults to being enabled. Further, it violates the standard rules for matching against pathnames containing a leading period.

$ declare -p BASH_VERSION
declare -- BASH_VERSION="5.1.16(1)-release"
$ cd /var/empty; printf %s\\n .?
..

$ declare -p BASH_VERSION
declare -- BASH_VERSION="5.2.15(1)-release"
$ cd /var/empty; printf %s\\n .?
.?

Is it covered by BASH_COMPAT? Of course not!

$ BASH_COMPAT=50
$ printf %s\\n .?
.?

That being said, I consider it to be exceedingly unlikely that this change meaningfully impacts upon portage or any of the ebuilds and eclasses that exist, both of the official and unofficial variety. Nevertheless, I decided to report this because, from the standpoint of PMS purporting to retain backward-compatibility, portage's present behaviour is not strictly correct.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-25 03:39:04 UTC
I'll tentatively block bug 881379 just as it's something we should review before proceeding with stabilisation, even if we don't keep it as a blocker.