⚠ This page contains old, outdated, obsolete, … historic or WIP content! No warranties e.g. for correctness!
All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
RFC: New pkgtools features
Yesterday, I posted the following proposal to the mailing list. I am putting it here, too, for future reference.
I have been thinking about how we can improve the pkgtools with some new and useful features. There are two that would be easy to implement and would give us some kind of "poor man's apt":
Replace PKG_PATH, which at the moment is either a single URL or a colon-separated list of local paths, by a simple config file. It could also include a few other directives, like the default pager for MESSAGE files. I am thinking of the following:
Pager=less Source=1,/usr/ports/Packages Source=255,https://www.mirbsd.org/MirOS/Packages/i386/
The "source" lines are just local paths or URLs with a priority value, where 0 is the highest one.
For http, we have the problem of getting the file names. I propose to put an index.txt file, with just one filename per line, into each "repository". The indices might be cached so that we know what files are where. For http, we could even automatically update by using an "If-Changed-Since" header, or have something akin to "apt-get update".
It would be very easy to just search the repos in order of priority and take the first match for the pkgspec given. Or we could use findbestmatchingname() to decide which package to take.
These changes can be implemented in a reasonable amount of time, I think. Maybe during the CCC?