Package: btrfs-tools
Version: 0.19+20130315-3
Severity: normal

update-initramfs: Generating /boot/initrd.img-3.10-1-amd64
ln: failed to create symbolic link 
‘/var/tmp/mkinitramfs_JCMl3d//sbin/fsck.btrfs’: File exists
E: /etc/initramfs-tools/hooks/fsck failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.10-1-amd64 with 1.

The inclusion of fsck.btrfs conflicts with the current work on generic
fsck in the initramfs (#652459).

I don't see this actually being used, so I would suggest simply
dropping it for now.  Once we have generic fsck support, this
will be included automatically by the fsck hook (attached).


Regards,
Roger

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (550, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.10-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages btrfs-tools depends on:
ii  e2fslibs    1.42.8-1
ii  libblkid1   2.20.1-5.5
ii  libc6       2.17-7
ii  libcomerr2  1.42.8-1
ii  liblzo2-2   2.06-1
ii  libuuid1    2.20.1-5.5
ii  zlib1g      1:1.2.8.dfsg-1

btrfs-tools recommends no packages.

btrfs-tools suggests no packages.

-- no debconf information
#!/bin/sh

PREREQ=""

prereqs()
{
	echo "$PREREQ"
}

fstab_files()
{
    echo /etc/fstab
    if [ -d /etc/fstab.d ]; then
        ls -1 /etc/fstab.d | grep '\.fstab$' | sed -e 's;^;/etc/fstab.d/;'
    fi
}

# Find a specific fstab entry
# $1=mountpoint
# $2=fstype (optional)
_read_fstab_entry () {
	# Not found by default.
	echo "MNT_FSNAME="
	echo "MNT_DIR="
	echo "MNT_TYPE="

	fstab_files | while read file; do
		if [ -f "$file" ]; then
			while read MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK; do
				case "$MNT_FSNAME" in
				  ""|\#*)
					continue;
					;;
				esac
				if [ "$MNT_DIR" = "$1" ]; then
					if [ -n "$2" ]; then
						[ "$MNT_TYPE" = "$2" ] || continue;
					fi
	                                echo "MNT_FSNAME=$MNT_FSNAME"
	                                echo "MNT_DIR=$MNT_DIR"
	                                echo "MNT_TYPE=$MNT_TYPE"
					break 2
				fi
				MNT_DIR=""
			done < "$file"
		fi
	done
}

# Find a specific fstab entry and print its type (if found)
# $1=mountpoint
get_fstype () {
	eval "$(_read_fstab_entry "$1")"

	# Not found by default.
	if [ "$1" = "$MNT_DIR" ]; then
		echo "$MNT_TYPE"
	fi
}

get_fstypes() {
	get_fstype /
	get_fstype /etc
	get_fstype /usr
}

case $1 in
prereqs)
	prereqs
	exit 0
	;;
esac

if [ ! -x /sbin/fsck ]; then
	exit 0
fi

. /usr/share/initramfs-tools/hook-functions


copy_exec /sbin/fsck
for type in $(get_fstypes | sort | uniq); do
	prog="/sbin/fsck.${type}"
	if [ -h "$prog" ]; then
		link=$(readlink -f "$prog")
		copy_exec "$link"
		ln -s "$link" "${DESTDIR}/$prog"
	else
		copy_exec "$link"
	fi
done

Reply via email to