[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-09-07 Thread Mathew Hodson
** No longer affects: linux (Ubuntu) ** Bug watch added: Debian Bug tracker #787827 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787827 ** Also affects: apt (Debian) via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787827 Importance: Unknown Status: Unknown -- You

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-05-30 Thread Jarno Suni
Upstream commit: https://anonscm.debian.org/cgit/apt/apt.git/commit/debian/apt.auto- removal.sh?id=3196dae8e92407b3aa8e12779a8ed7db998ebdc4 -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu.

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-05-30 Thread Jarno Suni
Seems to be fixed in Xenial (apt 1.2.10ubuntu1); at least two kernels are always kept, if available. ** Changed in: apt (Ubuntu) Status: Triaged => Fix Released ** Changed in: hundredpapercuts Status: Triaged => Fix Released -- You received this bug notification because you are a

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-03-11 Thread Cavsfan
This is working as it should work now. Is there any timeline on when it will be put out to the masses? I install a kernel and before rebooting I purge the 3rd kernel back like I've always done. If you autoremove the kernel it leaves the residual config files, which have to purged with a command

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-02-22 Thread Cavsfan
Today when updating via cli 4.4.0-2-generic kernel was waiting to be autoremoved. So after getting the updates I autoremoved that kernel. This left me with 2 kernels 4.4.0-4-generic and 4.4.0-6-generic which is precisely how it is supposed to work. I think this is working great now. -- You

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-02-18 Thread Cavsfan
I let 3 kernels remain on my Xubuntu 16.04 pc: 4.3.0-7-generic, 4.4.0-2-generic and 4.4.0-4-generic. Just to see what would happen. Today when 4.4.0-6-generic kernel came through in regular updates and when it installed and I rebooted. I again checked for updates via cli and it wanted to

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-02-02 Thread Cavsfan
The installation of the 4.4.0-2-generic in Xenial 16.04 went well, It left 3 kernels in 01autoremove-kernels so I manually purged the 3rd oldest one. Now there are 2 there. I updated my /etc/kernel/postinst.d /apt-auto-removal with version 5 above. -- You received this bug notification because

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-02-02 Thread Jarno Suni
Simplify the script by using grep instead of awk in one check. During removal, the kernel package is apparently in half-installed state (H), so check for that (although [^c]} should work, too). ** Attachment added: "/etc/kernel/postinst.d/apt-auto-removal (version 5 from Jarno Suni)"

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-22 Thread Jarno Suni
As for #46, you could have ran `sudo /etc/kernel/postinst.d/apt-auto- removal ; sudo apt-get autoremove --purge` after reboot. I don't know, if you can configure unattended upgrade to do purging, as well. As for #47, it is the matter of Bug #1458204 -- You received this bug notification because

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-22 Thread Cavsfan
Got the 4.3.0-7-generic kernel on Xubuntu 16.04 in today's updates and the 01autoremove-kernels file contains the last 3 kernels, which I'm fine with. I'll purge the 3rd oldest one. I prefer purging them manually instead of using autoremove because autoremove leaves the "Residual Config"

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-22 Thread Cavsfan
Manually purged the 4.3.0-5-generic kernel and that left the 4.3.0-6-generic and 4.3.0-7-generic kernels in the 01autoremove-kernels file. Which is great. My only question is why does it require a reboot when the 3rd oldest kernel is deleted? I don't think this should be happening either. --

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-21 Thread Jarno Suni
In contrary to what I told in #40, there is no fear that autoremove would remove the latest kernel that some meta package depends on. (Though the possibility is there, if there is no manually installed meta package that recursively depends on the kernel.) So "xargs apt-mark showauto" is not

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-20 Thread Cavsfan
Jarno, I did notice that those commands were in the original script after I posted that. I got the 4.3.0-6-generic installed in Xubuntu 16.04 just a while ago and your script worked flawlessly. I had 3 kernels: 4.3.0-2-generic, 4.3.0-5-generic and 4.3.0-6-generic after installation and the

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-20 Thread Cavsfan
Then I performed a sudo apt autoremove and the 4.3.0-2-generic was removed. The 01autoremove-kernels did not change and still contains the last 2 kernels, which is good. The output is attached. It gave an erroneous error about the kernel header for 4.3.0-2-generic not being found but since it

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Jarno Suni
This seems to work for me. I changed some things based on feedback from Robert Euhus (and a little bit more). I don't see a problem in updating the kernel list in case a linux-image-extra package is being removed; the list does not change then, but this updates also, when a linux-image package is

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Jarno Suni
** Attachment removed: "Fixed again /etc/kernel/postinst.d/apt-auto-removal script" https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1440608/+attachment/4551164/+files/apt-auto-removal -- You received this bug notification because you are a member of Kernel Packages, which is subscribed

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Jarno Suni
Cavsfan, the comment was copied from the original script; it may not be accurate with this one. I think the normal case after installing a kernel with this script is three kernels in the never-auto-remove list. There may probably be four kernels installed then (before autoremoving). If that is too

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Jarno Suni
Oh, now I remember why I added "xargs apt-mark showauto" in the pipe in the first script attached to comment #22: if you manually add some newer kernels for e.g. testing something, you may not want system to automatically remove the latest kernels available from the usual Ubuntu repository, and

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Cavsfan
Thanks for the attention to this issue that effects every debian version including Mint back to Trusty 14.04. I copied your version 4 script into my /etc/kernel/postinst.d/apt-auto-removal. I will post the entire output resulting from the next kernel that gets added. I have a 64 bit version of

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-19 Thread Steve Langasek
** Changed in: linux (Ubuntu) Status: Triaged => Invalid -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1440608 Title: /etc/kernel/postinst.d/apt-auto-removal wants to remove all

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-18 Thread Robert Euhus
Jarno Suni, thanks for the reply. First I would like to stress, that I still don't think that running all the KERNELS postINSTALL hooks while REMOVING the -extra package is the right thing todo. The only thing I can see that is really needed is the recreation of the initrd on installation and

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-18 Thread Robert Euhus
Hi all, sorry, the apt-auto-removal script attached above contained some debug echo statements. Which were harmless, but unnessecary. Testing and thinking a bit more about the problem I have come to the conclusion, that upon removal of a linux-image-extra package the only right thing to do is

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-18 Thread Alberto Salvia Novella
** Changed in: linux (Ubuntu) Status: Confirmed => Triaged ** Changed in: apt (Ubuntu) Status: Confirmed => Triaged ** Changed in: hundredpapercuts Status: Confirmed => Triaged -- You received this bug notification because you are a member of Kernel Packages, which is

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-18 Thread Jarno Suni
Robert Euhus, as for #36, -Strange, no such broken pipe error due to missing backslash-escape occured, when I tried the script I uploaded. - You are correct, the awk regex for creating the "list" needs one more space, because the abbreviated status of a package seems to contain three characters,

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-16 Thread Jarno Suni
Robert Euhus, even if the kernel-to-be-removed is added to the never- autoremove list by /etc/kernel/postinst.d/apt-auto-removal when removing the linux-image-extra package by apt-get autoremove, the respective linux-image package will be removed successfully thereafter. But it does not work, if

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-16 Thread Jarno Suni
The attached script now tries to detect, whether it is called in conjunction with kernel installation or in conjunction with kernel removal. It uses dpkg-query for that. Maybe it could be done more easilly by giving the information to the script as a command-line argument by apt-get? The script

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-15 Thread Robert Euhus
** Also affects: linux-meta (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-meta in Ubuntu. https://bugs.launchpad.net/bugs/1440608 Title:

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-15 Thread Brad Figg
** Package changed: linux-meta (Ubuntu) => linux (Ubuntu) ** Changed in: linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1440608 Title:

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-15 Thread Robert Euhus
The problem is that on purge/removal the linux-image-extra package runs all the kernel post-*install*-hooks in /etc/kernel/postinst.d (as its postrm hook), including the /etc/kernel/postinst.d/apt-auto-removal hook. The 'to-be-removed'-version of the kernel is given as an argument and thereby

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-15 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1440608

[Kernel-packages] [Bug 1440608] Re: /etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels except the latest one

2016-01-15 Thread Alberto Salvia Novella
** Changed in: linux (Ubuntu) Importance: Undecided => High ** Also affects: hundredpapercuts Importance: Undecided Status: New ** Changed in: hundredpapercuts Status: New => Confirmed ** Changed in: hundredpapercuts Importance: Undecided => High -- You received this