aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2004-02-28 12:25:27 +0000
committerFrederic Lepied <flepied@mandriva.com>2004-02-28 12:25:27 +0000
commitaed09f5ace39037a98593bdc06f53ac39cee17d2 (patch)
tree5c250f79846829c38873eb8b38c5abaf2d7f4e17
parentb91d16f564c6590305e6501a4b73d36177c1ebf4 (diff)
downloadbootsplash-aed09f5ace39037a98593bdc06f53ac39cee17d2.tar
bootsplash-aed09f5ace39037a98593bdc06f53ac39cee17d2.tar.gz
bootsplash-aed09f5ace39037a98593bdc06f53ac39cee17d2.tar.bz2
bootsplash-aed09f5ace39037a98593bdc06f53ac39cee17d2.tar.xz
bootsplash-aed09f5ace39037a98593bdc06f53ac39cee17d2.zip
use getpwuid instead of directly parsing passwd to support NIS
-rwxr-xr-xrpmbuildupdate6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index a75a2b9..805504b 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -112,8 +112,8 @@ sub build
if(/\%changelog/)
{
my $email;
- $email = $ENV{EMAIL} ||
- qx[awk -F: '/$ENV{USER}/{print \$5}' /etc/passwd|tr -d '\n']." <$ENV{USER}\@mandrakesoft.com> ";
+ my @l = getpwuid($<);
+ $email = $ENV{EMAIL} || $l[6]." <$l[0]\@mandrakesoft.com> ";
$spec .= "* ".qx[LC_TIME=C date '+%a %b %d %Y'|tr -d '\n']." ".$email.
" ".$newversion."-".$config{release}."\n";
$spec .= "- New release $newversion\n\n";
@@ -294,7 +294,7 @@ sub usage
{
print "rpmbuildupdate v0.3 helps you build up to date RPMs.\n\n";
print "By Julien Danjou <jdanjou\@mandrakesoft.com>\n";
- print "Copyright (c) 2003 by MandrakeSoft.\n";
+ print "Copyright (c) 2003-2004 by MandrakeSoft.\n";
print "This is free software under the GPL License.\n";
print "Usage: rpmbuildupdate [options] [pkg] [newversion]\n\n";