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

Re: Few questions



On Mon, 2007-01-29 at 16:08 +0800, Thomas Goirand wrote:
> Hi!
> 
> 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

No, because everything in the Debian directory must be preserved by
diff, which means it must be a regular text file.

> Second, in my package1.config script, I need to know what is the name of
> the package that is currently being configured (because I'd like that
> it's same script for package1 and package2 using a symlink). Is it
> available in a shell variable?
<snip>

No.  You would need to substitute in the names of packages when building
the binary pckages.

You could have a template postinst file and then (1) in the command for
the "binary" target make copies of that with substitutions (perhaps
using sed), and (2) in the commands for the "clean" target delete the
substituted version.  Make sure to comment what you're doing.

Ben.

-- 
Ben Hutchings
Q.  Which is the greater problem in the world today, ignorance or apathy?
A.  I don't know and I couldn't care less.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: