Bug#805223: base-installer unable to determine kernel

2015-12-10 Thread Łukasz Stelmach
Dnia 10 grudnia 2015 18:50:00 CET, Martin Michlmayr  
napisał(a):
>* Łukasz Stelmach  [2015-11-16 10:16]:
>> I will try the fix suggested by Martin Michlmayr and see if it works.
>
>Did it work?

Due to personal reasons I haven't had time to verify it yet.
-- 
Łukasz Stelmach z podróży



Bug#805223: base-installer unable to determine kernel

2015-12-10 Thread Martin Michlmayr
* Łukasz Stelmach  [2015-11-16 10:16]:
> I will try the fix suggested by Martin Michlmayr and see if it works.

Did it work?
-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#805223: base-installer unable to determine kernel

2015-11-16 Thread Ben Hutchings
On Mon, 2015-11-16 at 10:16 +0100, Łukasz Stelmach wrote:
> Dnia 15 listopad 2015 o 22:54 Ben Hutchings  napisał(a):
[...]
> > 
> > > I may only suspect that
> > > the code containing $FLAVOUR has been moved from some file without
> > > moving actual assignment (like the one in
> > > debian/bootstrap-base.postinst)
> > [...]
> > 
> > These functions are only ever called by debian/bootstrap-base.postinst.
> > I think the problem is that arch_get_kernel_flavour is failing.
> 
> I have never said they are. I only gave the postinst script as an example
> of a place where FLAVOUR is assigned. Do you know of any other place?

I don't; that's my point.  There is one caller and it sets FLAVOUR.

> > This definitely doesn't seem like a proper fix.
> 
> Then what is in your opinion KERNEL_FLAVOUR for? It can't but ask why
> there are two variables with apparently the same value (or at least
> values from the same set).
[...]

I think it's obsolete, but it used to be used in the i386 kernel
selection to decide whether to install a kernel that supports PAE.

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
   - Albert Einstein

signature.asc
Description: This is a digitally signed message part


Bug#805223: base-installer unable to determine kernel

2015-11-16 Thread Łukasz Stelmach
Dnia 15 listopad 2015 o 22:54 Ben Hutchings  napisał(a):
> On Sun, 2015-11-15 at 22:17 +0100, Łukasz Stelmach wrote:
>> During the installation I get a message that the installer was unable to
>> find appropriate kernel package for the device.
>> 
>> No installable kernel was found in the defined APT sources. [...]
>> 
>> I have traced the the message and it comes from pick_kernel() in
>> /usr/lib//base-installer/library.sh. In /var/log/syslog I find a message
>> 
>> Jan  1 00:52:06 base-installer: info: could not determine kernel flavour
>> 
>> repeated several times and followed by
>> 
>> Jan  1 00:52:06 base-installer: info: Found kernels ''
>> 
>> A very brief investigation suggests that that the problems comes from
>> the references to unassigned $FLAVOUR variable.
> 
> Unassigned, or empty?

It's hard to tell precisely. FLAVOUR is not assigned any value in
library.sh explicitly AND "$FLAVOUR" apparently evaluates to "" at
line 352[1].

>> I may only suspect that
>> the code containing $FLAVOUR has been moved from some file without
>> moving actual assignment (like the one in
>> debian/bootstrap-base.postinst)
> [...]
> 
> These functions are only ever called by debian/bootstrap-base.postinst.
> I think the problem is that arch_get_kernel_flavour is failing.

I have never said they are. I only gave the postinst script as an example
of a place where FLAVOUR is assigned. Do you know of any other place?

> This definitely doesn't seem like a proper fix.

Then what is in your opinion KERNEL_FLAVOUR for? It can't but ask why
there are two variables with apparently the same value (or at least
values from the same set).

I will try the fix suggested by Martin Michlmayr and see if it works.
 
[1] https://sources.debian.net/src/base-installer/1.154/library.sh/#L352 

