Call to dpkg-query does not work in UCK

Bug #1435019 reported by PJSingh5000
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Customization Kit
New
Undecided
Unassigned

Bug Description

UCK Version: 2.4.7-0ubuntu1 on Ubuntu 14.10 x64

On line number 512 in /usr/lib/uck/remaster-live-cd.sh, the line,

  SQUASHFS_VERSION=`dpkg-query -p squashfs-tools | grep Version | cut -d ':' -f3 | cut -d '-' -f1`

returns the following error

  dpkg-query: package 'squashfs-tools' is not available

To correct this, "dpkg-query -p squashfs-tools" should be replaced with "dpkg -s squashfs-tools" as shown...

  ############################################################################
  #if mksquashfs version => 4.1 and guest's kernel => 2.6.30 we can enable xz compression
  # # Fix for Bug #1435019 (https://bugs.launchpad.net/uck/+bug/1435019)
  # SQUASHFS_VERSION=`dpkg-query -p squashfs-tools | grep Version | cut -d ':' -f3 | cut -d '-' -f1`
  SQUASHFS_VERSION=`dpkg -s squashfs-tools | grep Version | cut -d ':' -f3 | cut -d '-' -f1`
  GUEST_KERNEL_VERSION=`ls /boot/config-* | sed 's/.*config-//' | cut -d '-' -f1 | sort -r | head -n1`
  echo "The squashfs version is....... $SQUASHFS_VERSION."
  echo "The guest kernel version is... $GUEST_KERNEL_VERSION."
  if [ `echo -e "${SQUASHFS_VERSION}\n4.2" | sort | head -n1` = "4.2" ]; then
   if [ `echo -e "${GUEST_KERNEL_VERSION}\n2.6.30" | sort | head -n1` = "2.6.30" ]; then
    echo "Squashfs>=4.1, guest kernel>=2.6.30: Enabling XZ compression for squashfs..."
    EXTRA_OPTS="${EXTRA_OPTS} -comp xz"
   else
    echo "Warning: could not enable XZ compression for squashfs."
   fi
  fi
  ############################################################################

description: updated
description: updated
description: updated
Revision history for this message
jayshomebrew (jayshomebrew) wrote :

This effects me too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.