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

Bug#234362: debbugs: $gPackagePages should be optionnal

Package: debbugs
Version: 2.4.1
Severity: wishlist
Tags: patch

Hello BTS maintainers,

When using debbugs on a non Debian site, we may not have the
equivalent of packages.debian.org. Therefore we should be 
able to undef $debbugs::gPackagePages and debbugs should just
not display the link.

Debbugs already does this check for $debbugs::gSubscriptionDomain

The patch below does this.

You may want to document this feature in /etc/debbugs/config.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.24-skas
Locale: LANG=français, LC_CTYPE=français

Versions of packages debbugs depends on:
ii  ed                            0.2-20     The classic unix line editor
ii  libio-stringy-perl            2.109-1    Perl5 modules for IO from scalars 
ii  libmailtools-perl             1.60-1     Manipulate email in perl programs
ii  libmime-perl                  5.411-3    Perl5 modules for MIME-compliant m
ii  nullmailer [mail-transport-ag 1.00RC7-21 simple relay-only mail transport a
ii  perl [perl5]                  5.8.3-2    Larry Wall's Practical Extraction 

-- no debconf information

--- /home/bill/pkgreport.orig	Mon Feb 23 12:13:08 2004
+++ /home/bill/pkgreport.cgi	Mon Feb 23 12:23:43 2004
@@ -11,7 +11,7 @@
 require '/etc/debbugs/config';
 require '/etc/debbugs/text';
-use vars qw($gPackagePages $gWebDomain);
+use vars qw($gWebDomain);
     print "Content-Type: text/html\n\n";
@@ -240,7 +240,7 @@
 	    my $pseudodesc = getpseudodesc();
 	    if (defined($pseudodesc) and exists($pseudodesc->{$pkg})) {
 		push @references, "to the <a href=\"http://${debbugs::gWebDomain}/pseudo-packages${debbugs::gHTMLSuffix}\";>list of other pseudo-packages</a>";
-	    } else {
+	    } elsif (defined $debbugs::gPackagePages) {
 		push @references, sprintf "to the <a href=\"%s\">%s package page</a>", urlsanit("http://${debbugs::gPackagePages}/$pkg";), htmlsanit("$pkg");
 	    if ($srcforpkg) {

Reply to: