Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46111 - Patch to make sure ECHANGELOG_USER is set
Summary: Patch to make sure ECHANGELOG_USER is set
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All All
: High normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-29 07:08 UTC by Sven Blumenstein (RETIRED)
Modified: 2004-03-29 08:25 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 Sven Blumenstein (RETIRED) gentoo-dev 2004-03-29 07:08:24 UTC
Hi, 
I accidently commited something to CVS yesterday from a box where ECHANGELOG_USER was not set, so the ChangeLog says "root <root@gentoo.org>" now. 

I looked at the source of echangelog and found a little logical error:

# Prepend the user info to the input
$user = $ENV{'ECHANGELOG_USER'} ||
        sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]);
# Make sure that we didn't get "root"   
die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ / root@/;


set $user to ECHANGELOG_USER, if thats not set, use the current username. 
Die if $user starts with 'root'.

If ECHANGELOG_USER is not set, it just puts root@gentoo.org in the ChangeLog.

My suggested patch is:

-        sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]);
+        die "Please set ECHANGELOG_USER, for example export ECHANGELOG_USER='John Doe <john\@gentoo.org>'\n";

But feel free to change it to something better :)
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-03-29 08:25:00 UTC
The only problem with the source as it stands is that / root@/ should be /<root@/.  I've fixed this and committed to gentoolkit cvs, thanks.