Bug 1331814 - privoxy postuninstall scriptlet fails on a non-existing operation
Summary: privoxy postuninstall scriptlet fails on a non-existing operation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: privoxy
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-29 15:40 UTC by Michal Jaegermann
Modified: 2016-07-10 16:53 UTC (History)
2 users (show)

Fixed In Version: privoxy-3.0.24-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-09 23:18:21 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Jaegermann 2016-04-29 15:40:57 UTC
Description of problem:

The following is among package scripts and is executed on an update:

postuninstall scriptlet (using /bin/sh):
# Restart service if already running on upgrade
if [ "$1" -gt "1" ]; then
        /sbin/service privoxy condrestart > /dev/null 2>&1 ||:
fi

The trouble is that the only operations provided by the current version of this script are: start, stop and restart so this ends with

Usage: /etc/init.d/privoxy {start|stop|restart}

messages redirected to /dev/null.

In any case restarting privoxy requires some delay between stop and start.

Version-Release number of selected component (if applicable):
privoxy-3.0.24-1.el6

Comment 1 Fedora Update System 2016-06-21 14:48:41 UTC
privoxy-3.0.24-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d40efedf8d

Comment 2 Fedora Update System 2016-06-22 01:47:56 UTC
privoxy-3.0.24-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d40efedf8d

Comment 3 Fedora Update System 2016-07-09 23:18:19 UTC
privoxy-3.0.24-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Michal Jaegermann 2016-07-10 16:53:56 UTC
(In reply to Fedora Update System from comment #3)
> privoxy-3.0.24-2.el6 has been pushed to the Fedora EPEL 6 stable repository.
> If problems still persist, please make note of it in this bug report.

Hm, this update does now this which is not really correct:

# Restart service if already running on upgrade
if [ "$1" -gt "1" ]; then
        /sbin/service privoxy restart > /dev/null 2>&1 ||:
fi

'restart' will start privoxy even if it was not running.  A check with pgrep for a process existence, of something similar, is missing.  Or at least something like:

# Restart service if already running on upgrade
if [ "$1" -gt "1" ]; then
        [ -e /var/run/privoxy.pid ] && \
        /sbin/service privoxy restart > /dev/null 2>&1 ||:
fi


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