Subject: xpdf needs an entry in mailcap

From: "Brian C. White" <[email-masked]>
Date: Wed, 07 Aug 1996 00:28:50 -0400

The "xpdf" postinst needs to add itself to the mailcap file so it can
be spawned by web browsers.

I'd suggest the following in the postinst:

if [ -x /usr/sbin/install-mime ]
then
   install-mime	--install --package=xpdf --content=application/pdf \
		--view="/usr/bin/X11/xpdf %s" --test='test "$DISPLAY" != ""' \
		--comment="A generic PDF viewer for X-Windows"
fi

And the following in the prerm:

if [ -x /usr/sbin/install-mime ]
then
   install-mime	--remove --package=xpdf
fi

                                        Brian
                               ( [email-masked] )

-------------------------------------------------------------------------------
    In theory, theory and practice are the same.  In practice, they're
not.

---

From: "Brian C. White" <[email-masked]>
Date: Wed, 07 Aug 1996 01:32:12 -0400

[  I goofed on the first message.  Use this one instead.  :-]

I suggest the following in the postinst:

if [ -x /usr/sbin/install-mime ]
then
  install-mime --install --package=xpdf --content=application/pdf \
               --description='Adobe "Acrobat" File' --nametemplate="%s.pdf" \
               --view="/usr/bin/X11/xpdf %s" --test='test "$DISPLAY" != ""'
fi

The 'if' statements can be removed if you want to add a dependancy on
"mime-support (>=2.0)".

                                        Brian
                               ( [email-masked] )

-------------------------------------------------------------------------------
    In theory, theory and practice are the same.  In practice, they're not.

---

From: "Brian C. White" <[email-masked]>
Date: Wed, 07 Aug 1996 23:13:28 -0400

>   Brian>  If you put the "if" clause around the calls to "install-mime", then
>   Brian> you don't have to actually depend on 'mime-support'.
> 
> That is correct. But would I want this? Now that we have mime-support,
> shouldn't I depend on it? It really is a useful feature. I find it reasonable
> to enfore this via Depends. Otherwise it fails silently and we gain nada.

I think it should depend on it, yes.  I just wanted to make sure you
knew
it wasn't strictly necessary.

In the past, some people have complained about depending upon packages
that
aren't strictly necessary.

> BTW: I currently use what you posted earlier as calls to install-mime, but
> added a ">/dev/null" as I don't like the verbosity too much. As the output of
>         # grep install-info /var/lib/dpkg/info/*.postrm | grep -v quiet
> is empty on my machine, I think you should add a switch --quiet.

I can add the --quiet option, but you must not redirect the output.
"install-mime" can become interactive if it encounters a conflict, and
with no stdout this would cause problems.

                                        Brian
                               ( [email-masked] )

---

From: "Brian C. White" <[email-masked]>
Date: Wed, 07 Aug 1996 12:23:18 -0400

> As the priority of mime-support is "standard" and therefore higher than the
> one of xpdf ("extra"), I'll add a "Depends: mime-support". If anybody has a
> problem with that, mail me soon, or file a bug report later ...

If you put the "if" clause around the calls to "install-mime", then you don't
have to actually depend on 'mime-support'.

                                        Brian
                               ( [email-masked] )

---

From: [email-masked]
Date: Wed, 7 Aug 96 22:01 EDT

Dirk> As the priority of mime-support is "standard" and therefore higher
  Dirk> than the one of xpdf ("extra"), I'll add a "Depends:
  Dirk> mime-support". If anybody has a problem with that, mail me soon, or
  Dirk> file a bug report later ...

--
Dirk Eddelb"uttel                             http://qed.econ.queensu.ca/~edd

---

From: [email-masked]
Date: Wed, 7 Aug 96 09:17 EDT

Thanks for the suggestion, Brian. I'll do that today.