On Tue, 2021-04-20 at 15:18 +0100, Daniel P. Berrangé wrote:
> On Tue, Apr 20, 2021 at 02:30:33PM +0200, Andrea Bolognani wrote:
> > +# Turning these symlinks into regular files allows us to make the
> > +# -client and -daemon packages, both of which need bash-completion
> > +# support, completely independent by only paying a tiny price in
> > +# terms of additional disk usage
> > +for cmd in virsh virt-admin; do
> > +  rm -f $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/$cmd
> > +  cp $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/vsh \
> > +     $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/$cmd
> > +done
> > +rm -f $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/vsh
> 
> IMHO this is not good. It results in a "virt-admin" completion
> file that installs completions for "virsh", and vica-verca.
> 
> If we're going to separate them, then  do it properly in the
> source build, not the RPM.

The current situation is exactly as you describe: the bash completion
file for both virsh and virt-admin also defines completion rules for
the other command, regardless of whether it's actually installed, so
this change wouldn't make the situation any worse.

But you're right, if we're touching it anyway might as well try to
make it better :)

-- 
Andrea Bolognani / Red Hat / Virtualization

Reply via email to