[Bug 1595148] Re: 0 is returned on failure

Colin Watson cjwatson at canonical.com
Wed Jun 22 13:06:31 UTC 2016


I don't think this is a bug.  The principle I'm following here is that
you asked update-binfmts to put your system into a certain state
(respectively, "no binary format EXE should be installed" and "the
binary format EXE should be installed with this specification"), and
your system was already in that state, so it had nothing to do.
Emitting a warning is reasonable in case this indicates a bug in
something higher-level, but it is not a failure and a non-zero exit code
would be inappropriate.

Could you explain why the zero exit code causes a problem for you?

** Changed in: binfmt-support (Ubuntu)
       Status: New => Incomplete

** Summary changed:

- 0 is returned on failure
+ 0 is returned when there is nothing to do

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to binfmt-support in Ubuntu.
https://bugs.launchpad.net/bugs/1595148

Title:
  0 is returned when there is nothing to do

Status in binfmt-support package in Ubuntu:
  Incomplete

Bug description:
  I'm using Ubuntu 16.10 dev with binfmt-support 2.1.6-1 and on trying
  to remove a non-existent entry from the database a warning is being
  displayed but 0 is returned like in this example:

  root at ubuntu:~# update-binfmts --remove EXE /opt/wine-devel/bin/wine
  update-binfmts: warning: /var/lib/binfmts/EXE does not exist; nothing to do!
  root at ubuntu:~# echo $?
  0

  
  Additionally trying to add an entry twice for example with "update-binfmts --install EXE /opt/wine-devel/bin/wine --magic MZ" does not result in a warning that the entry already exists and 0 is returned too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binfmt-support/+bug/1595148/+subscriptions



More information about the foundations-bugs mailing list