Incorrect exit code 0 on failed search
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dlocate (Debian) |
Fix Released
|
Unknown
|
|||
dlocate (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Exit status is 0 even if pattern is not found, due to piping.
Affected commands:
DEFAULT/none PATTERN list records that match either package or files names
-S PATTERN list records that match filenames
How to replicate:
$ /usr/bin/dlocate -F /usr/bin/dlocate; echo $?
dlocate: /usr/bin/dlocate
0
$ /usr/bin/dlocate -F /usr/bin/
0
Expected result:
$ /usr/bin/dlocate -F /usr/bin/dlocate; echo $?
dlocate: /usr/bin/dlocate
0
$ /usr/bin/dlocate -F /usr/bin/
1
I've attached a patch.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: dlocate 1.02
ProcVersionSign
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.6.1-0ubuntu1
Architecture: amd64
Date: Thu Oct 4 14:39:30 2012
PackageArchitec
ProcEnviron:
LANGUAGE=es_CL:en
TERM=xterm
PATH=(custom, no user)
LANG=es_CL.UTF-8
SHELL=/bin/bash
SourcePackage: dlocate
UpgradeStatus: Upgraded to quantal on 2012-09-27 (7 days ago)
tags: | added: lucid natty oneiric patch precise |
Changed in dlocate (Debian): | |
status: | Unknown → New |
Changed in dlocate (Debian): | |
status: | New → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.