Improvements for pool:
All
pool-register
pool-gc
pool-unregister
pool-register
new pool-sync command
pool-refresh
pool-list & pool-get
See also related issue: #2070
Implementation thoughts...
The new pool-get/pool-list behavior could be implemented by reading all the file names in .pool/stocks/<stock_source>#<branch_name>/index-sources/. Each file found maps to <binary_package_name>. E.g. in the case of webmin`:
root@tkldev-pkg .../pools/trixie-amd64# ls .pool/stocks/webmin#2.520/index-sources/
webmin webmin-cluster-shell webmin-filemin webmin-iscsi-target [...]
If any package names passed to pool-get/pool-list also have version specified (e.g. pool=1.2.0rc4) then the availability of the version can be read from the relevant file - which is a newline separated list of available versions. If the desired version is not found, only then is a sync worth doing. E.g. in the case of the pool package (master branch in stock) the .pool/stocks/pool#master/index-sources/pool file contains:
root@tkldev-pkg .../pools/trixie-amd64# head .pool/stocks/pool#master/index-sources/pool
1.2.0rc6
1.2.0rc5+2+gfbb4559
1.2.0rc5+1+g8cbdb93
1.2.0rc5
1.2.0rc4+1+gdac63f3
1.2.0rc4
1.2.0rc2+15+g9281349
1.2.0rc2+14+gd2dd62d
1.2.0rc2+13+g5772491
1.2.0rc2+12+g70bb225
1.2.0rc2+11+g7dc79f0
Given that scenario, if a user runs pool-info pool=1.2.0rc5, then after finding and reading that file, no further work is required.
Improvements for pool:
All
--color=...switch; probably values ofalways/never/default)pool-registerpool-registershould sync stock immediately - i.e. gather information about all binary & source packages available and calculate all possible versions, etc.pool-gcpool-gcshould also support garbage collection given package name/s too. Support for a wildcard character (*?) might be of value too?#<branch_name>suffix could also be supported - e.g.tklbam#master. Perhaps a#branchsuffix should be required if multiple branches of the same git stock are registered? Or perhaps all branches should be refreshed?pool-unregisterpool-unregistershould accept either a stock source dir (e.g./turkey/public/tklbam) or just the stock name (e.g.tklbam). See similar feature request forpool-gcfor more ideas/details.pool-unregistererror message if stock not registered. I.e. include stock path in message; specifically useful if mutliple stocks being refreshed. FYI currently the error is simplyerror: no matches for unregisterpool-registernew
pool-synccommandpool-synccommand to explicitly sync stock/s.#<branch_name>suffix.name/s and/or paths to sync - with optional#<branch_name>suffix.-a|--allarg?pool-refreshpool-refreshrequires a stock source path and it's behavior is the same as runningpool-unregister /path/to/stock && pool-gc && pool-register /path/to/stock.pool-unregister/pool-gcfunctionality noted above to be more efficient. I.e.:git pull- or at leastgit fetchpool-list&pool-getpool-listorpool-getare only given package/s with a version (i.e.<binary_package_name>=<version>; e.g.deck=1.1), if package and version are already available pool should skip sync altogether. For any versions requested but not found, pool can then sync the relevant stock/s.pool-listorpool-getare given package name/s without version, pool should only perform a sync of the relevant stocks by default.pool-syncand/or ensure the source is registered as a stock.--strictoption used, pool should warn ifmasterbranch is not being used.See also related issue: #2070
Implementation thoughts...
The new
pool-get/pool-listbehavior could be implemented by reading all the file names in.pool/stocks/<stock_source>#<branch_name>/index-sources/. Each file found maps to<binary_package_name>. E.g. in the case ofwebmin`:If any package names passed to
pool-get/pool-listalso have version specified (e.g.pool=1.2.0rc4) then the availability of the version can be read from the relevant file - which is a newline separated list of available versions. If the desired version is not found, only then is a sync worth doing. E.g. in the case of the pool package (master branch in stock) the.pool/stocks/pool#master/index-sources/poolfile contains:Given that scenario, if a user runs
pool-info pool=1.2.0rc5, then after finding and reading that file, no further work is required.