Skip to content

Commit

Permalink
docs: Update changelog, readme, comparison, contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdephily committed Nov 4, 2023
1 parent 8057bd3 commit 1c68ddf
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 70 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
* Improve predict's `tmpdir`:
- Autodetect `tmpdir` using currently running emerge processes
- Support multiple `--tmpdir` arguments
* Passing `--resume` without argument is now the same as `--resume main`
* Improve output selection:
- `--tabs` has been renamed `--output=tab/cols` (or `-ot` for short)
- Default output is now `cols` on tty and `tab` otherwise, to simplify `emlop ...|cut -f...` workflow
* Improve resume list selection:
- Added `--resume=any` variant to resume either main or backup list
- Passing `--resume` without argument is now the same as `--resume any`
* Remove `--resume=auto` and `--color=auto` variants (just don't pass the option)
* Upgraded clap dependency
- Inline help styling/content changed a bit

Expand Down
93 changes: 48 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,78 @@ ergonomic, see [comparison](docs/COMPARISON.md).

## Usage

Emlop is split into commands. Command names and arguments can be abbreviated, and shell completion is available. See `emlop --help` and `emlop <sucommand> --help`
for complete and up to date usage info.
Emlop is split into commands. Command names and arguments can be abbreviated, and shell completion
is available. See `emlop --help` and `emlop <sucommand> --help` for complete and up to date usage
info.

### Common options

All commands share these arguments, affecting parsing and output:

OPTIONS:
-F, --logfile <file> Location of emerge log file. [default: /var/log/emerge.log]
-v Increase verbosity (can be given multiple times).
-h, --help Show short (-h) or detailed (--help) help.
FILTER:
-f, --from <date> Only parse log entries after <date>.
-t, --to <date> Only parse log entries before <date>.
FORMAT:
-H, --header Show table header
--utc Parse/display dates in UTC instead of local time
--tabs Separate columns using tabs instead of spaces
--duration <format> Output durations in different formats. [default: hms]
--date <format> Output dates in different formats. [default: ymdhms]
--color <when> Enable color (auto/always/never/y/n). [default: auto]


### List merges, unmerges, and rsyncs with `log`
Options:
-F, --logfile <file> Location of emerge log file [default: /var/log/emerge.log]
-v... Increase verbosity (can be given multiple times)
-h, --help Print help (see more with '--help')
-V, --version Print version
Filter:
-f, --from <date> Only parse log entries after <date>
-t, --to <date> Only parse log entries before <date>
Format:
-H, --header Show table header
--utc Parse/display dates in UTC instead of local time
-o, --output <format> Ouput format (cols/c/tab/t)
--duration <format> Output durations in different formats [default: hms]
--date <format> Output dates in different formats [default: ymdhms]
--color [<when>] Enable color (always/never/y/n)


### List merges, unmerges, and syncs with `log`

![Log demo](log.webp)

Log-specific options:

FILTER:
<package> Show only packages matching <package>.
-e, --exact Match package with a string instead of a regex.
-s, --show <m,u,s,a> Show (m)erges, (u)nmerges, (s)yncs, and/or (a)ll. [default: m]
-N, --first <num> Show only the first <num> entries.
-n, --last <num> Show only the last <num> entries.
Filter:
[search]... Show only packages/repos matching <search>
-e, --exact Match <search> using plain string
-s, --show <m,u,s,a> Show (m)erges, (u)nmerges, (s)yncs, and/or (a)ll [default: m]
-N, --first [<num>] Show only the first <num> entries
-n, --last [<num>] Show only the last <num> entries

Note that `emaint sync` currently [doesn't write to emerge.log](https://bugs.gentoo.org/553788), so
`emlop l --show s` will appear empty if you use `emaint`. Use `emerge --sync` or `eix-sync` instead.

### Estimate how long a merge with take with `predict`

![Predict demo](predict.webp)

Predict-specific arguments:

OPTIONS:
--tmpdir <dir> Location of portage tmpdir. [default: /var/tmp]
--resume <source> Use auto, main, backup, or no portage resume list [default: auto]
FILTER:
-s, --show <e,m,t,a> Show (e)emerge processes, (m)erges, (t)otal, and/or (a)ll. [default:
emt]
-N, --first <num> Show only the first <num> entries.
-n, --last <num> Show only the last <num> entries.
STATS:
--limit <num> Use the last <num> merge times to predict durations. [default: 10]
--avg <fn> Select function used to predict durations. [default: median]

Options:
--tmpdir <dir> Location of portage tmpdir [default: /var/tmp]
--resume [<source>] Use main, backup, any, or no portage resume list
Filter:
-s, --show <e,m,t,a> Show (e)emerge processes, (m)erges, (t)otal, and/or (a)ll [default: emt]
-N, --first [<num>] Show only the first <num> entries
-n, --last [<num>] Show only the last <num> entries
Stats:
--limit <num> Use the last <num> merge times to predict durations [default: 10]
--avg <fn> Select function used to predict durations [default: median]

### Show aggregated statistics with `stats`

![Stats demo](stats.webp)

Stats-specific arguments:

FILTER:
<package> Show only packages matching <package>.
-e, --exact Match package with a string instead of a regex.
-s, --show <p,t,s,a> Show (p)ackages, (t)otals, (s)yncs, and/or (a)ll. [default: p]
STATS:
-g, --groupby <y,m,w,d> Group by (y)ear, (m)onth, (w)eek, or (d)ay.
--limit <num> Use the last <num> merge times to predict durations. [default: 10]
--avg <fn> Select function used to predict durations. [default: median]
Filter:
[search]... Show only packages/repos matching <search>
-e, --exact Match <search> using plain string
-s, --show <p,t,s,a> Show (p)ackages, (t)otals, (s)yncs, and/or (a)ll [default: p]
Stats:
-g, --groupby <y,m,w,d> Group by (y)ear, (m)onth, (w)eek, or (d)ay
--limit <num> Use the last <num> merge times to predict durations [default: 10]
--avg <fn> Select function used to predict durations [default: median]

### Other commands

Expand Down
3 changes: 2 additions & 1 deletion docs/COMPARISON.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ piping `emerge -rOp` would do).
Genlop has multiple estimation bugs where data get mixed up (different categories, parallel merges,
etc). `Genlop -p` doesn't take current elapsed emerge time into account. When run as a normal user,
qlop warns about missing /proc permissions, finds bogus current merges, and doesn't give the same
ETA for the ones it finds.
ETA for the ones it finds. The linuxhowtos db is unmaintained and unlikely to contain info for your
CPU and ebuilds.

All tools give pessimistic prediction when packages are merged in parallel, because they assume
sequential merging. Even if they detected an ongoing parallel merge, it's not clear how they would
Expand Down
40 changes: 17 additions & 23 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,35 @@ Thank you for taking the time to contribute.
Follow the [Rust](https://www.rust-lang.org/en-US/conduct.html) and
[Gentoo](https://wiki.gentoo.org/wiki/Project:Council/Code_of_conduct) codes of conduct.

## Reporting bugs and feature requests
## Reporting bugs or feature requests

Please create issues via [Github](https://github.com/vincentdephily/emlop/issues). You might want to
peek at the [roadmap](ROADMAP.md) for inspiration.
Please create issues via [Github](https://github.com/vincentdephily/emlop/issues). Check existing
issues, and make sure you're running the latest version.

## Submitting patches
## Sending patches

Send pull requests to [Github](https://github.com/vincentdephily/emlop).
Emlop is licensed as GPLv3, any contribution accepted into the emlop repo will have that license.
Send pull requests via [Github](https://github.com/vincentdephily/emlop).

Make sure to `cargo test -- --include-ignored` before submitting your code. A bugfix should probably
include an updated unittest. Check `cargo clippy` hints. Format code using `cargo +nightly fmt`.
Run `cargo test -- --include-ignored` before submitting your code. A bugfix should probably
include a new/updated unittest. Check `cargo clippy` hints. Format code using `cargo +nightly fmt`. The
github CI also runs these checks.

Test emlop with the latest rust stable versions from both Gentoo and upstream. Using `rustup` is
highly recomended.
Test emlop with the latest rust stable versions from both Gentoo and upstream, and the oldest
version from Gentoo. Using `rustup` is highly recomended.

Speed is important, check for improvements/regressions using `benches/exec_compare.rs` (you need to
`cargo install scriptisto` to be able to run this file).

Respect [semver](https://semver.org/).

## Status on other environements
Check for performance improvements/regressions using `benches/exec_compare.rs` (you need to
`cargo install scriptisto` to be able to run this file) and `cargo +nightly bench -F unstable bench`
(you need a nightly toolchain installed).

I only have access to amd64/linux/gentoo/portage environements. Reports about running emlop on
arm/freebsd/funtoo/paludis/etc would be appreciated.

## License

Emlop is licensed as GPLv3. Any contribution accepted into the emlop repo will have that license,
unless the contributor explicitly demands otherwise.

## Release checklist

* Update deps: `cargo outdated`, edit Cargo.toml, `cargo update`.
* Check `git status` and either `commit` or `stash`.
* Test: `rustup override set 1.65.0 && cargo test -- --include-ignored && rustup override unset && cargo test -- --include-ignored`.
* Check `git status` and either `commit+push` or `stash`.
* Check github CI status.
* Update/commit CHANGELOG.md, Cargo.toml, Cargo.lock.
* `git tag <version> -a` (copy the changelog entry into the tag).
* `git push --tags`.
Expand All @@ -49,4 +43,4 @@ unless the contributor explicitly demands otherwise.
- Check against main repo ebuild
- Check tests and useflag variations
* Publish to [crates.io](https://crates.io/).
* Send a [bump request](https://bugs.gentoo.org/).
* Send a [pull request](https://github.com/gentoo/gentoo/pulls).

0 comments on commit 1c68ddf

Please sign in to comment.