[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#838471: marked as done (apt: kernel apt-auto-removal does not escape + chars)



Your message dated Wed, 21 Sep 2016 12:32:51 +0200
with message-id <20160921122959.GA3955@debian.org>
and subject line Re: Bug#838471: apt: kernel apt-auto-removal does not escape + chars
has caused the Debian Bug report #838471,
regarding apt: kernel apt-auto-removal does not escape + chars
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
838471: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838471
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt
Version: 1.0.9.8.3
Severity: normal
Tags: patch

Dear Maintainer,

   * What led up to the situation?

Installing a custom kernel package including a + char in the pkg name (f.e. linux-image-4.4.17+48-ph)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

apt-get autoremove

   * What was the outcome of this action?

It tries to remove those packages even they're excluded via APT::NeverAutoRemove.

See:
# grep linux-image-4 /etc/apt/apt.conf.d/ -r  
/etc/apt/apt.conf.d/01autoremove-kernels:   "^linux-image-4\.4\.17+48-ph$";
/etc/apt/apt.conf.d/01autoremove-kernels:   "^linux-image-4\.4\.21+56-ph$";

   * What outcome did you expect instead?

It should skip autoremoving those packages.

The problem can be fixed by the following patch:
--- a/etc/kernel/postinst.d/apt-auto-removal     2016-03-12 14:32:33.000000000 +0100
+++ b/etc/kernel/postinst.d/apt-auto-removal    2016-09-21 12:17:50.732936977 +0200
@@ -66,7 +66,7 @@ fi
 kernels="$(echo "$latest_version
 $installed_version
 $running_version
-$previous_version" | sort -u | sed -e 's#\.#\\.#g' )"
+$previous_version" | sort -u | sed -e 's#\.#\\.#g' -e 's#\+#\\+#g' )"
 
 generateconfig() {
        cat <<EOF



-- Package-specific info:

-- (no /etc/apt/preferences present) --

-- System Information:
Debian Release: 8.5
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.17+48-ph (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  debian-archive-keyring  2014.3
ii  gnupg                   1.4.18-7+deb8u3
ii  libapt-pkg4.12          1.0.9.8.3
ii  libc6                   2.19-18+deb8u5
ii  libgcc1                 1:4.9.2-10
ii  libstdc++6              4.9.2-10

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  aptitude    0.6.11-1+b1
ii  dpkg-dev    1.17.27
ii  python-apt  0.9.3.12

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1.3~pre2

On Wed, Sep 21, 2016 at 12:18:46PM +0200, Stefan Priebe wrote:
> Package: apt
> Version: 1.0.9.8.3
> Severity: normal
> Tags: patch
> 
> Dear Maintainer,
> 
>    * What led up to the situation?
> 
> Installing a custom kernel package including a + char in the pkg name (f.e. linux-image-4.4.17+48-ph)

This bug was fixed two months ago in 1.3~pre2. It will also be fixed
in 1.2.15, and I think we'll also cherry-pick it into the jessie
branch (obviously: no promises, though).

For further details, see Bug #830159

-- 
Debian Developer - deb.li/jak | jak-linux.org - free software dev

When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to (`inline'). Thank you.
 

--- End Message ---

Reply to: