@@ -31,13 +31,13 @@ cdef class Config:
3131 self ._repos = Repos.from_config(self .ptr)
3232 return self ._repos
3333
34- cdef Repo add_repo_path(self , object path, object id , int priority):
34+ cdef Repo add_repo_path(self , object path, object id , int priority, bint external = True ):
3535 """ Add an external repo via its file path and return its pointer."""
3636 path = str (path)
3737 id = str (id ) if id is not None else path
3838
3939 cdef C.Repo * ptr = C.pkgcraft_config_add_repo_path(
40- self .ptr, id .encode(), int (priority), path.encode())
40+ self .ptr, id .encode(), int (priority), path.encode(), external )
4141 if ptr is NULL :
4242 raise PkgcraftError
4343
@@ -46,13 +46,13 @@ cdef class Config:
4646
4747 return Repo.from_ptr(ptr, False )
4848
49- def add_repo (self , repo not None , id = None , priority = 0 ):
49+ def add_repo (self , repo not None , id = None , priority = 0 , external = False ):
5050 """ Add an external repo via its file path or from a Repo object."""
5151 if isinstance (repo, (str , os.PathLike)):
5252 path = str (repo)
53- return self .add_repo_path(path, id , priority)
53+ return self .add_repo_path(path, id , priority, external )
5454 else :
55- if C.pkgcraft_config_add_repo(self .ptr, (< Repo?> repo).ptr) is NULL :
55+ if C.pkgcraft_config_add_repo(self .ptr, (< Repo?> repo).ptr, external ) is NULL :
5656 raise ConfigError
5757 self ._repos = None
5858 return repo
0 commit comments