FS#14810 - [dbus-core] .install fails in pre_remove()

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Saturday, 23 May 2009, 23:39 GMT
Last edited by Jan de Groot (JGC) - Saturday, 31 October 2009, 11:03 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: dbus-core when remove try to delete the user and group dbus. But by default USERGROUPS_ENAB [#1] is enabled by default in Arch Linux, so userdel will remove both user and group dbus.

Current script

pre_remove() {
usr/sbin/userdel dbus &>/dev/null
usr/sbin/groupdel dbus &>/dev/null
}

Workaround script:

pre_remove() {
usr/sbin/userdel dbus &>/dev/null
usr/sbin/groupdel dbus &>/dev/null
return 0
}

Additional info:
dbus-core-1.2.14-1

[#1] If USERGROUPS_ENAB is defined to yes in /etc/login.defs and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user.

Steps to reproduce:
[CHROOT][root@gerardo ~]# pacman -S dbus-core --noconfirm --noprogressbar
resolving dependencies...
looking for inter-conflicts...

Targets (1): dbus-core-1.2.14-1

Total Download Size: 0.00 MB
Total Installed Size: 1.02 MB

Proceed with installation? [Y/n]
checking package integrity...
checking for file conflicts...
installing dbus-core...
[CHROOT][root@gerardo ~]# pacman -R dbus-core --noconfirm --noprogressbar
checking dependencies...
removing dbus-core...
error: scriptlet failed to execute correctly
[CHROOT][root@gerardo ~]#
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 31 October 2009, 11:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in svn, will be included in the next update or rebuild. The error is harmless, so I won't bump the package for this.
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 26 May 2009, 06:08 GMT
pre_remove() {
getent passwd dbus &>/dev/null && usr/sbin/userdel dbus &>/dev/null
getent group dbus &>/dev/null && usr/sbin/groupdel dbus &>/dev/null || true
}

OR

pre_remove() {
getent passwd dbus &>/dev/null && usr/sbin/userdel dbus &>/dev/null
getent group dbus &>/dev/null && usr/sbin/groupdel dbus &>/dev/null
return 0
}

or any other solution.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 07 October 2009, 14:56 GMT
is still valid with dbus-core-1.2.16-1

Loading...