apt changelog outputs "usage: which [-as] program ..." if variable PAGER doesn't exist

Bug #1782567 reported by Paulo Marcel Coelho Aragão
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When variable PAGER isn't in the environment, apt changelog always outputs this message:

usage: which [-as] program ...

but it goes on and shows the changelog with less. Most certainly it's running:

which $PAGER

without checking first if PAGER is empty.

sensible-browser has the same bug, but with variable BROWSER:

bug #1782447

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: apt 1.6.3
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Jul 19 09:35:46 2018
InstallationDate: Installed on 2018-04-28 (81 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Cannot reproduce. APT does not run which, so it's definitely not apts problems.

Changed in apt (Ubuntu):
status: New → Invalid
Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :

The bug was present in 1.6.3, but it seems to have been fixed in 1.6.3ubuntu0.1.

If you roll back to 1.6.3, it's easy to reproduce it:

$ PAGER=
$ apt changelog apt

It shows this error message:

usage: which [-as] program ...

and then goes on to show the changelog for apt.

Whether apt called which or not, it was a bug nonetheless. The changelog for apt doesn't mention fixing this, but it has been fixed because it cannot be reproduced on 1.6.3ubuntu0.1

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

There is no difference there between 1.6.3 and 1.6.3ubuntu0.1, the latter being a security update for the mirror:// method.

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.