-- 
Miłego dnia,
Łukasz Stelmach



Bug#805223: base-installer unable to determine kernel

2015-11-15 Thread Łukasz Stelmach
Package: base-installer
Version: 1.154
Tags: patch

Dear Maintainer,

I am trying to install Debian jessie on an arm device (Zyxel NSA325).
The device isn't yet officially supported by d-i and I had to make some
changes to d-i to run it on the device. I am willing to share my work as
soon as possible.

During the installation I get a message that the installer was unable to
find appropriate kernel package for the device.

No installable kernel was found in the defined APT sources. [...]

I have traced the the message and it comes from pick_kernel() in
/usr/lib//base-installer/library.sh. In /var/log/syslog I find a message

Jan  1 00:52:06 base-installer: info: could not determine kernel flavour

repeated several times and followed by

Jan  1 00:52:06 base-installer: info: Found kernels ''

A very brief investigation suggests that that the problems comes from
the references to unassigned $FLAVOUR variable. I may only suspect that
the code containing $FLAVOUR has been moved from some file without
moving actual assignment (like the one in
debian/bootstrap-base.postinst)

The attached patch renames occurrences of $FLAVOUR in library.sh to
$KERNEL_FLAVOUR. A quick in vitro test in a d-i shell

--8<---cut here---start->8---
. /usr/lib/base-installer/kernel.sh
. /usr/lib/base-installer/library.sh;
kernel_update_list
cat /tmp/available_kernels.txt
--8<---cut here---end--->8---

returns expected results:

--8<---cut here---start->8---
linux-image-kirkwood
linux-image-3.16.0-4-kirkwood
--8<---cut here---end--->8---

and the installer presents a nice list of available containing the two
above and a "none" option.

-- 
Było mi bardzo miło.  --- Rurku. --- ...
>Łukasz<--- To dobrze, że mnie słuchasz.

... Droga wśród jabłoni prowadzi w nieznane...
From 6885bbfe670ab48bdbc65a127331a7f380b71a59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= 
Date: Sun, 15 Nov 2015 21:54:08 +0100
Subject: [PATCH] Rename $FLAVOUR to $KERNEL_FLAVOUR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Łukasz Stelmach 
---
 library.sh | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/library.sh b/library.sh
