FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-17-2008, 12:18 PM
Allan McRae
 
Default Splitting packages in makepkg

Roman Kyrylych wrote:
> 2008/6/16 Aaron Griffin <aaronmgriffin@gmail.com>:
>
>> On Fri, Jun 13, 2008 at 11:24 AM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I like following idea:
>>>
>>> PKGBUILD
>>> ------------------
>>> pkgname=foobar
>>> pkgver=1.0
>>> pkgrel=1
>>> subpackages=(dev doc)
>>>
>>> ....
>>>
>>> build() {
>>>
>>> .....
>>>
>>> make DESTDIR=$startdir/pkg install
>>> ...
>>> make DESTDIR=$startdir/pkg-dev install
>>> ...
>>> make DESTDIR=$startdir/pkg-doc install
>>> }
>>> ---------------
>>>
>>> According to subpackages array makepkg creates 3 dirs:
>>> - $startdir/pkg (as usually)
>>> - $startdir/pkg-dev
>>> - $startdir/pkg-doc
>>>
>>> PKGBUILDs build function install all stuff into them
>>>
>>> And then, makepkg creates 3 packages:
>>>
>>> $pkgname-...pkg.tar.gz
>>> $pkgname-dev-...pkg.tar.gz
>>> $pkgname-doc-...pkg.tar.gz
>>>
>> FTR I like this idea too. Just setup some way to use $pkgdir/foo/
>> instead of $pkgdir (that's what the subpackages=() array does in the
>> above example), and then the rest is free-form. It's the simplest IMO.
>>
>
> It's my favourite too.
>
>

This is pretty much what I suggested in one of the bug reports about
this. But, the problems I now have with this method are:
1) where do you define the different pkgdesc for each package
2) what if there is no obvious "base" package?





_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 12:20 PM
Allan McRae
 
Default Splitting packages in makepkg

