[pacman-dev] Splitting packages in makepkg

Miklos Vajna vmiklos at frugalware.org
Tue Jun 17 17:17:42 EDT 2008

On Mon, Jun 16, 2008 at 04:31:11PM -0500, Dan McGee <dpmcgee at gmail.com> wrote:
> > and this is where you make it impossible to name a subpkg 'kopete',
> > right?
> >
> > how would that handle the case when for example openoffice.org-i18n-de
> > is split from openoffice.org?
> >
> > (given that the implementation we have in pacman-g2 was already flamed
> > off here, iirc - i don't want to hype it here, but that one deals with
> > such a problem properly.)
> Can you possibly give us an overview of how it works? I think it would
> be quite relevant to this discussion as it is actually a system that
> is used, rather than a bunch of "well this might work" scenarios.


-> '=== Package splitting'

basically we have a subpkgs() array which defines the subpackages, and
we have subfoo variables for other foo variables, like:

groups=('foo' 'bar')

groups=('baz' 'blah')


subpkgs=('libfoo' "$pkgname-doc")
groups=('foo bar' 'baz blah')

the main package's files are still under $startdir/pkg, but libfoo is
under $startdir/pkg.libfoo, foo-doc is under $startdir/pkg.foo-doc, etc.

there is also a macro called Fsplit that moves a files/directories from
$startdir/pkg to a $startdir/pkg.foo dir, like:

Fsplit subpkgname usr/share/

but of course it can be done manually using mkdir and mv.

here is a more complex example when there are a lot of subpackages:


probably the biggest problem with it (since every implementation has
some problems) is that it can be a bit tricky to see for example what
deps are set for a given subpackage if you have a lot of them.

like this:


if you ask me what deps 'gcc-objc++' has, then i can't say the answer
right now, i have to search a bit.

and the big benefit (what rpm does not have) is that if you don't split
a given file then it's included in the main package and it is not just
dropped, like rpm does.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20080617/a8515c1f/attachment.pgp>

More information about the pacman-dev mailing list