Bug#770394: initramfs-tools: Sorting rc versions
Package: initramfs-tools
Version: 0.118
Severity: wishlist
Dear Maintainer,
* What led up to the situation?
Running update-initramfs -u did not choose the latest installed kernel
version.
dpkg --compare-versions doesn't play well with current kernel version
scheme
* What exactly did you do (or not do) that was effective (or
ineffective)?
Run update-initramfs -u
* What was the outcome of this action?
update-initramfs chose 3.16-rc5-amd64
* What outcome did you expect instead?
update-initramfs would chosen 3.16-3-amd64 version
I'm attaching a possible patch. Maybe changing version scheme to -0-rc
would be more dpkg compatible behaviour, so this patch is not needed.
I don't think that teaching dpkg --compare-version about this issue is a
better solution. (I think dpkg maintainers would complaint about)
Thank you
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 16M Nov 20 23:23 /boot/initrd.img-3.16-2-amd64
-rw-r--r-- 1 root root 16M Nov 20 23:22 /boot/initrd.img-3.16-3-amd64
-rw-r--r-- 1 root root 15M Nov 20 23:23 /boot/initrd.img-3.16-rc5-amd64
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.16-3-amd64 root=/dev/mapper/fideo--vg-root ro
quiet i8042.notimeout i8042.nomux
-- resume
RESUME=/dev/mapper/fideo--vg-swap_1
-- /proc/filesystems
ext3
ext2
ext4
fuseblk
vfat
-- lsmod
Module Size Used by
ctr 12927 2
ccm 17577 2
bnep 17431 2
binfmt_misc 16949 1
nfsd 263053 2
auth_rpcgss 51240 1 nfsd
oid_registry 12419 1 auth_rpcgss
nfs_acl 12511 1 nfsd
nfs 188053 0
lockd 83417 2 nfs,nfsd
fscache 45542 1 nfs
sunrpc 237445 6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
nls_utf8 12456 1
nls_cp437 16553 1
vfat 17135 1
fat 61986 1 vfat
x86_pkg_temp_thermal 12951 0
intel_powerclamp 17159 0
intel_rapl 17356 0
ecb 12737 1
btusb 29721 0
uvcvideo 79005 0
coretemp 12820 0
kvm_intel 139077 0
videobuf2_vmalloc 12816 1 uvcvideo
bluetooth 374429 21 bnep,btusb
kvm 388597 1 kvm_intel
joydev 17063 0
arc4 12536 2
videobuf2_memops 12519 1 videobuf2_vmalloc
videobuf2_core 47787 1 uvcvideo
v4l2_common 12995 1 videobuf2_core
videodev 126451 3 uvcvideo,v4l2_common,videobuf2_core
media 18305 2 uvcvideo,videodev
crc32_pclmul 12915 0
6lowpan_iphc 16588 1 bluetooth
iwldvm 135156 0
mac80211 474202 1 iwldvm
iwlwifi 92451 1 iwldvm
cfg80211 405538 3 iwlwifi,mac80211,iwldvm
rfkill 18867 4 cfg80211,bluetooth
ghash_clmulni_intel 12978 0
iTCO_wdt 12831 0
iTCO_vendor_support 12649 1 iTCO_wdt
psmouse 98616 0
evdev 17445 16
tpm_tis 17182 0
serio_raw 12849 0
i915 837133 3
snd_hda_codec_hdmi 45118 1
snd_hda_codec_realtek 63031 1
tpm 31511 1 tpm_tis
efi_pstore 12805 1
cryptd 14516 1 ghash_clmulni_intel
efivars 17257 1 efi_pstore
pcspkr 12595 0
snd_hda_codec_generic 63107 1 snd_hda_codec_realtek
fujitsu_laptop 17705 0
snd_hda_intel 26327 6
i2c_i801 16965 0
snd_hda_controller 26727 1 snd_hda_intel
snd_hda_codec 104463 5
snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
mei_me 17941 0
snd_hwdep 13148 1 snd_hda_codec
snd_pcm 88662 4
snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
video 18030 1 i915
drm_kms_helper 49210 1 i915
drm 249955 5 i915,drm_kms_helper
i2c_algo_bit 12751 1 i915
snd_timer 26614 1 snd_pcm
button 12944 1 i915
snd 65244 20
snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore 13026 2 snd,snd_hda_codec
i2c_core 46012 7
drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,v4l2_common,videodev
lpc_ich 20768 0
battery 13356 0
shpchp 31121 0
processor 28221 0
mei 74977 1 mei_me
ac 12715 0
mfd_core 12601 1 lpc_ich
fuse 83350 3
autofs4 35529 2
ext4 469572 5
crc16 12343 2 ext4,bluetooth
mbcache 17171 1 ext4
jbd2 82413 1 ext4
dm_mod 89373 23
sg 29973 0
sd_mod 44356 4
crc_t10dif 12431 1 sd_mod
sr_mod 21903 0
crct10dif_generic 12581 0
cdrom 47424 1 sr_mod
ehci_pci 12512 0
ehci_hcd 69837 1 ehci_pci
crct10dif_pclmul 13387 1
crct10dif_common 12356 3 crct10dif_pclmul,crct10dif_generic,crc_t10dif
crc32c_intel 21809 0
ahci 29195 3
libahci 27158 1 ahci
libata 177457 2 ahci,libahci
scsi_mod 191405 4 sg,libata,sd_mod,sr_mod
r8169 68262 0
fan 12681 0
mii 12675 1 r8169
usbcore 195340 4 btusb,uvcvideo,ehci_hcd,ehci_pci
thermal 17559 0
usb_common 12440 1 usbcore
thermal_sys 27642 6
fan,video,intel_powerclamp,thermal,processor,x86_pkg_temp_thermal
-- /etc/initramfs-tools/modules
-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
busybox
dmsetup
fsck
fuse
keymap
klibc
kmod
lvm2
ntfs_3g
resume
thermal
udev
zz-busybox
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initramfs-tools depends on:
ii busybox 1:1.22.0-9
ii cpio 2.11+dfsg-2
ii klibc-utils 2.0.4-2
ii kmod 18-3
ii udev 215-5+b1
ii util-linux 2.25.2-2
Versions of packages initramfs-tools recommends:
ii busybox 1:1.22.0-9
Versions of packages initramfs-tools suggests:
ii bash-completion 1:2.1-4
-- no debconf information
--- update-initramfs.orig 2014-11-20 23:28:12.530664894 +0100
+++ update-initramfs 2014-11-20 23:27:14.234158225 +0100
@@ -232,6 +232,9 @@
for gsv_x in "${STATEDIR}"/*; do
gsv_x="$(basename "${gsv_x}")"
+ if echo "${gsv_x}" | grep -q -- "-rc" ; then
+ gsv_x=$(echo $gsv_x | sed 's,-rc,-0-rc,')
+ fi
if [ "${gsv_x}" = '*' ]; then
return 0
fi
@@ -249,6 +252,7 @@
fi
version_list="${worklist}"
done
+ version_list="$(echo "$version_list" | sed 's,-0-rc,-rc,g')"
verbose "Available versions: ${version_list}"
}
Reply to: