From 348b7f9ab49e1fab2e31a6647d36baca8c8969ca Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 11 Aug 2016 07:50:47 +0200 Subject: [PATCH] builder: Add some printouts if we remove stale .pyc files This makes it easier to figure out why it disappeared --- builder/builder-module.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/builder-module.c b/builder/builder-module.c index c23c1fe9..759e2dcf 100644 --- a/builder/builder-module.c +++ b/builder/builder-module.c @@ -1104,8 +1104,10 @@ fixup_python_timestamp (int dfd, if (remove_pyc) { - if (unlinkat(dfd_iter.fd, dent->d_name, 0) != 0) - g_warning ("Unable to delete %s", dent->d_name); + g_autofree char *child_full_path = g_build_filename (full_path, dent->d_name, NULL); + g_print ("Removing stale python bytecode file %s\n", child_full_path); + if (unlinkat (dfd_iter.fd, dent->d_name, 0) != 0) + g_warning ("Unable to delete %s", child_full_path); continue; }