Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I made a package for my PPA and uploaded it. It built without any problems.

Then I made another package that depended on the first and uploaded it. It failed because it couldn't find the files in the first package. This leads me to believe that the first package wasn't even installed.

How can I make sure the first package is installed before it tries to build the second?

The control file for the first package (libjsoncpp):

Source: jsoncpp
Priority: extra
Maintainer: Nathan Osman 
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Section: libs
Homepage: http://jsoncpp.sf.net

Package: jsoncpp-dev
Section: libdevel
Architecture: any
Depends: libjsoncpp (= ${binary:Version})
Description: JSON parsing library for C++
 jsoncpp is a C++ library that makes it easy to
 read / write JSON data.
 .
 This package contains the development tools necessary
 to create applications that use jsoncpp.

Package: libjsoncpp
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: JSON parsing library for C++
 jsoncpp is a C++ library that makes it easy to
 read / write JSON data.

The control file for the second (libsopp):

Source: sopp
Priority: extra
Maintainer: Nathan Osman 
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Section: libs
Homepage: http://stackoverflow.quickmediasolutions.com

Package: sopp-dev
Section: libdevel
Architecture: any
Depends: libsopp (= ${binary:Version}), jsoncpp-dev
Description: A C++ library for interfacing with StackExchange sites.
 so++ is a C++ library that wraps the functionality of the StackOverflow
 API. It provides access to all of the StackExchange sites.
 .
 This package contains the development files necessary to write software
 that uses so++.

Package: libsopp
Section: libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libjsoncpp
Description: A C++ library for interfacing with StackExchange sites.
 so++ is a C++ library that wraps the functionality of the StackOverflow
 API. It provides access to all of the StackExchange sites.
share|improve this question
    
Are both packages in the same PPA? –  Jeremy Kerr Aug 6 '10 at 2:07
    
@Jeremy: Yes, they are. –  Nathan Osman Aug 6 '10 at 2:13
    
Does the second package need the first package to build? (i.e. the a *-dev package of a library it uses) –  txwikinger Aug 6 '10 at 2:33
    
@txwikinger: Yes, it does. Do you need to see the control files? –  Nathan Osman Aug 6 '10 at 2:43
    
@txwikinger: Nvm. I added them. –  Nathan Osman Aug 6 '10 at 2:57

1 Answer 1

up vote 8 down vote accepted

Your second package (sopp) needs to specify that it needs the first to build; the dependency you have specified (with Depends:) will only handle installation.

To add a build dependency, add this to the top (Source:) section of your control file:

Build-Depends: jsoncpp-dev

You should then be able to drop jsoncpp from the Depends line, as the shlibs:Depends macro should work that out itself.

share|improve this answer
    
Thanks. I've uploaded it. We'll see what happens. –  Nathan Osman Aug 6 '10 at 3:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.