Subject: Bug#4204: cron does not install if /usr/sbin/cron does not exist!?

From: Yves Arrouye <[email-masked]>
Date: Tue, 20 Aug 1996 21:54:54 +0200

Package: cron
Version: 3.0pl1-33

Here is what I get:

marin13# dpkg -i cron_3.0pl1-33.deb 
(Reading database ... 22220 files and directories currently installed.)         
Preparing to replace cron (using cron_3.0pl1-33.deb) ...
start-stop-daemon: unable to stat executable `/usr/sbin/cron': No such file or d
irectory
dpkg: warning - old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
start-stop-daemon: unable to stat executable `/usr/sbin/cron': No such file or d
irectory
dpkg: error processing cron_3.0pl1-33.deb (--install):
 subprocess new pre-removal script returned error exit status 2
start-stop-daemon: unable to stat executable `/usr/sbin/cron': No such file or d
irectory
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 cron_3.0pl1-33.deb

Apparently the install fails because the installation script is run with
-e set. If I touch /usr/sbin/cron, it installs fine.

Yves.

-- 
Yves Arrouye                         Email : [email-masked]
7, avenue Leon Bollee               Web : http://www.fdn.fr/~yarrouye/
75013 Paris                                    Work : +33 53 61 09 55
France                                         Home : +33 45 95 64 59

---

From: Steve Greenland <[email-masked]>
Date: Sun, 25 Aug 1996 22:46:23 -0500 (CDT)

Yves Arrouye wrote:
> [snip!] 

Interesting. It's failing because it's an upgrade (otherwise prerm
wouldn't be called), but /usr/sbin/cron isn't there. I'm able to
duplicate it by simply rm'ing cron, and then trying to do pretty
much anything with dpkg -- install doesn't work, and neither does
remove. I've tried --force-reinstreq ('cause one of the messages
from dpkg is "Package is in a very bad inconsistent state - you
should reinstall it before attempting a removal.") but that doesn't
help.  I'm not sure how to get out of this other than going down
into the bowels of /var/dpkg and messing with the prerm script:
I don't see a --ignore-script-errors option for dpkg.

> -e set. If I touch /usr/sbin/cron, it installs fine.

They're supposed to have -e set. I'm not inclined to modify the
script to check for /usr/sbin/cron, because the if the prerm script
is called, then the cron package is installed, and the cron program
is supposed to be there. If it isn't, then the file has been removed
by manipulations outside the domain of the dpkg/dselect.

If all the package scripts are supposed to deal with things happening
outside the control of dpkg/dselect then I have about 300 bug
reports to file :-).

I'm not closing this bug yet, because I would like to know if there
is a way around this problem (other than 'touch /usr/bin/cron', which
may well be the best answer). 

Steve Greenland

-- 
The Mole - I think, therefore I scream 

				"You know monsters...  they're ALWAYS
				 eating power stations!"
[FLAMING CARROT vs the Giant Japanese Monsters!]

---

From: Ian Jackson <[email-masked]>
Date: Sat, 31 Aug 96 14:12 BST

> Yves Arrouye wrote:
...
> > dpkg: warning - old pre-removal script returned error exit status 2
...
> I don't see a --ignore-script-errors option for dpkg.

I could add one, of course, but it's probably a bad idea.

...
> by manipulations outside the domain of the dpkg/dselect.

Indeed.

> outside the control of dpkg/dselect then I have about 300 bug

Quite.

> may well be the best answer). 

I think that `touch /usr/bin/cron' is the best answer.

Ian.