Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212954 - app-admin/php-toolkit-1.0-r2: php-select apache2 fails in directory with one letter file names
Summary: app-admin/php-toolkit-1.0-r2: php-select apache2 fails in directory with one ...
Status: RESOLVED DUPLICATE of bug 209535
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-10 15:51 UTC by Michał Bartoszkiewicz
Modified: 2008-03-12 13:19 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 Michał Bartoszkiewicz 2008-03-10 15:51:14 UTC
php-select apache2 diesn't work properly when started in directory which contains files named with only one letter. It fails to upper-case the php version which is inserted into /etc/conf.d/apache2, resulting in apache configuration that doesn't include php5.

Reproducible: Always

Steps to Reproduce:
1. touch 'a'
2. php-select apache2 php5

Actual Results:  
APACHE2_OPTS in /etc/conf.d/apache2 was modified to contain -D php5 (lower case)

Expected Results:  
APACHE2_OPTS should contain -D PHP5 (upper case)

I believe the reason for this error is that /usr/share/php-select/libapache.sh uses 
  tr [a-z] [A-Z]
instead of
  tr '[a-z]' '[A-Z]'
for upper-casing (and vice-versa for lower-casing). 
[a-z] is a shell glob that matches one letter file names, so it should be quoted.
Comment 1 Michał Bartoszkiewicz 2008-03-10 15:55:44 UTC
The square brackets in the tr commands are in fact unnecessary:
  tr a-z A-Z
would work as well.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-03-10 18:32:12 UTC

*** This bug has been marked as a duplicate of bug 123383 ***
Comment 3 Michał Bartoszkiewicz 2008-03-11 00:14:33 UTC
(In reply to comment #2)
> 
> *** This bug has been marked as a duplicate of bug 123383 ***

Bug 123383 is closed as WONTFIX because of:
> With apache-1 gone, fixing this bug is rather pointless. Closing, the
> fuctionality will be removed eventually.

But, as you can see, it also affects apache2.
Comment 4 Christian Hoffmann (RETIRED) gentoo-dev 2008-03-11 17:28:46 UTC
jakub, I don't see a reason why we should not fix this, especially since quite some people seem to be affected. Still any objections, if yes, which?
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2008-03-12 13:18:11 UTC
(In reply to comment #4)
> jakub, I don't see a reason why we should not fix this, especially since quite
> some people seem to be affected. Still any objections, if yes, which?

I've attached a patch to Bug 209535 Comment #10 one month ago and received exactly zero response about whether it helps or not, and I absolutely can't reproduce this issue, quoting or not.

Comment 6 Jakub Moc (RETIRED) gentoo-dev 2008-03-12 13:19:14 UTC

*** This bug has been marked as a duplicate of bug 209535 ***