Bug#200264: tetex's dependencies on texdoctk, dvipdfm, perl-tk
On Tue, Apr 20, 2004 at 05:19:53PM +0200, Frank K?ster wrote:
> Hi all!
>
> Frank K?ster <frank@debian.org> wrote:
>
> > I am confused. Could somebody else please try the following:
>
> No longer confused. The reason for the problems was that the combination
> of "Conflicts/Replaces/Provides" can only be used when this single
> package completely replaces an older one. In our case, however, the
> files are now distributed among tetex-base and tetex-bin.
>
> Replaces: implicitly includes Provides, or at least it has the result
> that a package that conflicts with foo will also conflict with any
> package that replaces foo.
>
> Therefore:
>
> tetex-base: Replaces: texdoctk, dvipdfm
> tetex-bin: Replaces: texdoctk, dvipdfm
> Provides: texdoctk, dvipdfm
>
> and no conflicts. The old configuration files will stay in place, but
> this is a separate issue.
>
> Now comes the part why I send this mail Cc: to Julian (probably you're
> subscribed to -tetex-maint, but also probably you don't read it so
> frequently):
>
> texdoctk had a Depends on perl-tk, tetex-extra had and tetex-bin now has
> a Suggests: perl-tk. We can discuss whether Recommends fits better, but
> in any case we won't make it a hard Depends.
>
> Therefore it would be good to provide a helpful error message that tells
> the user to install perl-tk. Is it possible to write something like this
> in perl?
--- /tmp/texdoctk.orig 2004-04-20 22:10:43.000000000 +0100
+++ /tmp/texdoctk 2004-04-20 22:18:13.000000000 +0100
@@ -1,6 +1,4 @@
-#!/usr/bin/env perl
-# We started with a hack provided by Thomas Esser. This expression replaces
-# the unix specific line \type {#!/usr/local/bin/perl -w}.
+#!/usr/bin/perl
###############################################################################
# texdoctk v.0.5.2 beta 4 (Feb 20, 2003) - GUI for TeX documentation access
# Copyright (C) 2000-2002 Thomas Ruedas
@@ -9,9 +7,20 @@
# disclaimer.
###############################################################################
use strict;
-use Tk;
use Getopt::Long;
Getopt::Long::config('bundling');
+use Tk;
+BEGIN {
+ eval { require Tk; import Tk; };
+ if ($@) {
+ my $progname = basename($0);
+ if ($@ =~ /^Can\'t locate Tk\.pm/) {
+ die "$progname: you must have the perl-tk package installed\nto use this script\n";
+ } else {
+ die "$progname: problem loading the Tk module:\n $@\nHave you installed the perl-tk package?\n";
+ }
+ }
+}
my $IsWin32 = ($^O =~ /MSWin32/i);
Julian
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, website: http://www.polya.uklinux.net/
Debian GNU/Linux Developer, see: http://people.debian.org/~jdg/
Visit http://www.thehungersite.com/ to help feed the hungry
Reply to: