[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question regarding package dependance



* Stefanos Harhalakis [Sat, 08 Nov 2008 12:10:49 +0200]:

> Dear mentors,

>   I've come up to a situation that I'm not sure how to handle. A package that 
> I created and packaged, named 'vbackup', is included in debian unstable [1] 
> under the sponsoring of Vincent Bernat (hi Vincent). After getting it from 
> the unstable repository I realised that it doesn't work as expected. vbackup 
> is a set of shell scripts that use external programs like mdadm, xfsdump, 
> tar, etc to perform backups. Since it uses a number of programs that may not 
> be already installed I made the configure script auto-detect them.

>   For debian I declare those packages as suggested:

> Suggests: xfsdump, mdadm, lvm2, postgresql-client, mysql-client, rpm

>   I did this because there is no need to force a user to have postgresql, 
> mysql, mdadm, etc installed when they're not used. It seems that the debian 
> builder builds this package without providing the 'suggested' packages as 
> well. This makes the configure script to fail to detect the proper paths of 
> mdadm, psql, mysql, rpm, etc. Since those paths as stored inside a 
> compile-time generated script (common.sh) those paths stay empty.

>   I find the configure program detection very convenient since it allows 
> vbackup to be run under other OSes like IRIX where the gnu tar is installed 
> in a different location (which is specified by a --with-tar=... parameter to 
> configure).

>   So what do you suggest to do with it? I currently consider the following as 
> possible solutions:
> a) Make the detection run-time (not good)
> b) Add run-time detection when configure-time detection failed (Working on 
> this)
> c) Add a configuration file to hold program locations (Bad - I don't like 
> asking for configuration that can be automated)
> d) Make other programs a "Depends" instead of "Suggests" (Not a good idea. 
> Right?)
> e) Fill a bug report asking that the builder (pbuild?) also include 
> the "Suggests" packages when making a package
> f) Add all 'Suggests' packages as Build-Depends too (is it a good idea? 
> ${Suggests} ?)

In my opinion, you should just invoke the configure script with the
paths of all programs as they are found in Debian, eg.:

  % ./configure --with-tar=/bin/tar --with-postgresql=/foo

However, I have one question: why does the build process hard-code the
paths found in the build system? Why don't the scripts invoke the
programs without specifying a full path, as it is normally done in
scripts? With your way, people could not install a local version of tar
in eg. /usr/local/bin.

If what worries you is knowing whether the binary is available or not,
that's what "which" is for. IMHO this all belongs to runtime...

>   Also, how can I force vbackup to stay in unstable even after lenny is 
> released when such bugs are found? (It makes the package mostly unusable). Is 
> there a relevant how to? I've looked in maintainer's guide and in developer's 
> reference but I didn't find anything related.

Packages stay in unstable by default, unless somebody takes action to
remove them. Does that answer your question?

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
                                  Listening to: Family - El bello verano


Reply to: