← Back to team overview

touch-packages team mailing list archive

[Bug 1399037] Re: apt-get can not simulate

 

That's a fun one… You see, back in 2013 I remodeled the commandline
parsing. The point was that an option (like -s) is only accepted if the
command (e.g. dselect-upgrade) supports this option. Previously e.g.
apt-get would accept any option even if it only has an effect for
certain commands. Very dangerous as that made user believe they would
actually have an effect…

Now, what happen back then is that I typoed "dselect" as "deselect",
which made it not accept any option… Well, I was never using it, many
others neither, so that went unnoticed for months, until someone
reported that and (still in 2013) we fixed that. Over the years other
similar things appeared (usually forgotten options or options which
really had no effect) like the one mentioned here with apt-offline.
Anyway, all nice and good right?

Well, expect that while the commit message back then indicates that
Michael replaced ALL instances of 'deselect', he just fixed one
instance. Another one was still in there, guarding some options:
(drumroll) -s and friends. Quite telling how unused dselect is nowadays
that this could hide itself for another (nearly) two years…

Will be fixed "soon" (= fixed in my branch, but that is unlikely to hit
any release soon). Until then you can use -o APT::Get::Simulate=1
instead of -s (or the others like --dry-run). Or, well, don't simulate.
;)

Oh, and feel free to give me a compelling example of how to use it for
good. Its totally underrepresented in our testcases, so if you want to
prevent breakage of your usecase in the future…

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1399037

Title:
  apt-get can not simulate

Status in apt package in Ubuntu:
  Confirmed

Bug description:
  Hi,

  I just noticed that apt can not simulate in Ubuntu 14.04.1.

  
  Updated:

  sudo apt-get -s dselect-upgrade
  E: Command line option 's' [from -s] is not known.

  sudo apt-get --dry-run dselect-upgrade
  E: Command line option --dry-run is not understood

  sudo apt-get --recon dselect-upgrade
  E: Command line option --recon is not understood

  sudo apt-get --no-act dselect-upgrade
  E: Command line option --no-act is not understood

  sudo apt-get --simulate dselect-upgrade
  E: Command line option --simulate is not understood

  sudo apt-get --just-print dselect-upgrade
  E: Command line option --just-print is not understood

  The issue occures with at least the following versions of apt: 1.0.1ubuntu2.4.1, 1.0.1ubuntu2.5, 1.0.1ubuntu2.6
  and 1.3.1 version of apt-offline.

  It works fine on Ubuntu 12.04 with:  apt 0.8.16~exp12ubuntu10.22 and
  without apt-offline.

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


References