@@ -18,6 +18,8 @@ import shutil
1818from subprocess import check_call , check_output
1919import sys
2020from threading import Lock
21+ from urllib .error import HTTPError
22+ from urllib .request import urlopen
2123
2224from lib import foreach_repo_parallel , github_post
2325from 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):
270272
271273 return dsc_path , tar_path
272274
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 ):
274276 with open (dsc_path , "r" ) as fp :
275277 dsc = Dsc (fp )
276278
@@ -354,9 +356,18 @@ def dpkg_binary(dsc_path, name, git, series, build_arch, build_all):
354356 "--extra-repository=deb http://ppa.launchpad.net/" + ppa_proposed + "/ubuntu " + series .codename + " main" ,
355357 "--extra-repository=deb-src http://ppa.launchpad.net/" + ppa_proposed + "/ubuntu " + series .codename + " main" ,
356358 "--extra-repository-key=" + path .join (POP_DIR , "scripts" , ppa_key ),
359+ "--extra-repository-key=" + path .join (POP_DIR , "scripts" , ".pop-os.asc" ),
357360 "--no-apt-distupgrade" ,
358361 ]
359362
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+
360371 if build_all :
361372 sbuild .append ("--arch-all" )
362373
@@ -404,7 +415,7 @@ def build_packages_thread(args):
404415 if dsc_path and tar_path :
405416 for build_arch in build_archs :
406417 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 )
408419 return (name , git , series , pockets , dsc_path , tar_path , deb_paths )
409420
410421def build_packages (name ):
0 commit comments