Skip to content

Commit

Permalink
vartree: update owner and mode on replaced directories
Browse files Browse the repository at this point in the history
Signed-off-by: Henning Schild <henning@hennsch.de>
  • Loading branch information
henning-schild committed Sep 20, 2024
1 parent 7b7b261 commit 86f26cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/portage/dbapi/vartree.py
Original file line number Diff line number Diff line change
Expand Up @@ -5703,6 +5703,15 @@ def mergeme(
):
# a symlink to an existing directory will work for us; keep it:
showMessage(f"--- {mydest}/\n")
# update owner and mode on existing directories
if stat.S_ISDIR(mydmode):
if (
mydstat.st_uid != mystat.st_uid
or mydstat.st_gid != mystat.st_gid
):
os.chown(mydest, mystat[4], mystat[5])
if mydmode != mymode:
os.chmod(mydest, mystat[0])
if bsd_chflags:
bsd_chflags.lchflags(mydest, dflags)
else:
Expand Down

0 comments on commit 86f26cb

Please sign in to comment.