Bug 2865 - rpm-helper/del-service errors when uninstalling package
Summary: rpm-helper/del-service errors when uninstalling package
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Olivier Thauvin
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2011-09-29 01:13 CEST by Barry Jackson
Modified: 2011-10-29 15:32 CEST (History)
3 users (show)

See Also:
Source RPM: rpm-helper-0.23.4-3.mga1.src.rpm
CVE:
Status comment:


Attachments
patch for the patch (739 bytes, patch)
2011-10-23 01:12 CEST, Barry Jackson
Details | Diff

Description Barry Jackson 2011-09-29 01:13:26 CEST
Description of problem:
When using %_preun_service in a spec file to remove a service in a package that I am working on, the following error occurs:-
#######################################

[root@jackodesktop baz]# urpme zoneminder
removing zoneminder-1.24.4-8.mga2.tainted.x86_64
process 26397: arguments to dbus_connection_send_with_reply_and_block() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 3483.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
/usr/share/rpm-helper/del-service: line 32: 26397 Aborted                 /bin/systemctl daemon-reload
removing package zoneminder-1.24.4-8.mga2.tainted.x86_64
writing /var/lib/rpm/installed-through-deps.list

#####################################

This appears to be caused by this section in /usr/share/rpm-helper/del-service.

    # support for systemd
    if [ -x /bin/systemctl ]; then
	    /bin/systemctl disable ${srv}.service > /dev/null 2>&1
	    /bin/systemctl daemon-reload
    fi

Commenting out the line "/bin/systemctl daemon-reload" removes the error.

Running that command in isolation reproduces the error.

NOTE. This is NOT the version of zoneminder in svn. The version in svn does NOT use rpm-helper so please don't use it to test ;)
The test version of zoneminder that is giving the error is available here:-

http://barjac-mtf.zapto.org/zoneminder-1.24.4-8.mga2.tainted.x86_64.rpm
http://barjac-mtf.zapto.org/zoneminder-1.24.4-8.mga2.tainted.src.rpm

If the problem is in the spec or init then my apologies, and any help will be appreciated ;)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:

1. Install zoneminder using urpmi zoneminder-1.24.4-8.mga2.tainted.x86_64.rpm
2. Uninstall zoneminder using urpme zoneminder.
3. Errors during un-installation.
Manuel Hiebel 2011-09-29 11:03:12 CEST

CC: (none) => dmorganec, nanardon

Comment 1 Samuel Verschelde 2011-10-01 03:20:32 CEST
Assigning to maintainer now that our maintainers database has an entry for
this package. Please assign back to bugsquad@mageia.org in case of a mistake
from me.

CC: (none) => stormi
Assignee: bugsquad => nanardon

Comment 2 Barry Jackson 2011-10-23 01:12:40 CEST
Created attachment 994 [details]
patch for the patch

This hack seems to work, but may break something else.
Rather than just checking that systemctl is executable it also checks that systemd is in use.
I am testing a re-built rpm-helper with this patch and will report any problems if they occur.
D Morgan 2011-10-27 21:41:15 CEST

Blocks: (none) => 2120

Comment 3 D Morgan 2011-10-29 15:32:27 CEST
fixed in trunk

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.