X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fscripts%2Fversion_tag.pl;h=84365b1068540f9a5cfd2cec80d3745d946f1eaf;hp=04333665d68875c953815f6bbfeed71e79852fba;hb=eba22ce7b05b051a2c86d28ce458fe4ba7d50867;hpb=fa8df3b66d6f4e13d0b6076bb087a52b20d4166c diff --git a/lustre/scripts/version_tag.pl b/lustre/scripts/version_tag.pl index 0433366..84365b1 100644 --- a/lustre/scripts/version_tag.pl +++ b/lustre/scripts/version_tag.pl @@ -200,18 +200,21 @@ sub generate_ver($$$) #print "localtime: " . localtime($mtime) . "\n"; - my $show_last = mtime2date($mtime); + my $lustre_vers = $ENV{LUSTRE_VERS}; print "#define BUILD_VERSION \""; - my $lustre_vers = $ENV{LUSTRE_VERS}; - if ($lustre_vers) { print "$tag-$lustre_vers\"\n"; + return 0; + } + + my $show_last = mtime2date($mtime); + # if we want to get rid of the PRISTINE/CHANGED thing, get rid of these # lines. maybe we only want to print -CHANGED when something is changed # and print nothing when it's pristine - } elsif ($pristine) { + if ($pristine) { print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n"; } else { print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n"; @@ -236,7 +239,8 @@ if ($ARGV[0]) { chdir($ARGV[0]); } my $tag = get_tag(); -my $mtime = get_latest_mtime(); +my $mtime = get_latest_mtime() + if (!defined($ENV{LUSTRE_VERS})); if ($progname eq "version_tag.pl") { my $linuxdir = get_linuxdir();