Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick - Debian

This is a discussion on Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick - Debian ; (Some replies failed to make the list because they were sent to Bug#-quiet) Otavio Salvador wrote: > Sam Couter writes: > > Otavio Salvador wrote: > >> Please attach the output of: > >> > >> udevinfo -q env -p ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick

  1. Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick

    (Some replies failed to make the list because they were sent to Bug#-quiet)

    Otavio Salvador wrote:
    > Sam Couter writes:
    > > Otavio Salvador wrote:
    > >> Please attach the output of:
    > >>
    > >> udevinfo -q env -p /block/

    > >
    > > Attached.

    >
    > Please, check if using this patch output your device is outputed when
    > calling with partition:
    >
    > ./list-devices partition
    >
    > diff --git a/packages/debian-installer-utils/list-devices
    > b/packages/debian-installer-utils/list-devices index 1d0515c..2f52c46
    > 100755
    > --- a/packages/debian-installer-utils/list-devices
    > +++ b/packages/debian-installer-utils/list-devices
    > @@ -27,6 +27,7 @@ case $TYPE in
    > syspaths="${syspaths:+$syspaths }$x"
    > done
    > TYPE=disk
    > + scan_partition=true
    > ;;
    > *)
    > for x in /sys/block/*; do
    > @@ -50,7 +51,7 @@ for x in $syspaths; do
    > esac
    > # Some USB sticks and CD drives are misdetected as floppy
    > # This allows to scan for those
    > - if ! $match && [ "$TYPE" = maybe-usb-floppy ]; then
    > + if ! $match && ( $scan_partition || [ "$TYPE" = maybe-usb-floppy
    > ] ); then if udevinfo -q env -p "$devpath" 2>/dev/null | \ grep -q
    > '^ID_BUS=usb' && \
    > udevinfo -q env -p "$devpath" 2>/dev/null | \


    This patch seems bogus as ./iso-scan/debian/iso-scan.postinst already has:
    111: DEVS="$(list-devices disk; list-devices partition; list-devices
    maybe-usb-floppy)"

    So it *already should get this case* from explicitly using maybe-usb-floppy.
    What this patch does do, is potentially changing the behavior of the
    rescue-mode postinst.

    Cheers,
    FJP

    P.S. It does look like there is a minor bug in isoscan (which should not
    affect this case though). The first call in line 111 uses quotes, the
    second one in line 166 does not; I think this will make the comparison in
    line 167 always false (if there are multiple DEVS). I've fixed that.

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

    iD8DBQBHMOVVgm/Kwh6ICoQRArDjAJoCUmb8TORLWYGsjSNy2GHrXCnJ/QCfWn5X
    YqasBJzKgOqd/5+WCDskmTc=
    =Mbq8
    -----END PGP SIGNATURE-----


  2. Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick

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

    Frans Pop writes:

    > So it *already should get this case* from explicitly using maybe-usb-floppy.
    > What this patch does do, is potentially changing the behavior of the
    > rescue-mode postinst.


    No. It's completely different:

    #v+
    1 <...>
    2 syspaths=
    3 case $TYPE in
    4 partition)
    5 for x in /sys/block/*/*; do
    6 [ -d "$x" ] || continue
    7 syspaths="${syspaths:+$syspaths }$x"
    8 done
    9 TYPE=disk
    10 scan_partition=true
    11 ;;
    12 *)
    13 for x in /sys/block/*; do
    14 [ -d "$x" ] || continue
    15 syspaths="${syspaths:+$syspaths }$x"
    16 done
    17 ;;
    18 esac
    19 for x in $syspaths; do
    20 <...>
    21 # Some USB sticks and CD drives are misdetected as floppy
    22 # This allows to scan for those
    23 if ! $match && ( $scan_partition || [ "$TYPE" = maybe-usb-floppy ] ); then
    24 if udevinfo -q env -p "$devpath" 2>/dev/null | \
    25 grep -q '^ID_BUS=usb' && \
    26 udevinfo -q env -p "$devpath" 2>/dev/null | \
    27 grep -q '^ID_TYPE=floppy'; then
    28 match=:
    29 fi
    30 fi
    31 <...>
    32 done
    #v-

    At line 9 and 10 it set _how_ it ought to check the syspaths and the
    set of paths is complely different between partition (line 4) and
    normal case (line 12).

    At line 23 I made it also check it for maybe misdetected usb devices,
    in the only case we're using partition argument. So it doesn't looks
    bogus to me.

    - --
    O T A V I O S A L V A D O R
    - ---------------------------------------------
    E-mail: otavio@debian.org UIN: 5906116
    GNU/Linux User: 239058 GPG ID: 49A5F855
    Home Page: http://otavio.ossystems.com.br
    - ---------------------------------------------
    "Microsoft sells you Windows ... Linux gives
    you the whole house."
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Processed by Mailcrypt 3.5.8+

    iD8DBQFHMOjBLqiZQEml+FURAvy+AJ0QF4yjLcRUzID9nl1VAV AzkrAhXgCguJj3
    6hzed0DwphvWXDv/2xOnA7M=
    =gK6m
    -----END PGP SIGNATURE-----



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  3. Bug#440301: iso-scan.postinst fails to find ISO on partitioned USB stick

    On Tuesday 06 November 2007, Otavio Salvador wrote:
    > At line 9 and 10 it set _how_ it ought to check the syspaths and the
    > set of paths is complely different between partition (line 4) and
    > normal case (line 12).


    Yes, I missed the different paths. After thinking the patch through a bit
    more, it seems correct to me.

    It surprises me a bit that the bug still exists as Marco d'Itri expected it
    to disappear after we stopped using devfs compatibility udev rules (which
    is now the case in daily builds).

    Perhaps we should contact Marco about this again. But before we do, we
    should compare the udevinfo output for D-I and for the installed system to
    verify if the problem exists in the installed system too.

    Cheers,
    FJP

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

    iD8DBQBHMPxEgm/Kwh6ICoQRAtVWAKCGvEFRg0RwosgbpQd4guQFalqNYACgqfgt
    rOWkc5YTaP9PPjMz9U7vBpM=
    =DrTI
    -----END PGP SIGNATURE-----


+ Reply to Thread