[Pkg-zsh-devel] [PATCH 1/3…3/3] Several tweaks to d/zshrc's new completion enablement

Axel Beckert abe at debian.org
Tue Feb 18 00:15:45 GMT 2020


Hi,

Daniel Shahaf wrote:
> > > I'm not sure I understand why the Debian package has code that will only
> > > run on Ubuntu.  
> > 
> > Because it is preferred if Debian and Ubuntu source packages don't
> > differ, but Ubuntu insists on enabling completion by default while we
> > at some point decided that we IIRC want the default to be rather
> > minimal and not even contain autocompletion.
> 
> I don't know that having identical sources with runtime differences
> is better than having differences in both source code and runtime
> behaviour, but *shrug*.  TIMTOWDI.

It seems at least common to reduce the diff between Debian and Ubuntu.

> Sounds like the better fix here is for Ubuntu to automate migrating
> packages with Ubuntu-specific changes.

Sure, but tell that Ubuntu, not me. :-)

> So, the thinking was to check first the condition that's cheaper to evaluate.
> 
> > > -if grep -q 'ID.*=.*ubuntu' /etc/os-release && [[ -z "$skip_global_compinit" ]]; then
> > > +if [[ -z "$skip_global_compinit" ]] && grep -q 'ID.*=.*ubuntu' /etc/os-release; then
> > >    autoload -U compinit
> > >    compinit
> > >  fi  
> > 
> > So the difference seems, that if someone (on Ubuntu or elsewhere)
> > doesn't want autocompletion initialised, we save checking if it's on
> > Ubuntu or not?
> > 
> 
> Yes.

Ok, a very tiny gain for the sake of less obvious code IMHO: We first
check an Ubuntu-specific thing and then if it's actually an Ubuntu...
Sure, the boolean logic is the same, but I still think the other
way round it's more readable...

> > Do we want to make $skip_global_compinit a difference (in startup
> > performance) anywhere else, too?
> 
> What does it mean to 'make $foo a difference'?

Do we want that setting $skip_global_compinit on non-Ubuntu makes a
difference in performance?

Anyway, I'm open to discuss this further and also wouldn't mind to
hear other opinions on this. Won't include it in the upload I'm about
to make, but we can still include this in a future upload if someone
can convince me that the other order is better or if there's another
vote for Daniel's proposed method.

Frank Terbeck wrote:
> Hey team!

Hey Frank! Good to see some mails from you again! :-)

> Also, like  upstream, I think  that we should break  existing configura-
> tions as little as possible.

Exactly. And that's why we have that switch which does things
different if running on Ubuntu:

I want a unified code base without breaking Debian's nor Ubuntu's
existing defaults — independent how sane or not they might be. :-)

> The Ubuntu Maintainers at the time didn't agree. And here we are.

Any chance that they might answer differently nowadays? Whom did you
hear that from at Ubuntu?

> My position  in this matter  hasn't changed  either. It would  take some
> amazing arguments for me to change it.  Needless to say, thus far I have
> not heard anything even remotely compelling on the subject at all.

JFTR: I actually don't have an opinion on this specific topic.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Pkg-zsh-devel mailing list