[Bug 1699698] [NEW] apt removes package when packagename ends with -

Klavs Klavsen kl at vsen.dk
Thu Jun 22 07:44:11 UTC 2017


Public bug reported:

It turns out that if you mess up (like in your system automation setup)
- and ask for installing a package named perl-byacc- (where you wanted
to install perl-byacc-subname) - apt just chooses to remove perl-byacc..
even if perl-byacc is not installed - it returns 0 - meaning everything
seems okay :(

# apt install perl-byacc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-67 linux-headers-4.4.0-67-generic linux-image-4.4.0-64-generic linux-image-4.4.0-67-generic linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-67-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  perl-byacc
0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
Need to get 105 kB of archives.
After this operation, 203 kB of additional disk space will be used.
Get:1 http://repo01.nms.tdc.net/ubuntu xenial/universe amd64 perl-byacc amd64 2.0-7 [105 kB]
Fetched 105 kB in 0s (2.537 kB/s)  
Selecting previously unselected package perl-byacc.
(Reading database ... 221007 files and directories currently installed.)
Preparing to unpack .../perl-byacc_2.0-7_amd64.deb ...
Unpacking perl-byacc (2.0-7) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up perl-byacc (2.0-7) ...
update-alternatives: using /usr/bin/pbyacc to provide /usr/bin/yacc (yacc) in auto mode

# apt install perl-byacc-
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-67 linux-headers-4.4.0-67-generic linux-image-4.4.0-64-generic linux-image-4.4.0-67-generic linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-67-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  perl-byacc
0 upgraded, 0 newly installed, 1 to remove and 34 not upgraded.
After this operation, 203 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 221041 files and directories currently installed.)
Removing perl-byacc (2.0-7) ...
Processing triggers for man-db (2.7.5-1) ...

** Affects: apt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1699698

Title:
  apt removes package when packagename ends with -

Status in apt package in Ubuntu:
  New

Bug description:
  It turns out that if you mess up (like in your system automation
  setup) - and ask for installing a package named perl-byacc- (where you
  wanted to install perl-byacc-subname) - apt just chooses to remove
  perl-byacc.. even if perl-byacc is not installed - it returns 0 -
  meaning everything seems okay :(

  # apt install perl-byacc
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-67 linux-headers-4.4.0-67-generic linux-image-4.4.0-64-generic linux-image-4.4.0-67-generic linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-67-generic
  Use 'sudo apt autoremove' to remove them.
  The following NEW packages will be installed:
    perl-byacc
  0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
  Need to get 105 kB of archives.
  After this operation, 203 kB of additional disk space will be used.
  Get:1 http://repo01.nms.tdc.net/ubuntu xenial/universe amd64 perl-byacc amd64 2.0-7 [105 kB]
  Fetched 105 kB in 0s (2.537 kB/s)  
  Selecting previously unselected package perl-byacc.
  (Reading database ... 221007 files and directories currently installed.)
  Preparing to unpack .../perl-byacc_2.0-7_amd64.deb ...
  Unpacking perl-byacc (2.0-7) ...
  Processing triggers for man-db (2.7.5-1) ...
  Setting up perl-byacc (2.0-7) ...
  update-alternatives: using /usr/bin/pbyacc to provide /usr/bin/yacc (yacc) in auto mode

  # apt install perl-byacc-
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-67 linux-headers-4.4.0-67-generic linux-image-4.4.0-64-generic linux-image-4.4.0-67-generic linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-67-generic
  Use 'sudo apt autoremove' to remove them.
  The following packages will be REMOVED:
    perl-byacc
  0 upgraded, 0 newly installed, 1 to remove and 34 not upgraded.
  After this operation, 203 kB disk space will be freed.
  Do you want to continue? [Y/n] Y
  (Reading database ... 221041 files and directories currently installed.)
  Removing perl-byacc (2.0-7) ...
  Processing triggers for man-db (2.7.5-1) ...

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1699698/+subscriptions



More information about the foundations-bugs mailing list