Re: Struggling to remove old config files.

2011-03-02 Thread Raphael Hertzog
On Tue, 01 Mar 2011, Michael Lustfield wrote:
 I know the correct way to remove these files is with dpkg-maintscript-helper. 
 I
 tried my hardest to use this correctly. I had a few incorrect uses pointed out
 to me that have since been corrected. However, I am still unable to remove
 these incorrect configuration files.

You should remove the files in the packages that own them. Thus
your dpkg-maintscript-helper calls should be in nginx{,-full,-light,-extras}
but not in nginx-common.

And the upgrade of those packages will then lead to the removal.

nginx-common is a new installation, and not an upgrade. And rm_conffile
is only activated on upgrade if you supply a version parameter like you
did.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
  ▶ http://RaphaelHertzog.fr (Français)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110302133616.gg20...@rivendell.home.ouaza.com



Re: Struggling to remove old config files.

2011-03-02 Thread Raphael Hertzog
Please keep the discussion on debian-mentors.

On Wed, 02 Mar 2011, Michael Lustfield wrote:
 The reason I put it in nginx-common was because nginx-{full,light,extras} are
 interchangeable packages. Someone could remove one and add another. An example
 would be the upgrade made them install nginx-full but they noticed and decided
 to try nginx-light.

And? Purging a package removes the configuration files. So that's ok.

If some configuration files are obsoleted in the process of upgrading foo
v1 to foo v2, then foo must remove those conffiles on upgrade.  And it's
not the job of foo-common.

You're putting the configuration files in nginx-common precisely because
they are now shared between the various packages so that you always use
the same conffile whatever the current variant, right?

 They would have /etc/logrotate.d/nginx-{full,light}. If they upgrade
 nginx-light they would have one conf file removed, but not the other.

Right, but it's not a big deal. They would be removed by dpkg --purge
nginx-full.

If you really want to keep it in nginx-common, you have to supply
an empty version parameter so that it's always tried and not only during
upgrade.

dpkg-maintscript-helper rm_conffile /etc/logrotate.d/nginx-full  nginx-full 
-- $@

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
  ▶ http://RaphaelHertzog.fr (Français)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110302161856.gc5...@rivendell.home.ouaza.com



Re: Struggling to remove old config files.

2011-03-02 Thread Michael Lustfield
On Wed, 2 Mar 2011 17:18:56 +0100
Raphael Hertzog hert...@debian.org wrote:

 Please keep the discussion on debian-mentors.

Sorry, I didn't take notice of the email being replied to.

 And? Purging a package removes the configuration files. So that's ok.

I would like that but it's more likely to remove the package rather than purge.
Like you said too; with an empty version string it's run every single upgrade
which seems a tad excessive. Both are easy options to use now. Thanks! :)


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110302104720.220aabd0@panther



Struggling to remove old config files.

2011-03-01 Thread Michael Lustfield
A while back I decided that taking the already light Nginx and splitting it
into nginx-full and nginx-light would be a good idea so the minimal Nginx could
be used to handle very high traffic loads. Then nginx-extras sounded great for
users that want to use extra features that actually weigh down Nginx like perl
config support.

Against better advice, I didn't see the need for an nginx-common package. I
learned my lesson and made an nginx-common package that deals with some issues
that came up from my ignorance.

Unfortunately, I learned this too late. The split resulted in config files
being created at /etc/logrotate.d/nginx-{full,light,extras}.

I know the correct way to remove these files is with dpkg-maintscript-helper. I
tried my hardest to use this correctly. I had a few incorrect uses pointed out
to me that have since been corrected. However, I am still unable to remove
these incorrect configuration files.

The packing I'm using is at:
  
http://svn.debian.org/wsvn/collab-maint/deb-maint/nginx/trunk/debian/#_deb-maint_nginx_trunk_debian_

I setup a PPA for testing. The only change between what's in the svn repo now
and what I used is version number and set -x. You can see the result of the
test I did at http://dpaste.com/463702/.

At line 77 you can see that the old incorrect configuration file is being used.
That's the version in sid right now. At line 105 I update to the testing
version that I'm trying to have the fix in. Then at line 164 you can see the
old config file was not removed and the new one was installed.

I've been fighting this for a pretty decent amount of time and I think it's
safe to say that I'm completely stumped and unable to figure out what I'm doing
wrong. Any help is greatly appreciated.

Thanks,
Michael Lustfield


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110301205918.7078466a@panther