Bug 592799 - syntax mistake in /etc/bashrc pathmunge
Summary: syntax mistake in /etc/bashrc pathmunge
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: 592825
TreeView+ depends on / blocked
Reported: 2010-05-17 02:14 UTC by Aron Griffis
Modified: 2010-05-24 13:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 592825 (view as bug list)
Last Closed: 2010-05-24 13:22:53 UTC
Type: ---

Attachments (Terms of Use)
fix it (489 bytes, patch)
2010-05-17 02:14 UTC, Aron Griffis
no flags Details | Diff

Description Aron Griffis 2010-05-17 02:14:40 UTC
Created attachment 414438 [details]
fix it

Description of problem:
pathmunch in /etc/bashrc quotes the regex. Current versions of bash require the regex to be unquoted (just like glob-matching), so the regex will never match. Note the var $1 should still be quoted to prevent interpretation of regex chars.

Version-Release number of selected component (if applicable):

Actual results:
$PATH with dups

Expected results:
$PATH without dups

Comment 1 Ondrej Vasik 2010-05-17 05:46:31 UTC
Thanks for report, I see - changed between 3.1 and 3.2 . Will fix that...

Comment 2 Ondrej Vasik 2010-05-19 10:27:08 UTC
Fixed in setup-2.8.19-1.fc14 ...

Comment 3 Ondrej Vasik 2010-05-24 13:22:53 UTC
I used a bit different approach - no bashism, case is used - it seems to be even faster (and from my tests even a bit better for some obscure PATHs). As this change is no longer required, I'll mark this bugzilla as NEXTRELEASE.

See https://bugzilla.redhat.com/show_bug.cgi?id=544652 for the setup package updates which do contain the new patmunge() with case.

Note You need to log in before you can comment on or make changes to this bug.