Skip to content

Commit

Permalink
Merge pull request #2550 from DaanDeMeyer/socket
Browse files Browse the repository at this point in the history
kernel-install: Don't copy pacman gpg sockets
  • Loading branch information
DaanDeMeyer authored Mar 25, 2024
2 parents c5cfac1 + 4604084 commit b97afb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Run ruff
run: |
ruff --version
ruff mkosi/ tests/ kernel-install/50-mkosi.install
ruff check mkosi/ tests/ kernel-install/50-mkosi.install
- name: Check that tabs are not used in code
run: sh -c '! git grep -P "\\t" "*.py"'
Expand Down
7 changes: 5 additions & 2 deletions kernel-install/50-mkosi.install
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ from mkosi.archive import make_cpio
from mkosi.config import OutputFormat, __version__
from mkosi.log import die, log_setup
from mkosi.run import find_binary, run, uncaught_exception_handler
from mkosi.tree import copy_tree
from mkosi.types import PathString
from mkosi.util import umask

Expand Down Expand Up @@ -176,7 +175,11 @@ def main() -> None:
continue

(Path(d) / "etc" / p).parent.mkdir(parents=True, exist_ok=True)
copy_tree(Path("/etc") / p, Path(d) / "etc" / p, dereference=True)
if (Path("/etc") / p).resolve().is_file():
shutil.copy2(Path("/etc") / p, Path(d) / "etc" / p)
else:
shutil.copytree(Path("/etc") / p, Path(d) / "etc" / p,
ignore=shutil.ignore_patterns("S.*"), dirs_exist_ok=True)

cmdline += ["--package-manager-tree", d]

Expand Down

0 comments on commit b97afb1

Please sign in to comment.