octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

package autoload


From: Olaf Till
Subject: package autoload
Date: Fri, 15 Apr 2016 11:28:31 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

Let me first say that I'm sorry to speak up so late, now that pkg
autoload support recently has been removed. My excuse is that I think
such things should be discussed thoroughly at the mailing list -- not
only at OctConf or privately -- and I waited for this discussion,
thinking it would happen before such a change will be made. Maybe I
have just missed it, then it is wholly my fault.

There are two effects of this change:

1. A package can't force itself to be automatically loaded.

   Most OF packages already complied to the policy not to do this, and
   there was no considerable additional effort caused by this, so no
   real objection from me here.

2. The user has to change a startup file if he wants a package to be
   always loaded.

   I think this is awkward, and I'd like to explain why.

   Consider the case that a user installs a package with the intention
   to have it always loaded. Then he has to make changes at two
   different places: installing with 'pkg' and changing a startup
   file. Having to make changes at two different places for something
   which is intentionally an entity is not perfect design.

   If a user uninstalls a package which was always loaded, he has to
   remove a line from the startup file. Otherwise he'll get an error
   at next startup, when pkg tries to load the package though it isn't
   installed anymore.

   If one often installs and uninstalls packages (assuming one wants
   them to be always loaded if installed), the necessary changes in
   a startup file are a nuisance.

The things I mentioned as awkward could be avoided if there were a pkg
command to permanently note that a package should be always loaded: At
install, there'd be two different pkg commands necessary, or even only
one pkg command with an additional option, not changes in the
seemingly unrelated startup file. At uninstall, nothing additional
would be necessary at all, since pkg would automatically forget the
order to always load the package at package deinstallation.

So at install, instead of:

install package with pkg --- change startup file

you would have:

install package with pkg --- note package as autoload with pkg.

These are effectively the same schemes, only the latter is cleaner and
faster.

At uninstall, instead of:

uninstall package with pkg --- change startup file

you would just have:

uninstall package with pkg,

of which the latter "scheme" is clearly shorter.


Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]