Debian Bug report logs -
#14059
amd: purging causes error messages and dangling symlinks
Reported by: arto.astala@ntc.nokia.com
Date: Tue, 21 Oct 1997 13:33:07 UTC
Severity: normal
Done: Anthony Towns <ajt@master.debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to arto.astala@ntc.nokia.com
:
New bug report received and forwarded. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: amd
Version: upl102-17
-- System Information
Debian Release: 1.3
Kernel Version: Linux motie 2.0.30 #1 Sun Jun 1 09:14:11 EST 1997 i586 unknown
release is 1.3.1 + quite a lot things from hamm
purging amd:
motie# dpkg -l amd
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============-==============-============================================
ii amd upl102-17 The 4.4BSD automounter.
motie# dpkg --purge amd
(Reading database ... 42834 files and directories currently installed.)
Removing amd ...
Stopping automounter: amd.
dpkg - warning: while removing amd, directory `/etc/amd' not empty so not removed.
Purging configuration files for amd ...
update-rc.d: warning: /etc/rc0.d/K35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc1.d/K35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc2.d/S35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc3.d/S35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc4.d/S35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc5.d/S35amd is not a link to ../init.d/amd
update-rc.d: warning: /etc/rc6.d/K35amd is not a link to ../init.d/amd
motie#
result:
/etc/amd is no more (it contained no changed configuration),
but dangling symlinks were left in /etc/rc?.d/
Information forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to Roman.Hodek@informatik.uni-erlangen.de
:
Extra info received and forwarded to list. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #10 received at 14059@bugs.debian.org (full text, mbox, reply):
Hi Arto!
> dpkg - warning: while removing amd, directory `/etc/amd' not empty
> so not removed.
Most probably you have created files in /etc/amd yourself that aren't
part of the package. If you don't need them anymore, just remove them
and the dir manually.
> Purging configuration files for amd ...
> update-rc.d: warning: /etc/rc0.d/K35amd is not a link to ../init.d/amd
[...]
That is strange. Have you changed anything in that directories, or
renamed the script in init.d, or anything like that?
Roman
Information forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to arto.astala@ntc.nokia.com
:
Extra info received and forwarded to list. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #15 received at 14059@bugs.debian.org (full text, mbox, reply):
Hi Roman!
> Hi Arto!
>
> > dpkg - warning: while removing amd, directory `/etc/amd' not empty
> > so not removed.
>
> Most probably you have created files in /etc/amd yourself that aren't
> part of the package. If you don't need them anymore, just remove them
> and the dir manually.
No, I have not, I remember that amd told me to configure it to my
needs but I did nothing for it and two or three weeks later I removed
it.
I am sorry that I was not clear in what I ment:
>>> (from original report:)
>>> /etc/amd is no more (it contained no changed configuration),
I intended to say that after removal /etc/amd *was* removed, despite
the warning dpkg gave:
>>> dpkg - warning: while removing amd, directory `/etc/amd' not
>>> empty so not removed.
So the end result was correct but the warning was not.
> > Purging configuration files for amd ...
> > update-rc.d: warning: /etc/rc0.d/K35amd is not a link to ../init.d/amd
> [...]
>
> That is strange. Have you changed anything in that directories, or
> renamed the script in init.d, or anything like that?
The only thing I can think about is that (without too much thinking) I
installed and later removed package file-rc that collects symlinks to a
file.
Are these
/etc/rc0.d/K35amd
/etc/rc1.d/K35amd
/etc/rc2.d/S35amd
/etc/rc3.d/S35amd
/etc/rc4.d/S35amd
/etc/rc5.d/S35amd
/etc/rc6.d/K35amd
all the links or is /etc/init.d/amd removed when purging the first
link?
One other thing: I hope these symlinks are removed when package is
removed and file /etc/init.d/amd is removed when purging (I have not
tried this but if symlinks are considered configuration files then
booting gives error messages.
Later this thing with symlinks happened also with squid. This might
indicate that your package is not necessarily at fault but there is
some more general phenomenon at work here. I do not know, however,
against what package I should report it.
cheers, aa
Information forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to dark@xs4all.nl (Richard Braakman)
:
Extra info received and forwarded to list. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #20 received at 14059@bugs.debian.org (full text, mbox, reply):
I've seen this before. I suspect that it is due to the order in which
dpkg does this. dpkg first removes all non-configuration files. This
includes /etc/amd. But /etc/amd is not empty because it contains
configuration files. Presumably it leaves /etc/amd in the list of
unpurged files for amd.
During a later phase of the purge, dpkg removes the remaining
(configuration) files, including the directory /etc/amd which is now
empty.
(See section 6.5 of the packaging manual).
So perhaps dpkg could be improved by having it check if the directory
contains configuration files, before emitting the warning.
Richard Braakman
Information forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to Roman.Hodek@informatik.uni-erlangen.de
:
Extra info received and forwarded to list. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #25 received at 14059@bugs.debian.org (full text, mbox, reply):
Hi Arto!
> Since you did not cc bug system I did neither
This wasn't intention... I always just press 'r' :-)
> > [...] Just ignore the warning, this happens for all
> > packages that create their own dir under /etc.
>
> Ok, it still is a bug, but not in amd.
It's surely not very nice, but whether it's a bug can be discussed...
The alternative would be that dpkg is quiet if it can't remove a
directory, isn't it? I can't say that this is desirable in call cases
either...
> that if update-rc.d removes both the symlink *and* the script when
> removing the first symlink, then all the remaining removals fail
> with point to nowhere error.
No, update-rc.d only removes the links. The script in init.d stays in
place when only removing the package, in case the admin wants to
reinstall it with the same configuration later. The script just isn't
called if no rc?.d links point to it.
> Yes, but when update-rc.d is tryng to remove them they point to
> nowhere.
Yep, that's a fact... something must have removed the init.d/amd
thingie before.
> Before dpkg amd was up and running, so they did point to correct
> script.
Hmm... not necessarily... The last time where the links must have been
correct was your last boot before removing/purging amd. The rc?.d
links are used only when changing runleves, which includes booting and
halting the system.
> before removing /etc/init.d/amd it seems, so why the errors?
The prerm script is called before any of the packages files is really
removed, so the init.d/amd should have still been in place from dpkg's
side. dpkg deletes conffiles after completing the remove action, i.e.
quite a bit later.
Why the errors is a good question... :-)
> File-rc was not installed any more at that time.
...but may have left some traces :-)
> File-rc promises to restore symlinks as they were, but ... In any
> case, booting was normal after removing file-rc. I think it did
> restore something and that something probably was pretty close to
> the actual thing for boot to work as before. (Pretty close is pretty
> good way to get pretty much troubles, I know.)
Could it be that update-rc.d expects relative symlinks (i.e.,
"../init.d/amd") and file-rc sometimes creates absoulte links (i.e.,
"/etc/init.d/amd")?
> - file-rc restores something other than was originally there, this
> means that when amd asks update-rc.d to do something that request
> and reality do not match but how then can update-rc.d complain about
> the correct thing?
See above: Maybe update-rc.d doesn't consider absolute symlinks the
correct thing...
> - update-rc.d does too much too soon, seems likely to me, but I
> don't know nothing about reality in this case you may know if this
> is true and wheather then it is a bug in update-rc.d or in your
> scripts
AFAIK that dpkg procedures, this case seems highly unprobable.
Roman
Information forwarded to debian-bugs-dist@lists.debian.org, Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
:
Bug#14059
; Package amd
.
(full text, mbox, link).
Acknowledgement sent to arto.astala@ntc.nokia.com
:
Extra info received and forwarded to list. Copy sent to Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
.
(full text, mbox, link).
Message #30 received at 14059@bugs.debian.org (full text, mbox, reply):
>
>
Roman=>
Arto => >
[...]
> It's surely not very nice, but whether it's a bug can be discussed...
> The alternative would be that dpkg is quiet if it can't remove a
> directory, isn't it? I can't say that this is desirable in call cases
> either...
I made a separate bug report for dpkg not checking if directory
contains configuration files before issuing a warning. Tried to cc
you, hope you got it.
[...]
> Hmm... not necessarily... The last time where the links must have been
> correct was your last boot before removing/purging amd. The rc?.d
> links are used only when changing runleves, which includes booting and
> halting the system.
I don't usually change runleves, since Debian (by courtesy of
update-rc.d?) considers levels 2-6 equivalent.
[...]
> Could it be that update-rc.d expects relative symlinks (i.e.,
> "../init.d/amd") and file-rc sometimes creates absoulte links (i.e.,
> "/etc/init.d/amd")?
> > [...]
> See above: Maybe update-rc.d doesn't consider absolute symlinks the
> correct thing...
That's it! I checked rc?.d and all links were absolute. Then I poked
around in update-rc.d and found an if-statement with two conditions,
which *both* test identically relative links. I think intention was
to test relative and absolute.
By separating the dpkg issue out of this we now have one bug,
which belongs either to
- file-rc (generating absolute links on removal)
- update-rc.d (not accepting absolute links as it should)
or
- both (this is really the case, I think).
Could you reassign this to one or both as you see fit.
Thanks for your work in finding out bug that were not in amd at all.
cheers, aa
Bug reassigned from package `amd' to `dpkg'.
Request was from Roman Hodek <rnhodek@faui22c.informatik.uni-erlangen.de>
to control@bugs.debian.org
.
(full text, mbox, link).
Bug reassigned from package `dpkg' to `dpkg-iwj'.
Request was from Ben Collins <bcollins@debian.org>
to control@bugs.debian.org
.
(full text, mbox, link).
Bug reassigned from package `dpkg-iwj' to `dpkg'.
Request was from Anthony Towns <ajt@master.debian.org>
to control@bugs.debian.org
.
(full text, mbox, link).
Bug closed, ack sent to submitter - they'd better know why !
Request was from Anthony Towns <ajt@master.debian.org>
to control@bugs.debian.org
.
(full text, mbox, link).
Bug reassigned from package `dpkg' to `dpkg'.
Request was from Anthony Towns <ajt@master.debian.org>
to control@bugs.debian.org
.
(full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Apr 27 03:14:12 2024;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.