Jump to content

drush99

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by drush99

  1. Greetings all.

     

    Today I tried updating my Odroid C2 to image 5.22 posted on Oct 22, 2016. And I got the following error during apt-get upgrade:

     

    Setting up linux-u-boot-odroidc2-default (5.22) ...
    /var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: conditional binary operator expected
    /var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: syntax error near `function'
    /var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst: line 5: `[[  == function ]] && setup_write_uboot_platform'

    I peaked at the code in /var/lib/dpkg/info/linux-u-boot-odroidc2-default.postinst contains

    #!/bin/bash
    source /usr/lib/u-boot/platform_install.sh
    [[ $DEVICE == /dev/null ]] && exit 0
    [[ -z $DEVICE ]] && DEVICE="/dev/mmcblk0"
    [[ == function ]] && setup_write_uboot_platform
    write_uboot_platform $DIR $DEVICE
    exit 0

    Which appears broken, so I updated it to:

     

    #!/bin/bash
    source /usr/lib/u-boot/platform_install.sh
    [[ $DEVICE == /dev/null ]] && exit 0
    [[ -z $DEVICE ]] && DEVICE="/dev/mmcblk0"
    [[ $(type -t setup_write_uboot_platform) == function ]] && setup_write_uboot_platform
    write_uboot_platform $DIR $DEVICE
    exit 0

     

    And the upgrade succeeded. Dunno where else to post this information. Hope it helps someone :)

     

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines