Using Vim's native packages feature in Debian packages
Sam Morris
sam at robots.org.uk
Tue Dec 13 13:16:13 UTC 2016
I experimented with modifying a package I maintain to use Vim 8's new
packages feature instead of vim-addon-manager. I encountered no serious
problems, and made the following observations:
1. A (Debian) package can drop files in
/usr/share/vim/vim80/pack/${debpkg}/{start,opt}/${vimaddon}
2. If 'start' is used, the vim addon will be loaded automatically (as
is already done by several Debian packages)
3. If 'opt' is used then the user has to put 'packadd ${vimaddon}' in
their .vimrc; this is more like how vim-addon-manager is supposed to
be used, with users opting in to installed Vim addons
4. I was not sure how best to depend on Vim 8 or higher. I settled on
'Depends: vim-common (>= 2:8)'
5. I had to build-depend on vim-common, and invoke helpztags in my
install rule in order to generate help tags
6. Lintian wasn't happy that I shipped a shared library under
/usr/share
I've attached a patch demonstrating the changes I made:
debian/NEWS | 8 +++++++
debian/README | 10 ---------
debian/command-t.yaml.in | 4 ----
debian/control | 5 ++++-
debian/install | 6 ++---
debian/postinst | 40 ----------------------------------
debian/prerm | 39 ---------------------------------
debian/rules | 6 ++---
debian/vim-command-t.lintian-overrides | 1 +
9 files changed, 18 insertions(+), 101 deletions(-)
Dropping the maintainer scripts felt good! :)
If it was decided to deprecate the use of vim-addon-manager in favour
of Vim's native packages feature, /usr/{share,lib}/vim/packages could
be added to packpath, and Debian packages could ship their addons
inside these directories, under pack/${debpkg}/{start,opt} (depending
on whether the addons should be enabled automatically or not).
(Please CC me in followups)
--
Sam Morris < https://robots.org.uk/>
PGP: rsa4096/CAAA AA1A CA69 A83A 892B 1855 D20B 4202 5CDA 27B9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vim-command-t-pack.patch
Type: text/x-patch
Size: 6205 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20161213/cfc5b1b5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20161213/cfc5b1b5/attachment.sig>
More information about the pkg-vim-maintainers
mailing list