[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Maint scripts exit status and apt.



 I ran `dselect', and picked `ssh', along with a slew of other
 packages, then pushed Install. When it popped up the `debconf'
 interface for `Open-ssh', I answered No by mistake (Is the button red
 or blue when it's active?).  Here's what it said.

 ssh preinst: Aborting because ssh/upgrade_to_openssh = false
 dpkg: error processing /var/cache/apt/archives/ssh_1%3a1.2pre17-1_i386.deb (--unpack):
  subprocess pre-installation script returned error exit status 1
 Errors were encountered while processing:
  /var/cache/apt/archives/ssh_1%3a1.2pre17-1_i386.deb
 E: Sub-process returned an error code (1)
 Some errors occurred while unpacking. I'm going to configure the
 packages that were installed. This may result in duplicate errors
 or errors caused by missing dependencies. This is OK, only the errors
 above this message are important. Please fix them and run [I]nstall again
 Press enter to continue.

 It then went and ran configures on what had been unpacked, and
 dropped me back to the `dselect' main menu.

 Here's the relevant portion of the "/var/lib/dpkg/info/ssh.preinst":

  db_get ssh/upgrade_to_openssh
  if [ "$RET" = "false" ]; then
    echo "ssh preinst: Aborting because ssh/upgrade_to_openssh = false" >&2
    exit 1
  fi

 You can see it exits with code 1.

 I don't think that `apt' should have aborted there; it ought to have
 continued on its way.  We need to define some standard exit status
 numbers for those scripts.

 Comments?


Reply to: