Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83978 - net-www/awstats ebuild erroneously replaces default value in awstats.model.conf.file
Summary: net-www/awstats ebuild erroneously replaces default value in awstats.model.c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Aaron Walker (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-03 10:29 UTC by Jakub Moc (RETIRED)
Modified: 2005-03-21 05:36 UTC (History)
0 users

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 Jakub Moc (RETIRED) gentoo-dev 2005-03-03 10:29:22 UTC
Ebuild is replacing values in awstats.model.conf via sed, but the following value should NOT be replaced, it needs to be boolean. 


Reproducible: Always
Steps to Reproduce:
1. emerge awstats
Actual Results:  
# Possible values: 0 or 1
# Default: 0
#
PurgeLogFile="/var/log/apache/access_log"

# This parameter is not used if PurgeLogFile="/var/log/apache/access_log"
# Change : Effective for new updates only
# Possible values: 0 or 1
# Default: 0
#
ArchiveLogRecords=0


Expected Results:  
# Possible values: 0 or 1
# Default: 0
#
PurgeLogFile=0


# When PurgeLogFile is setup to 1, AWStats will clean your log file after
# processing it. You can however keep an archive file (saved in "DirData") of
# all processed log records by setting this to 1 (For example if you want to
# use another log analyzer).
# This parameter is not used if PurgeLogFile=0
Comment 1 John Holden 2005-03-03 12:19:30 UTC
While we're looking at this ebuild, I noticed that the ebuild did not correctly execute line 50.  The configuration file erroneously points to /var/log/apache/access_log instead of /var/log/apache2/access_log.

Line 50 uses a variable APACHEVER which may not exist:
john # echo $APACHEVER

john #

Maybe I'm doing something wrong?  I tried googleing APACHEVER and all it comes up with is makefiles which aren't that helpful.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-03-03 12:27:32 UTC
John: Yes, that
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-03-03 12:27:32 UTC
John: Yes, that´s another error (ebuild does not detect installed Apache version correctly). I did not notice this one. ;-)

Anyway, PurgeLogFile takes boolean only, i.e. 0/1. 
Comment 4 Aaron Walker (RETIRED) gentoo-dev 2005-03-21 05:36:05 UTC
Yeah the problem was the first sed expression should've used ^LogFile instead
of just LogFile. It was replacing both LogFile and PurgeLogFile. Also, thanks
for pointing out ${APACHEVER}.  I think it is left over from the mess that
was (or still is mostly) awstats prior to me taking over maintainership.

Fixed in both 6.3-r2 and 6.4.