mvhub-dev team mailing list archive
-
mvhub-dev team
-
Mailing list archive
-
Message #00183
Re: [Merge] lp:~leegoodrich/mvhub/refactor_mv_setup into lp:mvhub
Still reviewing but these nits are a start
running mv_update_development:
Use of uninitialized value $relative_conf_dir in concatenation (.) or string at /var/www/mvhub/omacneil/link-to-live-code/lib-mvhub/lib//MVHub/Utils/Setup.pm line 176.
prompt for database password but don't set database to use that password
################
# house style is now
# not to use the qw//;
# since we give full specificaiton
# to module::function
use MVHub::Utils::Setup qw//;
#Line 40,668 should be:
@MVHub::Utils::Setup::WEBSITE_CODES;
# Line 52
# should be two lines to avoid returning
# an error when there is no error
# a sript that dies returns an error
# replace
die usage() if $usage || ( grep /^$hostname$/, @ALLOWED_HOSTS ) == 0;
# with:
print usage() if $usage
die usage if ! ( grep /^$hostname$/, @ALLOWED_HOSTS );
# Lines: 60,75,80,86,383
# could be simplified to approximately:
# if ($interactive && Prompt());
# lines 397,591
use File::Basename;
my $this_script=File::Basename::basename($0);
# slight tweak to wording
$msg .="\ncan't run $this_script to effect enviroment for user root, did you forget a \$USER param on command line?\n";
#lines 646-8
# wrong script name
# line 671,827
# should not use a
# an enviroment var
# just a regular $scalar will do
$ENV{MV_CONFIG_FILE}
# line 718,919
# defined but not used ?
sub get_username_or_die
#line: 919
# line 672,828 modifying a constant is naughty
# modifying a global to effect behavior in another file
# is also naughty
$ENV{SUDO_USER} = 'www-data';
# better line 1559: sub make_databases
# add parameter $conf_file
--
https://code.launchpad.net/~leegoodrich/mvhub/refactor_mv_setup/+merge/25461
Your team MVHub Developers is subscribed to branch lp:mvhub.
References