aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-01-06 03:25:26 +0000
committerMichael Scherer <misc@mageia.org>2011-01-06 03:25:26 +0000
commitc6daa327cbe33968849c24c0385e2b45770c72fb (patch)
treef3943e4eaa6376d92d29ff71aed4b40b446d4c91 /lib/Youri
parent5e1374ae7f33c80e62020edc00e37fd9af71c291 (diff)
downloadmga-youri-core-c6daa327cbe33968849c24c0385e2b45770c72fb.tar
mga-youri-core-c6daa327cbe33968849c24c0385e2b45770c72fb.tar.gz
mga-youri-core-c6daa327cbe33968849c24c0385e2b45770c72fb.tar.bz2
mga-youri-core-c6daa327cbe33968849c24c0385e2b45770c72fb.tar.xz
mga-youri-core-c6daa327cbe33968849c24c0385e2b45770c72fb.zip
use hostname function from perl core module Sys::Hostname ( and so avoid 1 useless fork )
Diffstat (limited to 'lib/Youri')
-rw-r--r--lib/Youri/Repository/Mageia_upload.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Youri/Repository/Mageia_upload.pm b/lib/Youri/Repository/Mageia_upload.pm
index 4106afc..dc82593 100644
--- a/lib/Youri/Repository/Mageia_upload.pm
+++ b/lib/Youri/Repository/Mageia_upload.pm
@@ -19,6 +19,7 @@ use File::Find 'find';
use base qw/Youri::Repository/;
use MDV::Distribconf::Build;
use SVN::Client;
+use Sys::Hostname;
use constant {
PACKAGE_CLASS => 'Youri::Package::URPM',
@@ -70,8 +71,7 @@ sub get_group_id {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time);
$year+=1900;
$mon++;
- my $hostname = `hostname`;
- my ($host) = $hostname =~ /([^.]*)/;
+ my ($host) = hostname =~ /([^.]*)/;
sprintf "$year%02d%02d%02d%02d%02d.$user.$host.${$}_", $mon, $mday, $hour, $min, $sec;
}