On Sat, 15 Dec 2007 19:34:42 +0100
Roland Rosenfeld <[EMAIL PROTECTED]> wrote:

> I cannot believe that this is all you got.  It seems to me, that you
> modified /etc/privoxy/config in 3.0.6 and kept this changes with the
> 3.0.7 upgrade instead of adjusting the config file.

Thanks for the fast response and accurate diagnosis -- you're right,
first I ran apt-get, but wrongly figured "dpkg" output would be purer
for a bug report.

> ...So as you can see, the new config file contains the complete file
> name, while the old version suppressed the affix .action.

Confirmation:

        % rgrep -n '^[^#].*standard.*' /etc/privoxy/config
        337:actionsfile standard  # Internal purpose, recommended

> ... 
> I'm not fully sure, whether there is some better way for the upgrade.

Systemic problem.  Users who run unstable are often asked if they want
to change their config files.  Those who don't run vanilla hardware
tend to press 'Enter' (no change) a lot.  I usually press 'd' for
'diff' and look at what's new, but seldom understand a config file as
well as its maintainer would, and have only so much time to study their
many formats, so it's an error prone process.  Naturally I
wanted to keep these lines:

        % grep -nB 1 -A 1 'wwwoffle' /etc/privoxy/config
        993-# Switching forwarding order in proxy chain, see bug #157854 -AC 
Thu Dec  6 04:26:57 2007
        994:# this'd be wwwoffle...
        995-forward   / localhost:8080

I changed my '/etc/privoxy/config' years ago, to chain it to 'wwwoffle',
and reordered the chain a week ago.

(Wasn't 'debconf' designed to prevent users from screwing up config
files?  How good is it?  IANADD.)

If the only functional changes were 'actionsfile' lines, then
why not just throw in a 'sed' line to the upgrade script, e.g.:

        # check for pre v3.0.7 syntax, and correct it.
        F=/etc/privoxy/config
        if rgrep -q '^actionsfile [a-z]*[[:space:]]*#.*$' $F
        then
                # possibly some user prompt here about "highly recommended", but
                # is it really necessary?

                # change file, and make a '.bak' backup.
                sed 's/^actionsfile \([a-z]*\) *\#/actionsfile \1.action 
\t\#/g' -i.bak $F
        fi

Testing the above 'sed' syntax:

        % sed 's/^actionsfile \([a-z]*\) *\#/actionsfile \1.action \t\#/g' 
-i.bak /etc/privoxy/config
        % diff  /etc/privoxy/config /etc/privoxy/config.bak
        337,340c337,340
        < actionsfile standard.action   # Internal purpose, recommended
        < actionsfile global.action     # Global default setting for all sites
        < actionsfile default.action    # Main actions file
        < actionsfile user.action       # User customizations
        ---
        > actionsfile standard  # Internal purpose, recommended
        > actionsfile global    # Global default setting for all sites
        > actionsfile default   # Main actions file
        > actionsfile user      # User customizations

That looks OK.

After running 'sed', upgrading to v3.0.7 (with no further config
changes) worked.  Of course now the comments in the old file are
partially obsolete.

Should this bug be closed?  On the one hand, with your help I upgraded
'privoxy' by changing the config.   On the other, if a user presses
"enter" then 'privoxy' loses backwards compatibility and invariably 
breaks, without offering a special warning.

HTH...


Inessential opinion:  reviewing the v3.0.7 diff file showed several
pages of changes, at least 95% comment lines.  When there's only a few
lines difference it's less work.  The current user review line oriented
diff tools don't scale well when the data comes via fire hose.  I'd like
to press some key and see only changes that aren't comments, then maybe
menu those, press 'k' for lines to keep, etc -- like a "line item
veto".  Not a 'privoxy' bug though.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to