~alpine/devel

1

[alpine-devel] install scripts, triggers and subpackages

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20110627202220.1f31aad4@alpinelinux.org>
Sender timestamp
1309198940
DKIM signature
missing
Download raw message
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:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20110628140358.4442b53e@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<20110627202220.1f31aad4@alpinelinux.org> (view parent)
Sender timestamp
1309262638
DKIM signature
missing
Download raw message
On Mon, 27 Jun 2011 20:22:20 +0200
Natanael Copa <ncopa@alpinelinux.org> wrote:
> 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"
...
> 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


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)