@@ -167,6 +167,7 @@ def __init__(self, name, actionGenerator):
167167 self .asset_rsync = {}
168168 self .norsync = {}
169169 self .isos = []
170+ self .isos_fixed = []
170171 self .iso_folder = {}
171172 self .iso_5 = ""
172173 self .fixed_iso = ""
@@ -309,6 +310,10 @@ def p(
309310 if self .ag .domain :
310311 s = s .replace ("opensuse.org" , self .ag .domain )
311312 s = s .replace ("REPOLINK" , self .repolink )
313+ fixediso = "0"
314+ if self .isos_fixed :
315+ fixediso = "1"
316+ s = s .replace ("FIXEDISO" , fixediso )
312317 print (s , file = f )
313318
314319 def doFlavor (self , node ):
@@ -340,13 +345,14 @@ def doFlavor(self, node):
340345 self .fixed_iso = node .attrib ["fixed_iso" ]
341346 if node .attrib .get ("rsync" , "1" ) == "0" :
342347 self .norsync [f ] = 1
343-
344- if node .attrib .get ("iso" , "" ) and node .attrib .get ("name" , "" ):
348+ iso_attrib = node .attrib .get ("iso" , "" )
349+ if iso_attrib .endswith (".iso" ):
350+ self .isos_fixed .append (iso_attrib )
351+ elif iso_attrib and node .attrib .get ("name" , "" ):
345352 for iso in node .attrib ["name" ].split ("|" ):
346353 if node .attrib .get ("folder" , "" ):
347354 # self.iso_path = node.attrib["folder"]
348355 self .iso_folder [iso ] = node .attrib ["folder" ]
349- iso_attrib = node .attrib ["iso" ]
350356 if iso_attrib == "extract_as_repo" :
351357 self .iso_extract_as_repo [iso ] = 1
352358 elif iso_attrib != "1" :
@@ -382,7 +388,7 @@ def doFlavor(self, node):
382388 self .archs_repo = t .attrib ["archs" ]
383389
384390 for t in node .findall (".//repos/*" ):
385- if t .get ("multiarch" , "" ):
391+ if t .get ("multiarch" , "" ) and not self . isos_fixed :
386392 self .reposmultiarch .append (t )
387393 continue
388394
@@ -590,6 +596,12 @@ def gen_read_files(self, f):
590596 ".iso$" ,
591597 )
592598
599+ if self .isos_fixed :
600+ self .p ("for arch in ARCHITECTURS; do" , f )
601+ for iso in self .isos_fixed :
602+ self .p (" echo {} >> __envsub/files_iso.lst" .format (iso ), f )
603+ self .p ("done" , f )
604+
593605 if self .repolink :
594606 self .p (cfg .read_files_repo_link , f )
595607 if self .repolink and self .build_id_from_iso :
@@ -659,13 +671,14 @@ def gen_read_files(self, f):
659671 suffix = ""
660672 if repodir .attrib .get ("suffix" ):
661673 suffix = repodir .attrib ["suffix" ]
662- repopath = ""
674+
675+ selffolder = ""
676+ if self .folder :
677+ selffolder = "/" + self .folder
663678 if "/" in self .folder or "/" in repodir .attrib ["folder" ]:
664- repopath = self .ag .productpath + "/" + self . folder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
679+ repopath = self .ag .productpath + selffolder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
665680 else :
666- repopath = (
667- self .ag .productrepopath () + "/" + self .folder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
668- )
681+ repopath = self .ag .productrepopath () + selffolder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
669682
670683 args = (
671684 cfg .read_files_repo ,
@@ -680,7 +693,7 @@ def gen_read_files(self, f):
680693 archs .replace (" " , "|" ).replace ("armv7hl" , "armv7hl|armv7l" ),
681694 )
682695 if self .media1 == "0" :
683- args += ("| grep -P 'Media[1-3](.license)?$'" , "" )
696+ args += ("| grep -P 'Media[1-3](.license)?$'" , "| grep -v .license " )
684697 self .p (* args )
685698
686699 # let's sync media.1/media to be able verify build_id
@@ -693,21 +706,36 @@ def gen_read_files(self, f):
693706 if archs :
694707 wild = "*" + archs + "*"
695708 if "Leap" in self .ag .envdir or "Jump" in self .ag .envdir or self .version_from_media :
696- if " " in archs and self .repodirs :
709+ if " " in archs and self .repodirs and "1" != repodir . attrib . get ( "multiarch" , "" ) :
697710 self .p ("for arch in {}; do" .format (archs ), f )
698711 wild = "*$arch*"
699712 done = "done"
700713
701714 for repodir in self .repodirs :
715+ selffolder = ""
716+ if self .folder :
717+ selffolder = "/" + self .folder
718+ if "/" in self .folder or "/" in repodir .attrib ["folder" ]:
719+ repopath = self .ag .productpath + selffolder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
720+ else :
721+ repopath = (
722+ self .ag .productrepopath () + selffolder + "/*" + repodir .attrib ["folder" ] + "*" + suffix
723+ )
724+
725+ Media1Replace = "*Media1"
726+ if self .media1 == "0" :
727+ Media1Replace = "*"
702728 self .p (
703729 cfg .read_files_repo_media ,
704730 f ,
705731 "PRODUCTREPOPATH" ,
706- self . ag . productpath + "/" + self . folder + "/*" + repodir . attrib [ "folder" ] + wild ,
732+ repopath ,
707733 "Media1.lst" ,
708734 "Media1_{}.lst" .format (
709735 os .path .basename (repodir .attrib ["folder" ]).lstrip ("*" ) + repodir .get ("archs" , "" )
710736 ),
737+ "*Media1" ,
738+ Media1Replace ,
711739 )
712740
713741 if done :
@@ -898,6 +926,30 @@ def gen_print_rsync_repo(self, f):
898926 for r in self .repodirs :
899927 if r .attrib .get ("gen" , "" ):
900928 continue
929+ if self .media1 == "0" and "1" == r .attrib .get ("multiarch" , "" ):
930+ self .p (
931+ cfg .rsync_remodir_multiarch ,
932+ f ,
933+ "files_repo.lst" ,
934+ "files_repo_{}.lst" .format (os .path .basename (r .attrib ["folder" ]).lstrip ("*" )),
935+ "PRODUCTREPOPATH" ,
936+ self .productrepopath () + xtrapath + r .attrib ["folder" ],
937+ )
938+ if r .attrib .get ("debug" , "" ):
939+ self .p (
940+ cfg .rsync_remodir_multiarch_debug ,
941+ f ,
942+ "files_repo.lst" ,
943+ "files_repo_{}.lst" .format (os .path .basename (r .attrib ["folder" ]).lstrip ("*" )),
944+ "PRODUCTREPOPATH" ,
945+ self .productrepopath () + xtrapath + r .attrib ["folder" ],
946+ "RSYNCFILTER" ,
947+ " --include=PACKAGES --exclude={aarch64,armv7hl,i586,i686,noarch,nosrc,ppc64,ppc64le,riscv64,s390x,src,x86_64}/*" .replace (
948+ "PACKAGES" , r .attrib ["debug" ]
949+ ),
950+ )
951+ continue
952+
901953 if not r .attrib .get ("dest" , "" ):
902954 self .p (cfg .rsync_repodir1 , f , "mid=''" , "mid='{}'" .format (r .attrib .get ("mid" , "" )))
903955 elif self .media1 == "0" :
0 commit comments