-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Improvements for pool:
All
- support for colored output when output is stdout (on by default - configurable via
--color=...switch; probably values ofalways/never/default) - where relevant all commands should support multiple package names/stocks - i.e. batch processing.
pool-register
-
pool-registershould sync stock immediately - i.e. gather information about all binary & source packages available and calculate all possible versions, etc. - cache package names and versions provided by stock
pool-gc
-
pool-gcshould also support garbage collection given package name/s too. Support for a wildcard character (*?) might be of value too? - re support for package names; it is unlikely that there would be both a stock and a package name that are not directly related, but there should be a hierarchy of what it checks for - probably stock name first (i.e. basename of stock path), then if stock not found, fallback to checking for package name. An optional
#<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? - option to also remove any relevant packages that exist within the pool - perhaps warn if packages exist by default?
pool-unregister
-
pool-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. - Improve
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 unregister
pool-register
- currently fine
new pool-sync command
- new
pool-synccommand to explicitly sync stock/s. - should accept one or more stock name/s and/or paths - with option
#<branch_name>suffix.name/s and/or paths to sync - with optional#<branch_name>suffix. - support to sync all registered branches
- warning if branch checked out in source dir does not match
- should retain current behavior if no stocks given - i.e. sync all registered stocks if no additional args. Or perhaps an
-a|--allarg?
pool-refresh
- Notes on current behavior:
- currently
pool-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. - the implication of above is that the stock branch checked out on disk will be the registered after running this command.
- if more than one branch is checked out, command will fail
- currently
- leverage additional
pool-unregister/pool-gcfunctionality noted above to be more efficient. I.e.:- only garbage collect specific stocks being refreshed.
- support refreshing multiple stocks at the same time
- give better error message if stock not already registered (currently gives
- provide option to keep existing registered branch checked out.
- support refreshing multiple branches where more than one registered
- support for additional actions - such as run
git pull- or at leastgit fetch
pool-list & pool-get
- if
pool-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. - if
pool-listorpool-getare given package name/s without version, pool should only perform a sync of the relevant stocks by default. - if package/s are given and there is no package name match found in the cached information then pool should fail, with a hint to manually run a
pool-syncand/or ensure the source is registered as a stock. - if
--strictoption used, pool should warn ifmasterbranch is not being used.
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.