You are not logged in.

#1 2010-11-06 23:47:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,729
Website

dependency either or question

How can I specify that the user needs to have either package A or B as a dependency?  If the user has neither, how does a PKGBUILD specify which is the default to install?

There are three handbrake packages that will satisfy the dependency requirement: handbrake, handbrake-svn (from the AUR), and handbrake-cli.  I have a script that uses a component of all three of them.  I need to make sure that the deps are handeled correctly in my PKGBUILD.

This is what I have (based on fukawi's PKGBUILD for backintime):

 if [ ! -x '/usr/bin/HandBrakeCLI' ]; then
   depends=( ${depends[@]} 'handbrake-cli')
 else
   depends=( ${depends[@]} 'handbrake-svn-cli')
 fi

Last edited by graysky (2010-11-07 13:34:43)

Offline

#2 2010-11-07 01:30:37

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: dependency either or question

Typically you depend on the provision. In this case, you'd depend on handbrake as handbrake-svn provides handbrake. I'm not familiar with handbrake, but extra/handbrake-cli seems to be a separate animal. It doesn't conflict with extra/handbrake. Are you sure it provides what you need it to?

Offline

#3 2010-11-07 07:33:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,729
Website

Re: dependency either or question

@falconindy - yes, handbrake and handbrake-cli both provide a cli version (handbrake provides both a GUI and cli).  The AUR has handbrake-svn which also provides both a GUI and cli version.

Offline

#4 2010-11-07 12:45:28

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: dependency either or question

I disagree with you here. According to the PKGBUILD, extra/handbrake explicitly does not have handbrake-cli.

Offline

#5 2010-11-07 13:09:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,729
Website

Re: dependency either or question

@falconindy - you are right.  My bad.  I asked the maintainer of handbrake-svn to make it a split package: http://aur.archlinux.org/packages.php?ID=29320

Last edited by graysky (2010-11-07 13:35:30)

Offline

#6 2010-11-07 14:22:24

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: dependency either or question

The AUR does not support split packages yet.

Offline

#7 2010-11-07 15:31:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,729
Website

Re: dependency either or question

@SH - I know that it doesn't officially support them, but if you construct the PKGBUILD as I have here, they can be successfully uploaded:

http://pastebin.com/EUau9b1p

Give it a try smile

Offline

Board footer

Powered by FluxBB