Comments (4)
To elaborate a bit, As a user I want fmf to
- clean after itself so my home/.cache stays clean
- clean old stuff so I free some space on disk
- fetch current remote so latest changes are present in metadata repository
At the moment we do git fetch
if last fetch was more than 20 minutes ago but it is not configurable.
So how about adding option instead of command? To be a bit inspired by dnf: there is --refresh
which forces metadata refresh and command 'dnf clean'
fmf --clean [time] [command]
fmf --refresh [command]
So if you don't want to keep cache, you use --clean
, fmf --clean
will erase existing.
To keep just recent cache fmf --clean 1d
if you recognize 1 day as recent ;)
Refresh all on fmf --refresh
from fmf.
@psss Thoughts? I'd try to implement it if you are OK with the above.
from fmf.
A couple of questions:
- Would the
--clean
option erase the cache before doing the command or after? With a separate command one could do both and it would be clear when the cleanup happens. - Anything cached longer than 20 minutes is currently fetched again, so it probably does not make sense to only clean up items older than 1d, anything between 1d and 2m will not be (re)used anyway
So far the command variant seems to me as a better solution but I might be overlooking possible advantages of the option solution.
from fmf.
So far the command variant seems to me as a better solution but I might be overlooking possible advantages of the option solution.
How would you do, with single command, following?
- As a user I want fmf to ignore cache and fetch repositories directly
UC: I've just pushed changes to the upstream
fmf --refresh [commnad]
- As a user I want fmf to clean after itself so no files are left in .cache.
fmf --clean [commnad]
UC: I'm on shared machine / don't have much space left - As a user I want fmf to ignore any cache (might not be there) and clean after itself.
fmf --refresh --clean [command]
I prefer single command as it is easier to 'alias' or recall from bash history or even copy&paste from help or IRC
Good point that --clean [time]
doesn't make sense.
from fmf.
Related Issues (20)
- Add type annotations to fmf code HOT 1
- Case-sensitivity of context adjusting is unclear HOT 4
- Add distro and arch info to guests.yaml
- Merging for nested dictionaries defined in root HOT 1
- Replace jsonschema.RefResolver as is being deprecated HOT 2
- RFE: Support for merging phase metadata when multiple phases are used HOT 1
- Api documentation
- `.fmf/config` allow to redefine tree root relatively
- `.fmf/config` define type/flavor of an fmf tree
- Python improvements
- More `dict` and `Path` like api
- New project `fmf-jinja`
- Migrate `tmt.utils.field` and `tmt.utils.DataContainer` to `fmf` HOT 4
- Rewriting `fmf.Tree`
- Add callback to all methods changing node data HOT 2
- Keeping the 'node' as an object even though it has children and is not a leaf HOT 1
- Support additions to context made by adjust rules for follow-up rules HOT 1
- Missing `sdist` in PyPI HOT 2
- Add operator for REGEX matching in context HOT 1
- `context` should always populate `path` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmf.