diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portage/dbapi/vartree.py | 10 | ||||
-rw-r--r-- | lib/portage/util/movefile.py | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/portage/dbapi/vartree.py b/lib/portage/dbapi/vartree.py index beb1a6486..0c41d408c 100644 --- a/lib/portage/dbapi/vartree.py +++ b/lib/portage/dbapi/vartree.py @@ -5563,6 +5563,16 @@ class dblink: myabsto = myabsto.lstrip(sep) if self.settings and self.settings["D"]: if myto.startswith(self.settings["D"]): + self._eqawarn( + "preinst", + [ + _( + "QA Notice: Absolute symlink %s points to %s inside the image directory.\n" + "Removing the leading %s from its path." + ) + % (mydest, myto, self.settings["D"]) + ], + ) myto = myto[len(self.settings["D"]) - 1 :] # myrealto contains the path of the real file to which this symlink points. # we can simply test for existence of this file to see if the target has been merged yet diff --git a/lib/portage/util/movefile.py b/lib/portage/util/movefile.py index 75100a3ac..7b880d2e3 100644 --- a/lib/portage/util/movefile.py +++ b/lib/portage/util/movefile.py @@ -210,6 +210,11 @@ def movefile( try: target = os.readlink(src) if mysettings and "D" in mysettings and target.startswith(mysettings["D"]): + writemsg( + f"!!! {_('Absolute symlink points to image directory.')}\n", + noiselevel=-1, + ) + writemsg(f"!!! {dest} -> {target}\n", noiselevel=-1) target = target[len(mysettings["D"]) - 1 :] # Atomically update the path if it exists. try: |