+
Skip to content

Feature request: allow integration with reflector #40

@Focshole

Description

@Focshole

I had thought about allowing pacoloco to be integrated with reflector generated files, i.e.:

# cache_dir: /var/cache/pacoloco
# port: 9129
download_timeout: 3600 # downloads will timeout if not completed after 3600 sec, 0 to disable timeout
purge_files_after: 2592000 # purge file after 30 days
repos:
  archlinux:
    mirrorlist: /etc/pacman.d/mirrorlist
prefetch: # optional section, add it if you want to enable prefetching
  cron: 0 0 3 * * * * # standard cron expression (https://en.wikipedia.org/wiki/Cron#CRON_expression) to define how frequently prefetch, see https://github.com/gorhill/cronexpr#implementation for documentation.
  ttl_unaccessed_in_days: 30  # defaults to 30, set it to a higher value than the number of consecutive days you don't update your systems
  # It deletes and stop prefetch packages(and db links) when not downloaded after ttl_unaccessed_in_days days that it had been updated.
  ttl_unupdated_in_days: 300 # defaults to 300, it deletes and stop prefetch packages which hadn't been either updated upstream or requested for ttl_unupdated_in_days.

Which parses the /etc/pacman.d/mirrorlist file to get the Server entries with some simple regexs, after stripping the $repo/os/$arch part. The file should be parsed each time before the prefetching routine is going to be executed, to ensure that the mirrors are updated

I could write it, I wrote this issue to discuss on corner cases/issues which may rise from such a feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载