apt-source: wrap extend_cli_env() subroutines into functions