forked from images/gitea-image-forge
Add only normal files from packages in distroless-builder.py
This commit is contained in:
parent
bbec7f6270
commit
61bcc5c283
@ -35,11 +35,13 @@ class DL:
|
|||||||
write_globs(is_glob, line, dl_file)
|
write_globs(is_glob, line, dl_file)
|
||||||
for package in packages:
|
for package in packages:
|
||||||
proc = subprocess.run(
|
proc = subprocess.run(
|
||||||
["rpm", "-ql", package], stdout=subprocess.PIPE
|
["rpm", "-qls", package], stdout=subprocess.PIPE
|
||||||
)
|
)
|
||||||
proc.check_returncode()
|
proc.check_returncode()
|
||||||
for line in proc.stdout.decode().splitlines():
|
for line in proc.stdout.decode().splitlines():
|
||||||
dl_file.write(ensuere_one_endl(line))
|
state, filename = line.split(maxsplit=1)
|
||||||
|
if state == "normal":
|
||||||
|
dl_file.write(ensuere_one_endl(filename))
|
||||||
|
|
||||||
def tar(self, outfile, regexes):
|
def tar(self, outfile, regexes):
|
||||||
def filter(tarinfo):
|
def filter(tarinfo):
|
||||||
|
Loading…
Reference in New Issue
Block a user