[Bug 1598810] Re: `apt-get install python3.4` on xenial exits 0 despite python3.4 not being available

David Kalnischkies 1598810 at bugs.launchpad.net
Mon Jul 4 13:24:06 UTC 2016


(srly, bugreports referring to pastebin?)

Well, apts output says what is going on: As a package with that name
doesn't exist and the string looks like a regex (thanks to the '.') it
will search for packages matching the regex and it does find one. That
is perfectly fine and established behavior which is impossible to change
without breaking existing users.

Note that the package python3.4 doesn't exist at all in the view of apt,
which triggers this. If ANY package would give it as much as a passing
hint that it ever existed (by having any sort of dependency on it) apt
would actually error out in a way you would like it to (saying that
python3.4 isn't available for install, but is referenced by other
packages – pointing to the potential of being replaced by something else
or distributed in another repository). That is also perfectly fine and
established behavior which is impossible to change by now.

Anyway, a workaround for your setup might be using '^python3\.4$'.

So, as there is no bug to be found, closing as opinion. We could treat
it as a wish for controlling how the string is interpreted, but that
will actually be a tiny by-product of patterns – and is in no way
helping apt versions without patterns as a feature, which is the subtext
of this bugreport.

P.S.: The automation to make stuff available for an application is
called packaging, not running apt commands automatically as this has
failure modes like this, makes changes so much harder for the python
side as well as the application side, destroys automatic removal and and
and which is why package management was invented decades ago in the
first place.

** Changed in: apt (Ubuntu)
       Status: New => Opinion

-- 
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/1598810

Title:
  `apt-get install python3.4` on xenial exits 0 despite python3.4 not
  being available

Status in apt package in Ubuntu:
  Opinion

Bug description:
  As per [0], `apt-get install python3.4` won't raise an error (despite
  the package not existing in xenial, and no installation happening),
  but `apt-get install not-a-real-package` will.  I would expect the
  behaviour to be the same in both cases.

  This may cause issues for users upgrading from trusty to xenial.  If
  someone is running a Python application that relies on Python 3.4,
  their automation may run "apt-get install python3.4" to ensure that
  Python 3.4 is available, expecting it to raise an error if python3.4
  does not end up installed.  It won't, and they will then unexpectedly
  be running 3.5.

  [0] http://paste.ubuntu.com/18443198/

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



More information about the foundations-bugs mailing list