]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix the distribution label not showing up since b8d85c6251.
authorPeter Powell <petpow@saberuk.com>
Wed, 12 Oct 2016 19:10:43 +0000 (20:10 +0100)
committerPeter Powell <petpow@saberuk.com>
Fri, 18 Nov 2016 18:13:47 +0000 (18:13 +0000)
configure
make/common.pm
make/configure.pm

index b81a7809a1346c69f2e7d28b892455b7a6267507..696d94886023ae4c127a2e0af5e181252ff5929c 100755 (executable)
--- a/configure
+++ b/configure
@@ -126,7 +126,7 @@ our $interactive = !(
        defined $opt_uid
 );
 
-my %version = get_version();
+my %version = get_version $opt_distribution_label;
 print_format "<|BOLD Configuring InspIRCd $version{FULL} on $^O.|>\n";
 
 our %config;
@@ -188,12 +188,6 @@ if (defined $opt_socketengine) {
        }
 }
 
-# If the user has specified a distribution label then we use it in
-# place of the label from src/version.sh or Git.
-if (defined $opt_distribution_label) {
-       $version{LABEL} = $opt_distribution_label;
-}
-
 if (defined $opt_system) {
        $config{BASE_DIR}   = $opt_prefix     // '/var/lib/inspircd';
        $config{BINARY_DIR} = $opt_binary_dir // '/usr/sbin';
@@ -310,6 +304,9 @@ if (<src/modules/m_ssl_*.cpp> && prompt_bool $interactive, 'Would you like to ge
        system './tools/genssl', 'auto';
 }
 
+# Cache the distribution label so that its not lost when --update is run.
+$config{DISTRIBUTION} = $opt_distribution_label if $opt_distribution_label;
+
 write_configure_cache %config;
 parse_templates \%config, \%compiler, \%version;
 
index 53ee3f7782b8646bce71c441adb71ad41b0555cb..b1608db56411ea211e4fea5d1617a597e80b06d6 100644 (file)
@@ -63,6 +63,10 @@ sub get_version {
                $version{LABEL} = $4 if defined $4;
        }
 
+       # If the user has specified a distribution label then we use it in
+       # place of the label from src/version.sh or Git.
+       $version{LABEL} = shift // $version{LABEL};
+
        # If any of these fields are missing then the user has deleted the
        # version file and is not running from Git. Fill in the fields with
        # dummy data so we don't get into trouble with undef values later.
index e88454658811c34821f9bb5511c94cde438fdd58..6b4693d453532d216f578a771e6c2fb193a72a19 100644 (file)
@@ -159,7 +159,8 @@ MISC OPTIONS
   --socketengine=[name]         Sets the socket engine to be used. Possible
                                 values are $SELIST.
   --uid=[id|name]               Sets the user to run InspIRCd as.
-  --update                      Updates the build environment.
+  --update                      Updates the build environment with the settings
+                                from the cache.
 
 
 FLAGS
@@ -180,7 +181,7 @@ sub cmd_update {
        say 'Updating...';
        my %config = read_configure_cache();
        my %compiler = get_compiler_info($config{CXX});
-       my %version = get_version();
+       my %version = get_version $config{DISTRIBUTION};
        parse_templates(\%config, \%compiler, \%version);
        say 'Update complete!';
        exit 0;