Subject: [alpine-devel] install scripts, triggers and subpackages

From: Natanael Copa <[email-masked]>
Date: Mon, 27 Jun 2011 20:22:20 +0200

Hi,

There is a need to predict all the files in an APKBUILD, including
install scripts and trigger scripts for subpackages.

Currently, you can set install="somescript" inside the subpackages
split function. This means that is is impossible to know that
subpackages have install or trigger script without running the split
function itself.

I am proposing the following change for install scripts:

Install script variable holds a list of all scripts for main package
and subpackage in the format:

  $name.$suffix $name-sub1.$suffix ...

Where $name is the name of the package or subpackage and suffix is one
of pre-install, post-install, pre-update, post-update, pre-deinstall
and post-deinstall.

The only change this is from what we do now with install, is that you
need to add subpackages' install scripts there too instead of setting
the script in split function.

It seems like no subpackage has install script so no APKBUILD is
affected by this change.

Example: package foo with subpackage foo-libs where both have a
post-install script:

pkgname="foo"
subpackages="foo-libs"
install="foo.post-install foo-libs.post-install"
...

I also suggest the followin change for triggers variable:

Triggers variable holds a list of scripts and dirs that triggers the
scripts in the following format:

 $name.trigger=path1:path2:pathN $name-sub1.trigger=path1:pathN

This will break all apkbuilds that currently has a trigger. (busybox,
dbus, desktop-file-utils, fontconfig, gdk-pixbuf, glib, gtk+2.0,
gtk+3.0, gvfs, java-common, libc0.9.32, mkfontdir, mkfontscale,
mkinitfs, shared-mime-info, syslinux and vlc)

Example trigger for package foo with foo-libs subpackage where both
have a trigger for /bin and /usr/bin will look like:

triggers="foo.trigger=/bin:/usr/bin foo-libs.trigger=/bin:/usr/bin"

Objections? Comments? Other ideas?

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Tue, 28 Jun 2011 14:03:58 +0200

On Mon, 27 Jun 2011 20:22:20 +0200
...
> triggers="foo.trigger=/bin:/usr/bin foo-libs.trigger=/bin:/usr/bin"

I have implemented this in abuild (git) now. I need help with testing
newapkbuild from git and then I can cut a new abuild release. Maybe
call it 3.0? It breaks apkbuild API.

-nc

---