index d73d880..cfb0f6f 100644
--- a/library.sh
+++ b/library.sh
@@ -349,12 +349,12 @@ kernel_update_list () {
 	cut -d" " -f1 | grep -v "linux-image-2.6" | uniq > "$KERNEL_LIST.unfiltered"
 	kernels=`sort -r "$KERNEL_LIST.unfiltered" | tr '\n' ' ' | sed -e 's/ $//'`
 	for candidate in $kernels; do
-		if [ -n "$FLAVOUR" ]; then
-			if arch_check_usable_kernel "$candidate" "$FLAVOUR"; then
+		if [ -n "$KERNEL_FLAVOUR" ]; then
+			if arch_check_usable_kernel "$candidate" "$KERNEL_FLAVOUR"; then
 echo "$candidate"
-info "kernel $candidate usable on $FLAVOUR"
+info "kernel $candidate usable on $KERNEL_FLAVOUR"
 			else
-info "kernel $candidate not usable on $FLAVOUR"
+info "kernel $candidate not usable on $KERNEL_FLAVOUR"
 			fi
 		else
 			info "could not determine kernel flavour"
@@ -404,8 +404,8 @@ pick_kernel () {
 		# Unset seen flag in case we had an incorrect preseeded value.
 		db_fset base-installer/kernel/image seen false || true
 
-		if [ -n "$FLAVOUR" ]; then
-			arch_kernel="$(arch_get_kernel "$FLAVOUR")"
+		if [ -n "$KERNEL_FLAVOUR" ]; then
+			arch_kernel="$(arch_get_kernel "$KERNEL_FLAVOUR")"
 
 			# Hack to support selection of meta packages with a postfix
 			# added to the normal name (for updated kernels in stable).
-- 
2.4.6



signature.asc
Description: PGP signature


Bug#805223: base-installer unable to determine kernel

2015-11-15 Thread Martin Michlmayr
* Łukasz Stelmach  [2015-11-15 22:17]:
> I am trying to install Debian jessie on an arm device (Zyxel NSA325).
> The device isn't yet officially supported by d-i and I had to make some
> changes to d-i to run it on the device.

> repeated several times and followed by
> Jan  1 00:52:06 base-installer: info: Found kernels ''

I think the correct solution is to add your device to
libdebian-installer - see src/system/subarch-armel-linux.c.

-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#805223: base-installer unable to determine kernel

2015-11-15 Thread Ben Hutchings
Control: tag -1 - patch
Control: tag -1 moreinfo

On Sun, 2015-11-15 at 22:17 +0100, Łukasz Stelmach wrote:
> Package: base-installer
> Version: 1.154
> Tags: patch
> 
> Dear Maintainer,
> 
> I am trying to install Debian jessie on an arm device (Zyxel NSA325).
> The device isn't yet officially supported by d-i and I had to make some
> changes to d-i to run it on the device. I am willing to share my work as
> soon as possible.
> 
> During the installation I get a message that the installer was unable to
> find appropriate kernel package for the device.
> 
> No installable kernel was found in the defined APT sources. [...]
> 
> I have traced the the message and it comes from pick_kernel() in
> /usr/lib//base-installer/library.sh. In /var/log/syslog I find a message
> 
> Jan  1 00:52:06 base-installer: info: could not determine kernel flavour
> 
> repeated several times and followed by
> 
> Jan  1 00:52:06 base-installer: info: Found kernels ''
> 
> A very brief investigation suggests that that the problems comes from
> the references to unassigned $FLAVOUR variable.

Unassigned, or empty?

> I may only suspect that
> the code containing $FLAVOUR has been moved from some file without
> moving actual assignment (like the one in
> debian/bootstrap-base.postinst)
[...]

These functions are only ever called by debian/bootstrap-base.postinst.
I think the problem is that arch_get_kernel_flavour is failing.

This definitely doesn't seem like a proper fix.

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
   - Albert Einstein


signature.asc
Description: This is a digitally signed message part


Bug#805223: base-installer unable to determine kernel

2015-11-15 Thread Ben Hutchings
Control: tag -1 - patch
Control: tag -1 moreinfo

On Sun, 2015-11-15 at 22:17 +0100, Łukasz Stelmach wrote:
> Package: base-installer
> Version: 1.154
> Tags: patch
> 
> Dear Maintainer,
> 
> I am trying to install Debian jessie on an arm device (Zyxel NSA325).
> The device isn't yet officially supported by d-i and I had to make some
> changes to d-i to run it on the device. I am willing to share my work as
> soon as possible.
> 
> During the installation I get a message that the installer was unable to
> find appropriate kernel package for the device.
> 
> No installable kernel was found in the defined APT sources. [...]
> 
> I have traced the the message and it comes from pick_kernel() in
> /usr/lib//base-installer/library.sh. In /var/log/syslog I find a message
> 
> Jan  1 00:52:06 base-installer: info: could not determine kernel flavour
> 
> repeated several times and followed by
> 
> Jan  1 00:52:06 base-installer: info: Found kernels ''
> 
> A very brief investigation suggests that that the problems comes from
> the references to unassigned $FLAVOUR variable.

Unassigned, or empty?

> I may only suspect that
> the code containing $FLAVOUR has been moved from some file without
> moving actual assignment (like the one in
> debian/bootstrap-base.postinst)
[...]

These functions are only ever called by debian/bootstrap-base.postinst.
I think the problem is that arch_get_kernel_flavour is failing.

This definitely doesn't seem like a proper fix.

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
   - Albert Einstein


signature.asc
Description: This is a digitally signed message part