Aaron Griffin wrote:
> On Mon, Jun 16, 2008 at 12:57 PM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>
>>> I see a downside in the proposed scheme: you can not create a package
>>> without the $pkgname- suffix, e.g. you can't create the "kopete" or
>>> "kmail" package from "kdenetwork". Moreover, you can't change the
>>> pkgdesc for each sub-package, which can be useful.
>>>
>> makepkg may use subpackages as a new package name
>>
>> subpackages=(foo-dev foo-doc kmail kopete)
>>
>
> Exactly what I was going to say - it's all hypothetical. We could use
> $pkgdir/full-package-name/* for a subpackage "full-package-name"
>


Just another thought. Why do we even need the subpkg array. Why not:
"pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
'foo-doc')" for split packages? I would have to check that you can do
that in bash...




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 12:20 PM
Allan McRae
 
Default Splitting packages in makepkg

Aaron Griffin wrote:
> On Mon, Jun 16, 2008 at 12:57 PM, Sergej Pupykin <pupykin.s@gmail.com> wrote:
>
>>> I see a downside in the proposed scheme: you can not create a package
>>> without the $pkgname- suffix, e.g. you can't create the "kopete" or
>>> "kmail" package from "kdenetwork". Moreover, you can't change the
>>> pkgdesc for each sub-package, which can be useful.
>>>
>> makepkg may use subpackages as a new package name
>>
>> subpackages=(foo-dev foo-doc kmail kopete)
>>
>
> Exactly what I was going to say - it's all hypothetical. We could use
> $pkgdir/full-package-name/* for a subpackage "full-package-name"
>


Just another thought. Why do we even need the subpkg array. Why not:
"pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
'foo-doc')" for split packages? I would have to check that you can do
that in bash...




_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 01:31 PM
"Sergej Pupykin"
 
Default Splitting packages in makepkg

Modified idea:

PKGBUILD
------------------
pkgname=foobar
pkgver=1.0
pkgrel=1
subpackages=(dev doc)
pkgdesc="base package desc"
pkgdesc_dev="foo dev desc"
....

build() {

.....

make DESTDIR=$startdir/pkg install
...
make DESTDIR=$startdir/pkg-dev install
...
make DESTDIR=$startdir/pkg-doc install
}
---------------

According to subpackages array makepkg creates 3 dirs:
- $startdir/pkg (as usually)
- $startdir/pkg-dev
- $startdir/pkg-doc

PKGBUILDs build function install all stuff into them

And then, makepkg creates 3 packages:

$pkgname-...pkg.tar.gz (if $startdir/pkg is not empty)
$pkgname-dev-...pkg.tar.gz (if $startdir/pkg-dev is not empty)
$pkgname-doc-...pkg.tar.gz (if $startdir/pkg-doc is not empty)

May be I am not too famillar with bash, but you can get pkgdesc_dev at
least with construction like this:
$ export pkgdesc_dev="foo dev desc"
$ export pkgdescname=pkgdesc_dev
$ echo `bash -c "echo $`echo $pkgdescname`"`
foo dev desc

It can be easy modified for full package names as I described above:
subpackages=(foo foo-dev foo-doc kmail kopete)
or
pkgname=(foo foo-dev foo-doc kmail kopete)

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 03:00 PM
Silvio Fricke
 
Default Splitting packages in makepkg

Hello Friends,

> Modified idea:
>
> PKGBUILD
> ------------------
> pkgname=foobar
> pkgver=1.0
> pkgrel=1
> subpackages=(dev doc)
> pkgdesc="base package desc"
> pkgdesc_dev="foo dev desc"
> ....
>
> build() {
>
> .....
>
> make DESTDIR=$startdir/pkg install
> ...
> make DESTDIR=$startdir/pkg-dev install
> ...
> make DESTDIR=$startdir/pkg-doc install
> }
> ---------------
>
> According to subpackages array makepkg creates 3 dirs:
> - $startdir/pkg (as usually)
> - $startdir/pkg-dev
> - $startdir/pkg-doc
>
> PKGBUILDs build function install all stuff into them
>
> And then, makepkg creates 3 packages:
>
> $pkgname-...pkg.tar.gz (if $startdir/pkg is not empty)
> $pkgname-dev-...pkg.tar.gz (if $startdir/pkg-dev is not empty)
> $pkgname-doc-...pkg.tar.gz (if $startdir/pkg-doc is not empty)
>
> May be I am not too famillar with bash, but you can get pkgdesc_dev at
> least with construction like this:
> $ export pkgdesc_dev="foo dev desc"
> $ export pkgdescname=pkgdesc_dev
> $ echo `bash -c "echo $`echo $pkgdescname`"`
> foo dev desc
>
> It can be easy modified for full package names as I described above:
> subpackages=(foo foo-dev foo-doc kmail kopete)
> or
> pkgname=(foo foo-dev foo-doc kmail kopete)

why we need this? We need only a possibility to make splitted packages.
I see the first step to get the same buildfiles like gentoo :-).

The last patch from me, make it possible. Finish!

Bye,
eS.eF.

--
-- S. Fricke ---------------------------------------- silvio@port1024.net --
Diplom-Informatiker (FH)
Linux-Entwicklung JABBER: silvio@conversation.port1024.net
----------------------------------------------------------------------------


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 09:17 PM
Miklos Vajna
 
Default Splitting packages in makepkg

On Mon, Jun 16, 2008 at 04:31:11PM -0500, Dan McGee <dpmcgee@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.

http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=blob;f=doc/FrugalBuild.txt;hb=HEAD

-> '=== Package splitting'

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

pkgname=libfoo
groups=('foo' 'bar')

pkgname=foo-doc
groups=('baz' 'blah')

becomes

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:

http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-stable.git;a=blob;f=source/locale-extra/kde-i18n/FrugalBuild;hb=HEAD

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:

http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-stable.git;a=blob;f=source/devel/gcc/FrugalBuild;hb=HEAD

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.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-17-2008, 09:35 PM
Miklos Vajna
 
Default Splitting packages in makepkg

On Tue, Jun 17, 2008 at 10:20:59PM +1000, Allan McRae <mcrae_allan@hotmail.com> wrote:
> Just another thought. Why do we even need the subpkg array. Why not:
> "pkgname=foo" for single packages and "pkgname=('foo' 'foo-bar'
> 'foo-doc')" for split packages? I would have to check that you can do
> that in bash...

pkgname=("foo") is equivalent to pkgname="foo" in bash, at least

${pkgname[0]} will work for both, ${#pkgname[@]} will report 1 for both,
etc.
_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 04:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org