Skip to content

Commit bec0043

Browse files
committed
Fix missing $arch in read_files for Media1
the problem was introduced in 92d45
1 parent c71e548 commit bec0043

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

script/scriptgen.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def gen_read_files(self, f):
688688
"REPOORS",
689689
"",
690690
"files_repo.lst",
691-
"files_repo_{}.lst".format(os.path.basename(repodir.attrib["folder"]).lstrip("*")),
691+
"files_repo_{}.lst".format(os.path.basename(repodir.attrib["folder"]).strip("*")),
692692
"ARCHORS",
693693
archs.replace(" ", "|").replace("armv7hl", "armv7hl|armv7l"),
694694
)
@@ -702,24 +702,26 @@ def gen_read_files(self, f):
702702
if not archs:
703703
archs = self.ag.archs
704704
wild = ""
705+
arch = ""
705706
done = ""
706707
if archs:
707708
wild = "*" + archs + "*"
708709
if "Leap" in self.ag.envdir or "Jump" in self.ag.envdir or self.version_from_media:
709710
if " " in archs and self.repodirs and "1" != repodir.attrib.get("multiarch", ""):
710711
self.p("for arch in {}; do".format(archs), f)
711712
wild = "*$arch*"
713+
arch = "$arch"
712714
done = "done"
713715

714716
for repodir in self.repodirs:
715717
selffolder = ""
716718
if self.folder:
717719
selffolder = "/" + self.folder
718720
if "/" in self.folder or "/" in repodir.attrib["folder"]:
719-
repopath = self.ag.productpath + selffolder + "/*" + repodir.attrib["folder"] + "*" + suffix
721+
repopath = self.ag.productpath + selffolder + "/*" + repodir.attrib["folder"] + wild
720722
else:
721723
repopath = (
722-
self.ag.productrepopath() + selffolder + "/*" + repodir.attrib["folder"] + "*" + suffix
724+
self.ag.productrepopath() + selffolder + "/*" + repodir.attrib["folder"] + wild
723725
)
724726

725727
Media1Replace = "*Media1"
@@ -732,7 +734,7 @@ def gen_read_files(self, f):
732734
repopath,
733735
"Media1.lst",
734736
"Media1_{}.lst".format(
735-
os.path.basename(repodir.attrib["folder"]).lstrip("*") + repodir.get("archs", "")
737+
os.path.basename(repodir.attrib["folder"]).strip("*") + repodir.get("archs", arch)
736738
),
737739
"*Media1",
738740
Media1Replace,
@@ -931,7 +933,7 @@ def gen_print_rsync_repo(self, f):
931933
cfg.rsync_remodir_multiarch,
932934
f,
933935
"files_repo.lst",
934-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
936+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
935937
"PRODUCTREPOPATH",
936938
self.productrepopath() + xtrapath + r.attrib["folder"],
937939
)
@@ -940,7 +942,7 @@ def gen_print_rsync_repo(self, f):
940942
cfg.rsync_remodir_multiarch_debug,
941943
f,
942944
"files_repo.lst",
943-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
945+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
944946
"PRODUCTREPOPATH",
945947
self.productrepopath() + xtrapath + r.attrib["folder"],
946948
"RSYNCFILTER",
@@ -974,7 +976,7 @@ def gen_print_rsync_repo(self, f):
974976
"PRODUCTREPOPATH",
975977
self.productpath() + xtrapath + r.attrib["folder"] + suffix,
976978
"files_repo.lst",
977-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
979+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
978980
"Media2",
979981
"Media1",
980982
"-debuginfo",
@@ -995,7 +997,7 @@ def gen_print_rsync_repo(self, f):
995997
"PRODUCTREPOPATH",
996998
self.productpath() + xtrapath + r.attrib["folder"] + suffix,
997999
"files_repo.lst",
998-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
1000+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
9991001
"RSYNCFILTER",
10001002
" --include=PACKAGES --exclude={aarch64,armv7hl,i586,i686,noarch,nosrc,ppc64,ppc64le,riscv64,s390x,src,x86_64}/*".replace(
10011003
"PACKAGES", r.attrib["debug"]
@@ -1015,7 +1017,7 @@ def gen_print_rsync_repo(self, f):
10151017
"PRODUCTREPOPATH",
10161018
self.productpath() + xtrapath + r.attrib["folder"] + suffix,
10171019
"files_repo.lst",
1018-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
1020+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
10191021
"RSYNCFILTER",
10201022
" --include=PACKAGES --exclude={aarch64,armv7hl,i586,i686,noarch,nosrc,ppc64,ppc64le,riscv64,s390x,src,x86_64}/*".replace(
10211023
"PACKAGES", r.attrib["source"]
@@ -1245,7 +1247,7 @@ def gen_print_openqa(self, f):
12451247
cfg.openqa_call_repot2.format(media_filter),
12461248
f,
12471249
"files_repo.lst",
1248-
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).lstrip("*")),
1250+
"files_repo_{}.lst".format(os.path.basename(r.attrib["folder"]).strip("*")),
12491251
"DEBUG_PACKAGES",
12501252
r.attrib.get("debug", "").strip("{}"),
12511253
"SOURCE_PACKAGES",

0 commit comments

Comments
 (0)