"apt-get -s --print-uris update" does not work on Tahr

Bug #1308670 reported by Sean Payne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

On Tahr:
$ apt-get -s --print-uris update
E: Command line option 's' [from -s] is not known.

On saucy (expected result)
$ apt-get -s --print-uris update
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
...

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apt 1.0.1ubuntu2
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Apr 16 11:08:04 2014
InstallationDate: Installed on 2014-04-11 (4 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 LTS "Trusty Tahr" - Daily amd64 (20140411)
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sean Payne (sean-d-payne) wrote :
Revision history for this message
David Kalnischkies (donkult) wrote :

Well, this is intended behavior as our commandline parser got stricter and allows/forbids options based on the subcommands (like update) instead of accepting and possibly silently ignoring all options for every subcommand confusing the hell out of users and developers alike.

Simulation (-s) is e.g. a option which had no effect for "update". And it has also semantically no effect as "--print-uris" already expresses the wish to do 'nothing'.

So, if this is just muscle memory, it might be painful, but I would like to ask you to retrain yourself. After all: Less typing for the same effect! ;)
If you happen to use that in a script, changing would be a good idea here, too, as said, in this case the behavior does not change at all, so you can remove it and still support any apt version as before.
In the (unlikely) even this is a very very important application hard-depending on this which can't be fixed easily, please reopen the bug and we will figure something out as a temporary workaround.

Changed in apt (Ubuntu):
status: New → Invalid
Revision history for this message
Sean Payne (sean-d-payne) wrote :

I got the phrasing from apt-python, who mention it in their tutorials. e.g. in the second paragraph of http://apt.alioth.debian.org/python-apt-doc/tutorials/apt-get.html

I'll suggest it to them to change their tutorial to remove the -s as it is superfluous.

Revision history for this message
Julian Andres Klode (juliank) wrote :

I believe I added the -s to the example in the python-apt documentation because earlier versions of APT tried to lock if only --print-uris was specified. But if that's not a problem anymore, I should remove it.

affects: apt (Ubuntu) → python-apt (Ubuntu)
Changed in python-apt (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
David Kalnischkies (donkult) wrote :

(History-digging response) After sending my reply I actually wondered about the lock as well: A simple test revivaled that the current version has no problem with it, but now I had a closer look: I vaguely remember problems with locking as well, but I am not sure if that was related to 'update'. A casual look for changes in that area leads me to git commit 1cd1c398 from 4 years ago, which looks a bit like it could be the fix for this.

Revision history for this message
Julian Andres Klode (juliank) wrote :

commit 2884948fb3cb9ad0c660380ec07412086e164f31
Author: Julian Andres Klode <email address hidden>
Date: Tue Jul 8 15:31:01 2014 +0200

    doc/source/tutorials/apt-get.rst: Remove -s from --print-uris invocation

    This is not needed with APT 1.0 and does not work anymore.

    LP: #1308670
    Reported-by: Sean Payne <email address hidden>

Changed in python-apt (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 0.9.3.10

---------------
python-apt (0.9.3.10) unstable; urgency=medium

  * python/tag.cc: ensure that the final \n is there when
    duplicating section data
  * apt/debfile.py:
    - Stop reading after the "Format" stanza in a .dsc file
    - Add support for apt.debfile.DscSrcPackage.filelist
    - Read all tags from a dsc file and improve tests
  * fix tests when gnupg is < 1.4.18
  * update python-apt.pot

 -- Michael Vogt <email address hidden> Thu, 04 Sep 2014 18:07:41 +0200

Changed in python-apt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.