Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18178 - gentoo-stats adds \r when inserting SYSTEM_ID
Summary: gentoo-stats adds \r when inserting SYSTEM_ID
Status: RESOLVED DUPLICATE of bug 30923
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Arun Bhanu (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 16:55 UTC by Michael Kefeder
Modified: 2005-07-17 13:06 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 Michael Kefeder 2003-03-25 16:55:30 UTC
I ran




emerge gentoo-stats


gentoo-stats --new




it told me that it inserted the SYSTEM_ID to /etc/gentoo-stats/gentoo-stats.conf 
- I looked at that file anyway to see what settings are in there, and nano 
showed me the MAC, \r linebreak escape sequence right after my id (like: 
SYSTEM_ID="12345678-1234-1234-1234-123456789123^M").


I don't know if that would break the stats logging system, but i thought i 
mention that behaviour here.




Reproducible: Didn't try
Steps to Reproduce:
1. i have no idea how to reproduce this without creating a new ID?


2.


3.



Actual Results:  
nothing


Expected Results:  
not inserted the \r character


gentoo-stats version 0.4




i'm sorry for not pasting `emerge info` here, but it think it wont help with 
that problem anyway.
Comment 1 Arun Bhanu (RETIRED) gentoo-dev 2003-04-05 12:27:06 UTC
IMO,
Line 575: (/usr/sbin/gentoo-stat)
 $s =~ s/Your new system ID is: (.*)[\r\n].*/$1/s;

should be 
 $s =~ s/Your new system ID is: (.*)\r\n.*/$1/s;

The server returns the $s with \r and \n (both embedded) not either one of them. Regex only checks for one of them.

I don't know what kind of breakage the extra ^M in the SYSTEM_ID is causing. My guess would be that it is logging into the database with ^M embedded in the SYSTEM_ID. So if you manually remove the ^M, it'll treat your system id as a different one and log accordingly.
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2003-10-11 13:10:46 UTC

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