Your message dated Sun, 28 Mar 2004 14:02:08 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#239560: fixed in base-config 2.17
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 23 Mar 2004 12:42:48 +0000
>From [EMAIL PROTECTED] Tue Mar 23 04:42:48 2004
Return-path: <[EMAIL PROTECTED]>
Received: from orochi.topstudio.co.jp (mail.topstudio.co.jp) [202.224.239.193] 
(postfix)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1B5lF1-00027J-00; Tue, 23 Mar 2004 04:42:48 -0800
Received: from localhost (localhost [127.0.0.1])
        by mail.topstudio.co.jp (Postfix) with ESMTP id 38475223063
        for <[EMAIL PROTECTED]>; Tue, 23 Mar 2004 21:42:46 +0900 (JST)
Received: from mail.topstudio.co.jp ([127.0.0.1])
        by localhost (hydra [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
        id 11670-07 for <[EMAIL PROTECTED]>;
        Tue, 23 Mar 2004 21:42:46 +0900 (JST)
Received: from hellhound (orochi.topstudio.co.jp [202.224.239.193])
        by mail.topstudio.co.jp (Postfix) with ESMTP id EDBF422305F
        for <[EMAIL PROTECTED]>; Tue, 23 Mar 2004 21:42:45 +0900 (JST)
Received: by hellhound (Postfix, from userid 1000)
        id DCFD62141A2; Tue, 23 Mar 2004 21:42:48 +0900 (JST)
From: Kenshi Muto <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: base-config: Set default mirror site patch
X-Debbugs-CC: Kenshi Muto <[EMAIL PROTECTED]>
User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 MULE XEmacs/21.4 
(patch 15) (Security Through Obscurity) (i386-debian-linux)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=US-ASCII
Message-Id: <[EMAIL PROTECTED]>
Date: Tue, 23 Mar 2004 21:42:48 +0900 (JST)
X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at topstudio.co.jp
X-BadReturnPath: [EMAIL PROTECTED] rewritten as [EMAIL PROTECTED]
  using "From" header
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_12 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-10.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
        X_DEBBUGS_CC autolearn=no version=2.60-bugs.debian.org_2004_03_12
X-Spam-Level: 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: base-config
Version: 2.17
Severity: wishlist
Tags: patch

I created default mirror patch for apt-setup.
This checks debian-installer/country value and choices his/her country
first as mirror list.

This patch looks dirty, but this is because it is difficult to apply
i18n value to dynamic created items.

After this report, I'll commit this patch into base-config repository.
- -- 
Kenshi Muto
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkBgMH0ACgkQQKW+7XLQPLGuIgCfdPCFc0VZac+vubKpQ2I6qEvQ
qwwAn3KpcV6E+LrI6wNE/9XnGdIl2j5c
=Mx+r
-----END PGP SIGNATURE-----
diff -u -r1.44 apt-setup
--- apt-setup   23 Feb 2004 00:16:56 -0000      1.44
+++ apt-setup   23 Mar 2004 12:34:07 -0000
@@ -32,6 +32,42 @@
        APTCDROM Dir::Bin::apt-cdrom/d`
 eval $RES
 
+country_i18n () {
+  # conversion country name using iso_3166 table
+    case "$1" in
+      local)
+        perl -e '
+               use Locale::gettext;
+               use POSIX;
+               textdomain("iso_3166");
+               print gettext(shift);
+               ' $2
+      ;;
+      C)
+        perl -e '
+               use Locale::gettext;
+               use POSIX;
+               textdomain("iso_3166");
+               $country=shift;
+               $ret= "";
+
+               open (T, "/usr/share/zoneinfo/iso3166.tab");
+               while (<T>) {
+                       next if /^#/;
+                       chomp;
+                       ($code, $long)=split(/\t/, $_);
+                       if (gettext($long) eq $country) {
+                           $ret = $long;
+                           close T;
+                       }
+               }
+               close T;
+               print $ret ? $ret : $country;
+               ' $2
+      ;;
+    esac
+}
+
 # Pass in a URI type; this function returns a list of countries
 # that have mirrors in them that match the type.
 country_list () {
@@ -47,14 +83,14 @@
                                next if /^#/;
                                chomp;
                                ($code, $long)=split(/\t/, $_);
-                               $c{$code}=$long;
+                               $co{$code}=$long;
                        }
                        close T;
                        $/="\n\n";
                }
                if (/Archive-$type:/) {
                        ($c)=/Country: (.*?)\s+.*\n/;
-                       $countries{gettext($c{$c})}=1 if $c;
+                       $countries{gettext($co{$c})}=1 if $c;
                }
                END { print join(", ", sort(keys %countries)) }
        ' $1 $MIRRORLIST
@@ -67,9 +103,6 @@
 mirror_list () {
        perl -ne '
                BEGIN {
-                       use Locale::gettext;
-                       use POSIX;
-                       textdomain("iso_3166");
                        $type=shift;
                        $country=shift;
                        open (T, "/usr/share/zoneinfo/iso3166.tab");
@@ -77,7 +110,7 @@
                                next if /^#/;
                                chomp;
                                ($code, $long)=split(/\t/, $_);
-                               if (gettext($long) eq $country) {
+                               if ($long eq $country) {
                                        $country=$code;
                                        close T;
                                }
@@ -272,12 +305,48 @@
        ftp|http)
                # Ask them which country they're in.
                db_subst apt-setup/country countries "`country_list $URI`"
+               db_fget apt-setup/country seen
+               if [ "$RET" = "false" ]; then
+                 # Set default country
+                 db_get debian-installer/country
+                 COUNTRY=$(perl -e '
+                       $countrycode=shift;
+                       open (T, "/usr/share/zoneinfo/iso3166.tab");
+                       while (<T>) {
+                               next if /^#/;
+                               chomp;
+                               ($code, $long)=split(/\t/, $_);
+                               if ($code eq $countrycode) {
+                                       print "$long";
+                                       close T;
+                               }
+                       }
+                       close T;
+                  ' $RET)
+                  if [ -n $COUNTRY ]; then
+                    db_set apt-setup/country $COUNTRY
+                  fi
+               fi
+               db_get apt-setup/country
+               IFS=","
+               db_set apt-setup/country $(country_i18n local "$RET")
+               unset IFS
+               db_get apt-setup/country
                db_fset apt-setup/country seen false
                db_input critical apt-setup/country || true
                db_go || continue
-               
+
                db_get apt-setup/country
                if [ "$RET, " != "$(gettext 'enter information manually, ')" ]; then
+                  IFS=","
+                  db_set apt-setup/country $(country_i18n C "$RET")
+                  unset IFS
+               else
+                  db_set apt-setup/country 'enter information manually'
+               fi
+
+               db_get apt-setup/country
+               if [ "$RET" != "enter information manually" ]; then
                        # Now prompt with the mirrors in the selected country.
                        db_subst apt-setup/mirror mirrors "`mirror_list $URI \"$RET\"`"
                        db_fset apt-setup/mirror seen false

---------------------------------------
Received: (at 239560-close) by bugs.debian.org; 28 Mar 2004 19:08:56 +0000
>From [EMAIL PROTECTED] Sun Mar 28 11:08:56 2004
Return-path: <[EMAIL PROTECTED]>
Received: from newraff.debian.org [208.185.25.31] (mail)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1B7feR-0005xZ-00; Sun, 28 Mar 2004 11:08:56 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
        id 1B7fXs-0004H3-00; Sun, 28 Mar 2004 14:02:08 -0500
From: Joey Hess <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.45 $
Subject: Bug#239560: fixed in base-config 2.17
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Sun, 28 Mar 2004 14:02:08 -0500
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: base-config
Source-Version: 2.17

We believe that the bug you reported is fixed in the latest version of
base-config, which is due to be installed in the Debian FTP archive:

base-config_2.17.dsc
  to pool/main/b/base-config/base-config_2.17.dsc
base-config_2.17.tar.gz
  to pool/main/b/base-config/base-config_2.17.tar.gz
base-config_2.17_all.deb
  to pool/main/b/base-config/base-config_2.17_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <[EMAIL PROTECTED]> (supplier of updated base-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 18 Mar 2004 16:51:12 -0500
Source: base-config
Binary: base-config
Architecture: source all
Version: 2.17
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <[EMAIL PROTECTED]>
Changed-By: Joey Hess <[EMAIL PROTECTED]>
Description: 
 base-config - Debian base system configurator
Closes: 237387 239560
Changes: 
 base-config (2.17) unstable; urgency=low
 .
   * Petter Reinholdtsen
     - New menu entry debconf-seed, filling in the debconf database
       from /usr/share/base-config/debconf-seed/* at install time.
   * Denis Barbier
     - Store locale in /etc/environment when it is different from en_US.
       Closes: #237387
   * Kenshi Muto
     - Apply default mirror country patch. (Closes: Bug#239560)
       This patch also solves a problem when another LANG is used (now
       apt-setup/country value is always stored in English).
   * Joey Hess
     - Document debconf-seed
     - Only show debconf-seed menu item if the directory exists.
   * Translations:
     - Kęstutis Biliūnas
       - Updated Lithuanian translation (po/lt.po and debian/po/lt.po).
     - Dafydd Harries
       - Updated Welsh translation (po/cy.po, debian/po/cy.po).
     - Konstantinos Margaritis
       - fixed typo in Greek translation (po/el.po)
     - Jure Cuhalev
       - Slovenian translation updates (po/sl.po and debian/po/sl.po)
     - Dennis Stampfer
       - Update German translation (de.po)
     - Andre Dahlqvist
       - Update Swedish translation in po/sv.po
     - Peter Mann
       - fixed typo in Slovak translation (debian/po/sk.po)
     - Ruben Porras
       - tiny patch to base-config.es.8
     - Konstantinos Margaritis
       - Updated Greek translation (debian/po/el.po) small typo
       - Found stupid translation that broke the installation
Files: 
 c8a3f98518e080da441a760cf63eaa47 638 base optional base-config_2.17.dsc
 f3df71299e7749d8f1a5fc7442985ecf 340087 base optional base-config_2.17.tar.gz
 2f5d176270c340acbf146b417143edcc 273360 base optional base-config_2.17_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAZxxX2tp5zXiKP0wRAmQfAKCt8wcxa5xuuSr/x5Xn4CHlMRvyJgCffcMd
KGmt0fpzxtdlWP8E9Nbxd1U=
=Wd/V
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to