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

Re: Few questions



On Mon, 29 Jan 2007 22:00:13 +0800
Thomas Goirand <thomas@goirand.fr> wrote:

> Neil Williams wrote:
> > On Mon, 29 Jan 2007 16:08:39 +0800
> > Thomas Goirand <thomas@goirand.fr> wrote:
> >
> >> I have few questions that would help me to solve things in my
> >> package. I have package1 and package2 being same but with different
> >> dependencies, so the user can choose between them.
> >>
> >> First, if my package produces many binaryies, is it ok to do symlinks
> >> of the postinst if they are same. Like:
> >>
> >> debian/package1.postinst would link to debian/package2.postinst
> >
> > What happens then if the user chooses to install package 1 without
> > package 2?
>
> My control file is done this way:
>
> Package: package1
> Replaces: package2
> [...]
>
> Package: package2
> Replaces: package1
>
> The only thing that differs from both packages are dependencies, nothing
> else.

So these are two packages built from the same source? There is
one .diff.gz and one .dsc for both?

That is quite different to how it sounded originally - where you had
two source packages, not two binaries from the same source.

> > Note that dpkg-buildpackage will try to retain symlinks that
> > exist in the debian/ directory and you can easily end up with a package
> > containing a symlink to /home/thomas/foo which will break on any other
> > system, even if the user is called Thomas!
>
> >
> > You can use symlinks in the upstream source, maybe in SVN etc., but
> > when you prepare a directory to build the Debian package, you must take
> > care that files in debian/ are actual files and that symlinks in
> > debian/ are correctly installed so as to symlink to the final location
> > under /usr/ etc.
>
> I didn't express myself correctly. My goal was to do, in the debian folder:
>
> ln -s package1.postinst package2.postinst

I haven't tried that way of doing it - try viewing the packages in
deb-gview and make sure that the each postinst is a real file
within the Debian data of the .deb.

> Ok. If I understand correctly, package1 and package2 could have
> different files installed just in order for me to test, right? Very good
> idea and easy to implement. Thanks for the idea.

I was actually expecting these to be two separate packages - it isn't
good to create files just for testing within the package itself. If
there are files that you can use, fine. If not, you may need to call
'dpkg' to check which version is installed.

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp1NxpiZGaIR.pgp
Description: PGP signature


Reply to: