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

Bug#219888: marked as done (anna: Give the user full control of modules to be installed)



Your message dated Mon, 27 Jun 2005 00:33:46 -0400
with message-id <20050627043346.GA9185@kitenet.net>
and subject line Fixed in NMU of anna 1.11
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; 9 Nov 2003 23:43:08 +0000
>From sprite@sprite.fr.eu.org Sun Nov 09 17:43:05 2003
Return-path: <sprite@sprite.fr.eu.org>
Received: from smtp-100-sunday.nerim.net (kraid.nerim.net) [62.4.16.100] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AIzCz-00077j-00; Sun, 09 Nov 2003 17:43:05 -0600
Received: from sprite.fr.eu.org (sprite.fr.eu.org [213.41.136.74])
	by kraid.nerim.net (Postfix) with ESMTP id 4B27140F23
	for <submit@bugs.debian.org>; Mon, 10 Nov 2003 00:43:02 +0100 (CET)
Received: from spliff.sprite.patnet ([192.168.0.2])
	by sprite.fr.eu.org with esmtp (Exim 3.35 #1 (Debian))
	id 1AIzCu-0007x7-00; Mon, 10 Nov 2003 00:43:00 +0100
Received: from sprite by spliff.sprite.patnet with local (Exim 4.24)
	id 1AIzCt-0003qq-QK; Mon, 10 Nov 2003 00:42:59 +0100
Date: Mon, 10 Nov 2003 00:42:59 +0100
From: Jeremie Koenig <sprite@sprite.fr.eu.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: anna: Give the user full control of modules to be installed
Message-ID: <20031109234259.GA14756@spliff.sprite.patnet>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl"
Content-Disposition: inline
X-Reportbug-Version: 2.36
User-Agent: Mutt/1.5.4i
Sender: Jeremie Koenig <sprite@spliff.sprite.patnet>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.9 required=4.0
	tests=BAYES_60,HAS_PACKAGE,PATCH_UNIFIED_DIFF
	autolearn=ham version=2.53-bugs.debian.org_2003_11_9
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_11_9 (1.174.2.15-2003-03-30-exp)


--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: anna
Version: 0.043
Severity: wishlist

Hello,

The anna TODO list contains :
| * Include all packages that will be autoinstalled in the question about
|   what to install, in addition to those that will not be installed.
|   In corner cases the user mqay need to omit a particular package
|   from being installed even though it would be normally (think kernel
|   module udeb with a module that hangs with the given HW or something).

The attached patch implements it this way :
  - A new template (anna/choose-mode) asks the user (priority low) the
    way udebs should be selected : automatically, propose additional
    modules (default, current behaviour), full control.
  - If full control is chosen, automatically selected components are
    added to the list, preselected. The user can deselect them and they
    won't get installed.

I had to add a new template and change anna/choose-modules. Since i'm
not an native english speaker, reviewing the changes may be necessary.

If these changes are conflicting with the freeze plans going on, but
there is some interest in the patch, i'll keep it in sync with CVS until
it can be applied.

Note that the only way I can reach the partitionning (=swap-space
creating) step without getting out of memory is using these changes (as
well as the rootskel patch in #219528).

-- 
Jeremie Koenig <sprite@sprite.fr.eu.org>

--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="anna-choose-mode.diff"

Index: anna.c
===================================================================
RCS file: /cvs/debian-boot/debian-installer/anna/anna.c,v
retrieving revision 1.67
diff -u -r1.67 anna.c
--- anna.c	5 Nov 2003 15:49:29 -0000	1.67
+++ anna.c	9 Nov 2003 23:07:54 -0000
@@ -28,7 +28,7 @@
 
         if (retriever && (p = di_packages_get_package(status, retriever, 0))) {
             package_to_choice(p, buf, 200);
-	    set_retriever(buf);
+            set_retriever(buf);
         }
     }
 
@@ -42,13 +42,38 @@
     return 0;
 }
 
+static int
+choose_mode(di_packages *status __attribute__((unused)), di_packages **packages __attribute__((unused)), di_packages_allocator **packages_allocator __attribute__((unused)))
+{
+    debconf_fset(debconf, ANNA_CHOOSE_MODE, "seen", "false");
+    debconf_input(debconf, "low", ANNA_CHOOSE_MODE);
+    return 0;
+}
+
+static int
+get_choose_mode()
+{
+    const char *modes[] = {
+        "let the installer decide",
+        "offer additional components",
+        "full control",
+        NULL };
+    int i;
+
+    debconf_get(debconf, ANNA_CHOOSE_MODE);
+    if (debconf->value) {
+        for (i = 0 ; modes[i] && strcmp(debconf->value, modes[i]) ; i++);
+        if (modes[i])  return i;
+    }
+    return 1;   /* default */
+}
 
 static int
 choose_modules(di_packages *status, di_packages **packages, di_packages_allocator **packages_allocator)
 {
-    char *choices, *package_kernel, *running_kernel = NULL;
-    int package_count = 0;
-    di_package *package, *status_package, **package_array;
+    char *choices, *choices_sel, *package_kernel, *running_kernel = NULL;
+    int mode, package_count = 0, package_count_sel = 0;
+    di_package *package, *status_package, **package_array, **package_array_sel;
     di_slist_node *node, *node1;
     struct utsname uts;
 
@@ -114,8 +139,8 @@
             package->status_want = di_package_status_want_unknown;
             di_log (DI_LOG_LEVEL_DEBUG, "ask for %s, matches kernel", package->package);
         }
-	else if (package_kernel)
-	  continue;
+        else if (package_kernel)
+          continue;
         if (package->priority >= di_package_priority_standard)
         {
             package->status_want = di_package_status_want_install;
@@ -138,22 +163,39 @@
 
     /* Slight over-allocation, but who cares */
     package_array = di_new0(di_package *, di_hash_table_size((*packages)->table));
+    package_array_sel = di_new0(di_package *, di_hash_table_size((*packages)->table));
     /* Now build the asklist, figuring out which packages have been
      * pulled into instlist */
+    mode = get_choose_mode();
     for (node = (*packages)->list.head; node; node = node->next) {
         package = node->data;
-        if (package->status_want == di_package_status_want_unknown)
-            package_array[package_count++] = package;
+        switch (package->status_want) {
+            case di_package_status_want_install:
+        	if(mode < 2)  break;
+        	package_array_sel[package_count_sel++] = package;
+        	package->status_want = di_package_status_want_unknown;
+            case di_package_status_want_unknown:
+                package_array[package_count++] = package;
+        	break;
+            default:
+        	break;
+        }
     }
 
     qsort(package_array, package_count, sizeof(di_package *), package_array_compare);
-    choices = list_to_choices(package_array);
+    choices =     list_to_choices(package_array);
+    choices_sel = list_to_choices(package_array_sel);
     debconf_fset(debconf, ANNA_CHOOSE_MODULES, "seen", "false");
     debconf_subst(debconf, ANNA_CHOOSE_MODULES, "CHOICES", choices);
-    debconf_input(debconf, "medium", ANNA_CHOOSE_MODULES);
+    debconf_set(debconf, ANNA_CHOOSE_MODULES, choices_sel);
+    /* Fortunately we are the last entry, so "Go back" hasn't got to work :) */
+    if (mode >= 1)
+        debconf_input(debconf, "medium", ANNA_CHOOSE_MODULES);
 
     di_free(choices);
+    di_free(choices_sel);
     di_free(package_array);
+    di_free(package_array_sel);
 
     return 0;
 }
@@ -261,6 +303,7 @@
     int ret, state = 0;
     int (*states[])(di_packages *status, di_packages **packages, di_packages_allocator **packages_allocator) = {
         choose_retriever,
+        choose_mode,
         choose_modules,
         NULL,
     };
@@ -278,8 +321,8 @@
     di_package **retrievers_before = get_retriever_packages(status);
 
     if (argc > 1) {
-	    set_retriever(argv[1]);
-	    state=1; /* skip manual setting and use the supplied retriever */
+            set_retriever(argv[1]);
+            state=1; /* skip manual setting and use the supplied retriever */
     }
     
     while (state >= 0 && states[state] != NULL) {
Index: anna.h
===================================================================
RCS file: /cvs/debian-boot/debian-installer/anna/anna.h,v
retrieving revision 1.28
diff -u -r1.28 anna.h
--- anna.h	2 Nov 2003 23:09:24 -0000	1.28
+++ anna.h	9 Nov 2003 23:07:54 -0000
@@ -12,6 +12,7 @@
 #define EXCLUDE_FILE            DOWNLOAD_DIR "/exclude"
 #define DPKG_UNPACK_COMMAND	"udpkg --unpack"
 #define ANNA_RETRIEVER          "anna/retriever"
+#define ANNA_CHOOSE_MODE        "anna/choose_mode"
 #define ANNA_CHOOSE_MODULES     "anna/choose_modules"
 #define ANNA_NO_MODULES         "anna/no_modules"
 
Index: debian/templates
===================================================================
RCS file: /cvs/debian-boot/debian-installer/anna/debian/templates,v
retrieving revision 1.20
diff -u -r1.20 templates
--- debian/templates	9 Nov 2003 02:37:52 -0000	1.20
+++ debian/templates	9 Nov 2003 23:07:54 -0000
@@ -5,11 +5,26 @@
  The retriever is responsible for fetching installer components to be
  loaded.
 
+Template: anna/choose_mode
+Type: select
+_Choices: let the installer decide, offer additional components, full control
+Default: offer additional components
+_Description: Installer components selection mode:
+ Most components you will need will be automatically selected. However you
+ may wish to have a finer control over the list of modules to be installed.
+ .
+ Additional components all have low priority and are probably not necessary,
+ but may be interesting to some users.
+ .
+ Choosing full control will offer you an opportunity not to load some
+ base installer components. This is rarely necessary, and can make the
+ installation impossible, because of missing functionnality.
+
 Template: anna/choose_modules
 Type: multiselect
 Choices: ${CHOICES}
 _Description: Installer components to load:
- Most things you will need will be loaded automatically. The listed
+ Most things you will need have been automatically selected. The other
  installer components all have low priority and are probably not necessary,
  but may be interesting to some users.
  .

--BXVAT5kNtrzKuDFl--

---------------------------------------
Received: (at 219888-done) by bugs.debian.org; 27 Jun 2005 04:33:43 +0000
>From joey@kitenet.net Sun Jun 26 21:33:43 2005
Return-path: <joey@kitenet.net>
Received: from kitenet.net [64.62.161.42] (postfix)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DmlJX-0001a2-00; Sun, 26 Jun 2005 21:33:43 -0700
Received: from dragon.kitenet.net (dpc6682244174.direcpc.com [66.82.244.174])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
	by kitenet.net (Postfix) with ESMTP id 152A417EC6
	for <219888-done@bugs.debian.org>; Mon, 27 Jun 2005 04:33:40 +0000 (GMT)
Received: by dragon.kitenet.net (Postfix, from userid 1000)
	id 4CC296E0C2; Mon, 27 Jun 2005 00:33:46 -0400 (EDT)
Date: Mon, 27 Jun 2005 00:33:46 -0400
From: Joey Hess <joeyh@debian.org>
To: 219888-done@bugs.debian.org
Subject: Re: Fixed in NMU of anna 1.11
Message-ID: <20050627043346.GA9185@kitenet.net>
References: <[🔎] E1Dml3P-0006PC-00@newraff.debian.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi"
Content-Disposition: inline
In-Reply-To: <[🔎] E1Dml3P-0006PC-00@newraff.debian.org>
User-Agent: Mutt/1.5.9i
Delivered-To: 219888-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 


--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

NAN

Joey Hess wrote:
> tag 219888 + fixed
>=20
> quit
>=20
> This message was generated automatically in response to a
> non-maintainer upload.  The .changes file follows.
>=20
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
> Format: 1.7
> Date: Wed, 15 Jun 2005 16:22:59 -0400
> Source: anna
> Binary: anna
> Architecture: source i386
> Version: 1.11
> Distribution: unstable
> Urgency: low
> Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
> Changed-By: Joey Hess <joeyh@debian.org>
> Description:=20
>  anna       - anna's not nearly apt, but for the Debian installer, it wil=
l do (udeb)
> Closes: 219888
> Changes:=20
>  anna (1.11) unstable; urgency=3Dlow
>  .
>    [ Joey Hess ]
>    * Build with -fomit-frame-pointer, saves a few bytes.
>    * Add a patch, loosely based on a long-neglected patch from Jeremie Ko=
enig,
>      to include udebs that will be installed by default in the selection =
list
>      and allow the user to de-select them, providing more control in lowm=
em
>      installs and other situations. Closes: #219888
>  .
>    * Updated translations:
>      - Arabic (ar.po) by Ossama M. Khayat
>      - Bulgarian (bg.po) by Ognyan Kulev
>      - Catalan (ca.po) by Guillem Jover
>      - Czech (cs.po) by Miroslav Kure
>      - Danish (da.po) by Claus Hindsgaul
>      - German (de.po) by Dennis Stampfer
>      - Greek, Modern (1453-) (el.po) by Greek Translation Team
>      - Spanish (es.po) by Javier Fern=C3=A1ndez-Sanguino Pe=C3=B1a
>      - Basque (eu.po) by Piarres Beobide
>      - French (fr.po) by Christian Perrier
>      - Italian (it.po) by Giuseppe Sacco
>      - Japanese (ja.po) by Kenshi Muto
>      - Portuguese (pt.po) by Miguel Figueiredo
>      - Portuguese (Brazil) (pt_BR.po) by Andr=C3=A9 Lu=C3=ADs Lopes
>      - Romanian (ro.po) by Eddy Petri=C5=9For
>      - Russian (ru.po) by Yuri Kozlov
>      - Slovak (sk.po) by Peter Mann
>      - Albanian (sq.po) by Elian Myftiu
>      - Turkish (tr.po) by Recai Okta=C5=9F
>      - Ukrainian (uk.po) by Eugeniy Meshcheryakov
>      - Simplified Chinese (zh_CN.po) by Carlos Z.F. Liu
> Files:=20
>  94f623f068c844f85867188b21b73300 678 debian-installer standard anna_1.11=
=2Edsc
>  2707e6345fe874c71d08ba82728d6c96 53777 debian-installer standard anna_1.=
11.tar.gz
>  a30baa2198d0c6ba2491ddc2c1ce9929 22860 debian-installer standard anna_1.=
11_i386.udeb
> package-type: udeb
>=20
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>=20
> iD8DBQFCv3ih2tp5zXiKP0wRAhtnAKC0ElL6w6/s4akW0wJXlrEx2yBfQQCfeor5
> ueVt25kDCL4MmE59AfAxvMQ=3D
> =3DAD+s
> -----END PGP SIGNATURE-----
>=20

--=20
see shy jo

--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

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

iD8DBQFCv4Gqd8HHehbQuO8RAoOWAKDKRBp62/ssx+8qOocdDzDucC641ACg29iz
VlbdFES08Dgw63obTtYNBJM=
=5qsJ
-----END PGP SIGNATURE-----

--6c2NcOVqGQ03X4Wi--



Reply to: