Modify

Ticket #564 (closed defect: worksforme)

Opened 15 years ago

Last modified 14 years ago

Debian package removal broken if bcfg2 server isn't configured & running

Reported by: dclark Owned by: desai
Priority: major Milestone: Bcfg2 1.0.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc: ressu

Description

Either the init script's stop should exit 0 if there is nothing to stop, or the prerm script needs to not care what the exit status is.

[email protected]:~# ls
bcfg2-server_0.9.6-0.1pre1svn4698_all.deb  bcfg2_0.9.6-0.1pre1svn4698_all.deb
[email protected]:~# dpkg -i *
(Reading database ... 15646 files and directories currently installed.)
Preparing to replace bcfg2-server 0.9.5.7-1 (using bcfg2-server_0.9.6-0.1pre1svn4698_all.deb) ...
Stopping Configuration Management Server:  * bcfg2-server
invoke-rc.d: initscript bcfg2-server, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 3
dpkg - trying script from the new package instead ...
Stopping Configuration Management Server:  * bcfg2-server
invoke-rc.d: initscript bcfg2-server, action "stop" failed.
dpkg: error processing bcfg2-server_0.9.6-0.1pre1svn4698_all.deb (--install):
 subprocess new pre-removal script returned error exit status 3
Starting Configuration Management Server:  * bcfg2-server
Preparing to replace bcfg2 0.9.5.7-1 (using bcfg2_0.9.6-0.1pre1svn4698_all.deb) ...
Unpacking replacement bcfg2 ...
Setting up bcfg2 (0.9.6-0.1pre1svn4698) ...
Installing new version of config file /etc/init.d/bcfg2 ...

Errors were encountered while processing:
 bcfg2-server_0.9.6-0.1pre1svn4698_all.deb

dpkg-remove --purge bcfg2 bcfg2-server
Removing bcfg2-server ...
Stopping Configuration Management Server:  * bcfg2-server
invoke-rc.d: initscript bcfg2-server, action "stop" failed.
dpkg: error processing bcfg2-server (--purge):
 subprocess pre-removal script returned error exit status 3
Starting Configuration Management Server: Traceback (most recent call last):
  File "/usr/sbin/bcfg2-server", line 230, in <module>
    SSETUP = Bcfg2.Options.OptionParser('bcfg2', OPTINFO).parse()
TypeError: __init__() takes exactly 2 arguments (3 given)
 * bcfg2-server
invoke-rc.d: initscript bcfg2-server, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Removing bcfg2 ...
Purging configuration files for bcfg2 ...
Errors were encountered while processing:
 bcfg2-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Attachments

Change History

comment:1 Changed 14 years ago by solj

  • Milestone changed from Bcfg2 0.9.6 Release to Bcfg2 1.0 Release

comment:2 Changed 14 years ago by solj

  • Priority changed from minor to major

comment:3 Changed 14 years ago by solj

  • Status changed from new to closed
  • Version set to 1.0
  • Resolution set to worksforme

I'm not sure when this started working, but it definitely works for me with trunk:

[email protected]:~# ls
bcfg2                      bcfg2_1.0pre1-0.0_amd64.changes  bcfg2_1.0pre1-0.0.tar.gz
bcfg2_1.0pre1-0.0_all.deb  bcfg2_1.0pre1-0.0.dsc            bcfg2-server_1.0pre1-0.0_all.deb
[email protected]:~# dpkg -i *.deb
Selecting previously deselected package bcfg2.
(Reading database ... 107695 files and directories currently installed.)
Unpacking bcfg2 (from bcfg2_1.0pre1-0.0_all.deb) ...
Selecting previously deselected package bcfg2-server.
Unpacking bcfg2-server (from bcfg2-server_1.0pre1-0.0_all.deb) ...
Setting up bcfg2 (1.0pre1-0.0) ...
Not replacing deleted config file /etc/bcfg2.conf

Processing triggers for man-db ...
Setting up bcfg2-server (1.0pre1-0.0) ...
Starting Configuration Management Server:  * bcfg2-server

[email protected]:~# apt-get remove --purge bcfg2 bcfg2-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  bcfg2* bcfg2-server*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 2232kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 107996 files and directories currently installed.)
Removing bcfg2-server ...
Stopping Configuration Management Server: /sbin/start-stop-daemon: warning: failed to kill 8370: No such process
 * bcfg2-server
Purging configuration files for bcfg2-server ...
Removing bcfg2 ...
Purging configuration files for bcfg2 ...
Processing triggers for man-db ...
[email protected]:~# dpkg -l |grep bcfg
[email protected]:~#

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.