[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.47-17-ga7f2df4
Andreas Beckmann
debian at abeckmann.de
Sat Nov 3 00:08:37 UTC 2012
The following commit has been merged in the piatti branch:
commit 9aa46a606e70ba04f8dc3ad9977211fb220add94
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Thu Oct 4 01:56:50 2012 +0200
p: report paths that contain symlinks
pkg1: /usr/share/foo -> bar
pkg2: /usr/share/foo/foo.dat
- usually an error prone setup, result depends on unpack order
- what happens if pkg1 decides to point the link somewhere else?
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/debian/changelog b/debian/changelog
index 4dfb605..96bdccb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ piuparts (0.48) UNRELEASED; urgency=low
- Ignore *.dpkg-* conffile backups found in --scriptsdir directories.
- Report attributes (for reference and current file) in case of file
modification.
+ - Report paths of installed files that contain symlinks (for better
+ debugging of the problems caused by such a setup).
+ ( test $(dirname $x) != $(readlink -f $(dirname $x)) )
* piuparts-master.py:
- Enable recycling before initializing the real package db.
* piuparts-slave.py:
diff --git a/piuparts.py b/piuparts.py
index 25db4d7..7db559e 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1144,6 +1144,18 @@ class Chroot:
if not ignore_errors:
panic()
+ def list_paths_with_symlinks(self):
+ file_owners = self.get_files_owned_by_packages()
+ bad = []
+ for f in sorted(file_owners.keys()):
+ dn, fn = os.path.split(f)
+ dc = canonicalize_path(self.name, dn)
+ if dn != dc:
+ bad.append("%s != %s (%s)" %(f, os.path.join(dc, fn), ", ".join(file_owners[f])))
+ if bad:
+ logging.info("dirname part contains a symlink:\n%s" %
+ indent_string("\n".join(bad)))
+
def remove_packages(self, packages):
"""Remove packages in a chroot."""
if packages:
@@ -1182,6 +1194,7 @@ class Chroot:
deps_to_install = [name for name, state in deps.iteritems()
if state == "install"]
+ self.list_paths_with_symlinks()
self.check_debsums()
# Run custom scripts before removing all packages.
--
piuparts git repository
More information about the Piuparts-commits
mailing list