File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,16 @@ def create_package(self, out_path: str | os.PathLike):
9191
9292 extension = ".deb"
9393
94- if not str (out_path ).endswith (extension ):
95- out_path = Path (f"{ out_path } { extension } " )
94+ # remove extension temporarily so we can insert the build architecture (if needed)
95+ out_path = str (out_path ).removesuffix (extension )
96+
97+ architecture = self .meta_info .get ("architecture" )
98+
99+ if architecture :
100+ out_path += f"_{ architecture } "
101+
102+ # (re-)add extension which either was lacking all the time or has been removed earlier
103+ out_path += extension
96104
97105 self .copy_appdir_contents ()
98106 self .copy_data_to_usr ()
Original file line number Diff line number Diff line change @@ -174,10 +174,20 @@ def generate_rpm(self, out_path: str):
174174 shutil .move (built_rpms [0 ], out_path )
175175
176176 def create_package (self , out_path : str | os .PathLike ):
177+ logger .info (f"Creating RPM package called { out_path } " )
178+
177179 extension = ".rpm"
178180
179- if not str (out_path ).endswith (extension ):
180- out_path = Path (f"{ out_path } { extension } " )
181+ # remove extension temporarily so we can insert the build architecture (if needed)
182+ out_path = str (out_path ).removesuffix (extension )
183+
184+ build_arch = self .meta_info .get ("build_arch" )
185+
186+ if build_arch :
187+ out_path += f"_{ build_arch } "
188+
189+ # (re-)add extension which either was lacking all the time or has been removed earlier
190+ out_path += extension
181191
182192 self .copy_appdir_contents ()
183193 self .copy_data_to_usr ()
You can’t perform that action at this time.
0 commit comments