[Piuparts-devel] Bug#586793: piuparts must deal with changing symlinks in /etc/rcX.d/
Andreas Beckmann
debian at abeckmann.de
Wed Jul 7 09:44:50 UTC 2010
tags 586793 + patch
thanks
On Tuesday, 22. June 2010 18:14:39 Holger Levsen wrote:
> Currently I still wonder whether there is any other viable solution for
> piuparts other to ignore changes in /etc/rcX.d/ from now on :/
Which would be very bad because piuparts should detect changes (e.g. forgotten
stuff) there excluding reorderings.
On Monday, 14. June 2010 18:33:19 Holger Levsen wrote:
> 1m23.6s INFO: Warning: Package purging left files on system:
> /etc/rc0.d/K02hwclock.sh not owned
> /etc/rc6.d/K02hwclock.sh not owned
>
> 1m23.6s ERROR: FAIL: After purging files have disappeared:
> /etc/rc0.d/K01hwclock.sh not owned
> /etc/rc6.d/K01hwclock.sh not owned
I added the following code block at the end of diff_meta_data (using piuparts
from SVN r690), just before the return statement to cleanup these renames:
# prune rc?.d symlinks renamed by insserv
pat1 = re.compile(r"^(/etc/rc.\.d/[SK])[0-9]{2}(.*)$")
for name1, data1 in removed[:]:
m = pat1.search(name1)
if m:
pat2 = re.compile(r"^" + m.group(1) + r"[0-9]{2}" + m.group(2) +
r"$")
for name2, data2 in new[:]:
m = pat2.search(name2)
if m:
logging.debug("File was renamed: %s\t=> %s" % (name1,
name2))
removed.remove((name1, data1))
new.remove((name2, data2))
This is my first attempt ever to hack python code, so there will be a better
solution of what I did. But you get the ideas.
(Sorry, not a real .diff, but there are more modifications I'll have to
separate first and report as new bugs.)
Andreas
More information about the Piuparts-devel
mailing list