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):
91
91
92
92
extension = ".deb"
93
93
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
96
104
97
105
self .copy_appdir_contents ()
98
106
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):
174
174
shutil .move (built_rpms [0 ], out_path )
175
175
176
176
def create_package (self , out_path : str | os .PathLike ):
177
+ logger .info (f"Creating RPM package called { out_path } " )
178
+
177
179
extension = ".rpm"
178
180
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
181
191
182
192
self .copy_appdir_contents ()
183
193
self .copy_data_to_usr ()
You can’t perform that action at this time.
0 commit comments