You are not logged in.

#1 2013-01-24 23:21:36

shaumux
Member
Registered: 2013-01-21
Posts: 13

Different sources split packages

How do i put different sources for each package in a split package?
Also i couldn't find any documentation on the build function for split packages, Will it be same for all the split packages?

Thanks

Offline

#2 2013-01-24 23:39:08

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Different sources split packages

if you have different sources for each split package, they should be different packages.  And there is only one build function in a PKGBUILD.

Offline

#3 2013-01-25 02:02:06

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

Ok but if theres only one build function does that mean all the parts have to be built irrespective of the parts chosen?

Offline

#4 2013-01-25 02:42:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: Different sources split packages

What parts are you talking about? Split packages are about splitting one build into multiple packages. If you have more than one thing that needs to be built, ie the different sources you mentioned, they should be separate packages.

Offline

#5 2013-01-25 03:11:35

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Different sources split packages

Split packages are only for cases when a single source is used to build multiple packages at once (e.g. vim and gvim are built from the same source).

If you want to re-use common sources between packages that also rely on non-common sources, set the SRCDEST variable in /etc/makepkg.conf.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2013-01-25 07:02:48

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Different sources split packages

As always, an actual example would help.

Offline

#7 2013-01-27 21:02:58

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

Thanks for your replies and sorry for the late answer.
I get the source part.
but what about the build part.

eg. if i already have vim installed and then want to install gvim.
but since the package has only one build function does it mean that both vim and gvim will get built even though i am only installing gvim.

Offline

#8 2013-01-27 23:01:25

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Different sources split packages

Well using gvim (in Extra) as an example, gvim includes vim. As such it conflicts with the standalone vim package.

Offline

#9 2013-01-27 23:04:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Different sources split packages

shaumux wrote:

eg. if i already have vim installed and then want to install gvim.
but since the package has only one build function does it mean that both vim and gvim will get built even though i am only installing gvim.

man makeppkg wrote:

       --pkg <list>
Only build listed packages from a split package.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2013-01-27 23:20:06

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Different sources split packages

In that case "build" certain packages means "make the actual package".    There is a single build function, everything gets built together.

Offline

#11 2013-01-27 23:54:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Different sources split packages

Allan wrote:

In that case "build" certain packages means "make the actual package".    There is a single build function, everything gets built together.

The finer distinction between building and making is, alas, still none the clearer for me...

makepkg runs `make` on only the package selected with the --pkg flag, but both packages (in the case of the vim PKGBUILD) get built?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2013-01-28 00:03:46

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Different sources split packages

makepkg runs build() always. If you use `--pkg p2' then makepkg skips package_p1() and only calls package_p2().

Offline

#13 2013-01-28 00:05:02

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

What is the point of building the unwanted package since it will only take resources

Offline

#14 2013-01-28 00:06:56

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Different sources split packages

I will leave that to the devs.

I don't know if it's a case of "no one has implemented split build() functionality yet" or if there is some specific reasoning against it.

Last edited by tdy (2013-01-28 00:07:49)

Offline

#15 2013-01-28 00:09:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Different sources split packages

split build == different PKGBUILDs

Edit:
And...

I can adjust the package_pkg2() function and run this just to repackage pkg2:

makepkg -R --pkg pkg2

Offline

#16 2013-01-28 00:10:40

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

Yes that's what i'm not understanding, if they are different packages then why have a single build function for them?

Offline

#17 2013-01-28 00:13:02

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Different sources split packages

I will take gcc as an example.

Building gcc should be done at the same time for all languages.  E.g. you can not build the ada stuff completely separately.   But it does make sense to split the components up for install.

Same story for libreoffice.

Offline

#18 2013-01-28 00:18:23

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

Ok so even though  i don't need to install them all to work but they cannot be built seperately.
and if they can be built separately they should not be in a split package even though they might share the same source.
Is that right?

Offline

#19 2013-01-28 00:47:17

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Different sources split packages

Seems about right.

Offline

#20 2013-01-28 01:14:11

shaumux
Member
Registered: 2013-01-21
Posts: 13

Re: Different sources split packages

Thanks for taking the time to explain it to me.

Offline

Board footer

Powered by FluxBB