@@ -18,6 +18,8 @@ import shutil
18
18
from subprocess import check_call , check_output
19
19
import sys
20
20
from threading import Lock
21
+ from urllib .error import HTTPError
22
+ from urllib .request import urlopen
21
23
22
24
from lib import foreach_repo_parallel , github_post
23
25
from git import git_ids_and_branches , git_timestamp_id , git_datetime_id , git_archive_id
@@ -270,7 +272,7 @@ def dpkg_source(name, git, series):
270
272
271
273
return dsc_path , tar_path
272
274
273
- def dpkg_binary (dsc_path , name , git , series , build_arch , build_all ):
275
+ def dpkg_binary (dsc_path , name , git , series , build_arch , build_all , pockets ):
274
276
with open (dsc_path , "r" ) as fp :
275
277
dsc = Dsc (fp )
276
278
@@ -354,9 +356,18 @@ def dpkg_binary(dsc_path, name, git, series, build_arch, build_all):
354
356
"--extra-repository=deb http://ppa.launchpad.net/" + ppa_proposed + "/ubuntu " + series .codename + " main" ,
355
357
"--extra-repository=deb-src http://ppa.launchpad.net/" + ppa_proposed + "/ubuntu " + series .codename + " main" ,
356
358
"--extra-repository-key=" + path .join (POP_DIR , "scripts" , ppa_key ),
359
+ "--extra-repository-key=" + path .join (POP_DIR , "scripts" , ".pop-os.asc" ),
357
360
"--no-apt-distupgrade" ,
358
361
]
359
362
363
+ for (repo , _ ) in pockets :
364
+ try :
365
+ urlopen ("http://apt.pop-os.org/staging/{}/dists/{}/Release" .format (repo , series .codename ))
366
+ except HTTPError :
367
+ pass
368
+ else :
369
+ sbuild .append ("--extra-repository=deb http://apt.pop-os.org/staging/{} {} main" .format (repo , series .codename ))
370
+
360
371
if build_all :
361
372
sbuild .append ("--arch-all" )
362
373
@@ -404,7 +415,7 @@ def build_packages_thread(args):
404
415
if dsc_path and tar_path :
405
416
for build_arch in build_archs :
406
417
build_all = build_archs [build_arch ]
407
- deb_paths += dpkg_binary (dsc_path , name , git , series , build_arch , build_all )
418
+ deb_paths += dpkg_binary (dsc_path , name , git , series , build_arch , build_all , pockets )
408
419
return (name , git , series , pockets , dsc_path , tar_path , deb_paths )
409
420
410
421
def build_packages (name ):
0 commit comments