Skip to content

Commit

Permalink
scripts/update-image: preserve udev's hwdb
Browse files Browse the repository at this point in the history
  • Loading branch information
no92 committed Feb 6, 2025
1 parent cfd3d77 commit ad47334
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/update-image.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def generate_plan(arch, root_uuid, scriptdir):
yield FsAction.RSYNC, "sbin"
yield FsAction.RSYNC, "root/"
yield FsAction.RSYNC, "usr/"
yield FsAction.RSYNC, "etc/"
yield FsAction.RSYNC, "etc/", ["udev/hwdb.bin"]
yield FsAction.RSYNC, "var/"
yield FsAction.RSYNC, "home/"

Expand Down Expand Up @@ -554,10 +554,14 @@ def plan_install(source, dest, ignore_sysroot=False):

steps.append(["install", source, target])

def plan_rsync(dir):
def plan_rsync(dir, exclude_files=[]):
source = os.path.join(self.sysroot, dir)
target = os.path.join(target_mntpoint, dir)
steps.append(["rsync", "-a", "--delete", source, target])
command = ["rsync", "-a", "--delete", source, target]
if exclude_files:
for f in exclude_files:
command.append(f"--exclude={os.path.join(f)}")
steps.append(command)

def plan_cp(source, dest):
target = os.path.join(target_mntpoint, dest)
Expand Down

0 comments on commit ad47334

Please sign in to comment.