mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
aurblup: Drop support for multiple servers
Support for multiple servers has never been used by the official aurweb setup and the current implementation makes it impossible to use server URIs that contain spaces. For simplicity, change the implementation such that only a single server is supported. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
d00f4c5197
commit
cc66259d33
2 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ max-blob-size = 256000
|
||||||
[aurblup]
|
[aurblup]
|
||||||
db-path = /srv/http/aurweb/aurblup/
|
db-path = /srv/http/aurweb/aurblup/
|
||||||
sync-dbs = core extra community multilib testing community-testing
|
sync-dbs = core extra community multilib testing community-testing
|
||||||
servers = ftp://mirrors.kernel.org/archlinux/%s/os/x86_64
|
server = ftp://mirrors.kernel.org/archlinux/%s/os/x86_64
|
||||||
|
|
||||||
[mkpkglists]
|
[mkpkglists]
|
||||||
packagesfile = /srv/http/aurweb/web/html/packages.gz
|
packagesfile = /srv/http/aurweb/web/html/packages.gz
|
||||||
|
|
|
@ -8,7 +8,7 @@ import aurweb.db
|
||||||
|
|
||||||
db_path = aurweb.config.get('aurblup', 'db-path')
|
db_path = aurweb.config.get('aurblup', 'db-path')
|
||||||
sync_dbs = aurweb.config.get('aurblup', 'sync-dbs').split(' ')
|
sync_dbs = aurweb.config.get('aurblup', 'sync-dbs').split(' ')
|
||||||
servers = aurweb.config.get('aurblup', 'servers').split(' ')
|
server = aurweb.config.get('aurblup', 'server')
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -19,7 +19,7 @@ def main():
|
||||||
h = pyalpm.Handle("/", db_path)
|
h = pyalpm.Handle("/", db_path)
|
||||||
for sync_db in sync_dbs:
|
for sync_db in sync_dbs:
|
||||||
repo = h.register_syncdb(sync_db, pyalpm.SIG_DATABASE_OPTIONAL)
|
repo = h.register_syncdb(sync_db, pyalpm.SIG_DATABASE_OPTIONAL)
|
||||||
repo.servers = [server.replace("%s", sync_db) for server in servers]
|
repo.servers = [server.replace("%s", sync_db)]
|
||||||
t = h.init_transaction()
|
t = h.init_transaction()
|
||||||
repo.update(False)
|
repo.update(False)
|
||||||
t.release()
|
t.release()
|
||||||
|
|
Loading…
Add table
Reference in a new issue