Debian Bug report logs - #653305
partman-auto: Please provide hook when disk is too small for the expert recipe

version graph

Package: partman-auto; Maintainer for partman-auto is Debian Install System Team <debian-boot@lists.debian.org>; Source for partman-auto is src:partman-auto.

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Mon, 26 Dec 2011 17:33:02 UTC

Severity: important

Tags: patch

Found in version partman-auto/96

Fixed in version partman-auto/109

Done: Christian Perrier <bubulle@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-edu@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#653305; Package partman-auto. (Mon, 26 Dec 2011 17:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to debian-edu@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 26 Dec 2011 17:33:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: partman-auto: Please provide hook when disk is too small for the expert recipe
Date: Mon, 26 Dec 2011 18:29:34 +0100
Package: partman-auto
Version: 96
Severity: important
Tags: patch
User: debian-edu@lists.debian.org
Usertags: debian-edu

When installing a Debian Edu
main-server+workstation+thin-client-server on a virtual machine with
20 GB virtual disk, the partitioning recipe specified by Debian Edu is
silently ignored and the wrong partitioning setup is used (only one
partition for /).

We would like to be able to detect this in Debian Edu, and ask the
user how to continue, but the partman-auto code lack any hooks to
allow us to do this.

A hook like this might solve it.  Please include in a future version
of partman-auto.  Is this acceptable for Squeeze?

--- a/lib/recipes.sh
+++ b/lib/recipes.sh
@@ -333,6 +333,14 @@ choose_recipe () {
 		else
 			logger -t partman-auto \
 			"Available disk space ($free_size) too small for expert recipe ($(min_size)); skipping"
+			hookdir=/lib/partman/not-enough-space.d
+			if [ -d $hookdir ] ; then
+				for h in $hookdir/* ; do
+					if [ -x $h ] ; then
+						$h $recipe $free_size $min_size
+					fi
+				done
+			fi
 		fi
 	fi
 
-- 
Happy hacking
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#653305; Package partman-auto. (Mon, 26 Dec 2011 17:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 26 Dec 2011 17:57:03 GMT) Full text and rfc822 format available.

Message #10 received at 653305@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 653305@bugs.debian.org
Subject: Re: Bug#653305: partman-auto: Please provide hook when disk is too small for the expert recipe
Date: Mon, 26 Dec 2011 18:53:18 +0100
I discovered a typo in my patch.  $min_size should have been
$(min_size), and this lead me to discover that the min_size() function
would calculate the size every time it is called.  To avoid wasting
that time, I store the value in a variable at least for the duration
of the if block.  Here is an updated patch.

--- a/lib/recipes.sh
+++ b/lib/recipes.sh
@@ -328,11 +328,20 @@ choose_recipe () {
 	if [ ! -z "$RET" ] && [ -e "$RET" ]; then
 		recipe="$RET"
 		decode_recipe $recipe $type
-		if [ $(min_size) -le $free_size ]; then
+		min_size=$(min_size)
+		if [ $min_size -le $free_size ]; then
 			return 0
 		else
 			logger -t partman-auto \
-			"Available disk space ($free_size) too small for expert recipe ($(min_size)); skipping"
+			"Available disk space ($free_size) too small for expert recipe ($min_size); skipping"
+			hookdir=/lib/partman/not-enough-space.d
+			if [ -d $hookdir ] ; then
+				for h in $hookdir/* ; do
+					if [ -x $h ] ; then
+						$h $recipe $free_size $min_size
+					fi
+				done
+			fi
 		fi
 	fi
 
-- 
Happy hacking
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#653305; Package partman-auto. (Sun, 26 Aug 2012 07:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 26 Aug 2012 07:00:03 GMT) Full text and rfc822 format available.

Message #15 received at 653305@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 653305@bugs.debian.org
Subject: Re: Bug#653305: partman-auto: Please provide hook when disk is too small for the expert recipe
Date: Sun, 26 Aug 2012 08:56:41 +0200
tags 653305 + patch
thanks

Hi.  I suspect the patch I proposed is OK, and wonder if there is any
hope of having it included in Wheeze?  I was planning to add it myself,
but never found time to look into it.

-- 
Happy hacking
Petter Reinholdtsen



Reply sent to Christian Perrier <bubulle@debian.org>:
You have taken responsibility. (Fri, 19 Jul 2013 06:51:05 GMT) Full text and rfc822 format available.

Notification sent to Petter Reinholdtsen <pere@hungry.com>:
Bug acknowledged by developer. (Fri, 19 Jul 2013 06:51:05 GMT) Full text and rfc822 format available.

Message #20 received at 653305-close@bugs.debian.org (full text, mbox):

From: Christian Perrier <bubulle@debian.org>
To: 653305-close@bugs.debian.org
Subject: Bug#653305: fixed in partman-auto 109
Date: Fri, 19 Jul 2013 06:48:13 +0000
Source: partman-auto
Source-Version: 109

We believe that the bug you reported is fixed in the latest version of
partman-auto, which is due to be installed in the Debian FTP archive.

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 653305@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christian Perrier <bubulle@debian.org> (supplier of updated partman-auto 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 ftpmaster@ftp-master.debian.org)


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

Format: 1.8
Date: Thu, 18 Jul 2013 20:09:29 +0200
Source: partman-auto
Binary: partman-auto
Architecture: source i386
Version: 109
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Christian Perrier <bubulle@debian.org>
Description: 
 partman-auto - Automatically partition storage devices (partman) (udeb)
Closes: 653305
Changes: 
 partman-auto (109) unstable; urgency=low
 .
   [ Petter Reinholdtsen ]
 .
   * Introduce new hook /lib/partman/not-enough-space.d/ called if
     there is not enough space available to use the provided recipe.
     This make it possible for Debian derivatives to abort the
     installation if it is going to fail before the partitioning take
     place (Closes: #653305).
Checksums-Sha1: 
 280d0ec2edc9cd0b49a346095075d4342be98398 1616 partman-auto_109.dsc
 42a9886276ca9629ec137702ca2c8b571cbf644c 123073 partman-auto_109.tar.gz
 c803a04225f97f0bd8f901f62f58e3db100f7bbf 84858 partman-auto_109_i386.udeb
Checksums-Sha256: 
 7cc687b89f35f53ad532b9519d28f7edb4844b12230a779717d8361aac7b405e 1616 partman-auto_109.dsc
 da0e53e3318b103fa5528793dc458d3829df12d753977f8a1c85237466188ab8 123073 partman-auto_109.tar.gz
 ceeb455cc721ffaf0e88c2d61eb2c597359ee1f751149fdf8a36f1f433c295cd 84858 partman-auto_109_i386.udeb
Files: 
 4e66a8c1caff465aa6a93f07b0722b86 1616 debian-installer standard partman-auto_109.dsc
 6c2a45727802a16d0f475cb487af3463 123073 debian-installer standard partman-auto_109.tar.gz
 c46db4b5a460aacb3edb0ee7541f354e 84858 debian-installer standard partman-auto_109_i386.udeb

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

iQIVAwUBUejeJ4cvcCxNbiWoAQJqNBAAlFmjXN7o0ua5wJw+NnqFYNcpac7O5q/s
4aeX6CC40GKb858PXl+QWoS0ppjfTuECMvmO17GD2LSqbGNfbMcyPltOiuxlynzO
f7s8E5d5kfjQS77THbBEKTPolaSlx5G0acrrxUxQF1BFDpE6fDtDwTuR42aQuswM
zgg8QCJzudJ2swoo39CsmumG1A99QqHNkWwcTLYT6MGvIaeOvqEIuxkVHl2LUn4j
/UFnUHabMng0HjzPBJkIVc5LI4jRJ/khG+J1KCrsRT2WskSC2GiulRMBlFJmzsC4
caoCMkj7uDrw4SQhlqn2pebzfM3rnSivN7cdlaVZuf5ly9l135WHH8xaDj2iyoBT
h++KG/FVwMKswq/KRKME4zGAgbpStli4k0TCaWfIk2t3DMzHzaDcqG2yQA4DP+0R
PaMiUtWzWauKErSX2Iw3O3NBMUgW3gbzZ7K4V4hp3QY14w2BZnRDGK8CDgIBmggf
PxdkQcpssMG1YvnWOMi/KJujU+hXsKEEuoj6cpup3ykcR7OygQOdiml56sugLOAS
xWsu00+GbYW/p21X6NPKLFnneihFBwL5DJ9Kj9NCNqrQh+LUihjp42YJ1HMhIGtH
LNbuSBqI/ZS3OY2gCypbJvrKu87ZT2OQ+Eft6JPMK/t/7AAO6cVN7G3s6lKsOFua
JoDQHTOXr7M=
=kFtK
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 17 Aug 2013 07:26:48 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 22:04:46 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.