Skip to content

app-editors/fresh: add telemetry USE flag - #532

Open
masterwolf-git wants to merge 7 commits into
gentoo:devfrom
masterwolf-git:dev
Open

app-editors/fresh: add telemetry USE flag#532
masterwolf-git wants to merge 7 commits into
gentoo:devfrom
masterwolf-git:dev

Conversation

@masterwolf-git

@masterwolf-git masterwolf-git commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Hello.

This editor has telemetry as an opt-out feature. This annoyed me so I managed to neutralize it via some patches, and made the ebuild support the respective use flag.
I am not the maintainer of the package, so I understand I should PR it, right?

Regards

Shimon Trolles

emerge-info.txt
build.log --USE= -telemetry
build.log --USE= +telemetry


Please check all the boxes that apply:

  • I have read the GURU rules and agree with them (note that they were last updated 2026-07-19).
  • I can submit this contribution in agreement with the Copyright Policy.
  • I have certified the above via adding a Signed-off-by line to every commit in the pull request.
  • This contribution has not been created with the assistance of Natural Language Processing artificial intelligence tools, in accordance with the AI policy.
  • I have run pkgcheck scan --commits --net to check for issues with my commits.
  • I have included the build logs for all the packages I'm adding or modifying.
  • All e-mail addresses added to metadata.xml correspond to valid Gentoo Bugzilla, and I will be reading the bug mail send to them, or none were added.

Please note that all boxes must be checked for the pull request to be merged.

Ideally, please file the pull request against the dev branch to avoid potential merge conflicts. However, since pull requests are merged manually, there is no need to close if opened against master instead.

@masterwolf-git
masterwolf-git marked this pull request as ready for review August 4, 2026 14:14
@dsafxP

dsafxP commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hi, USE flags are not intended for this, they're supposed to map to compile-time features when relevant.

This is not a compile-time feature, but a runtime one. You can see how to disable it in its documentation.

This is more adecuate for Portage user patches or a local overlay.

You can request upstream or make a PR to implement a feature for telemetry if you wish to see it as a USE flag. Otherwise, I won't be merging it.

@masterwolf-git

Copy link
Copy Markdown
Contributor Author

Ok!

Thanks!

Comment thread app-editors/fresh/fresh-0.4.6.ebuild Outdated
Comment thread app-editors/fresh/fresh-0.4.6.ebuild Outdated
masterwolf-git and others added 2 commits August 6, 2026 00:04
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Removed the einfo as per @mgorny request

Signed-off-by: Shimon Trolles <shimontrolles@gmail.com>
Comment thread app-editors/fresh/fresh-0.4.6.ebuild Outdated
rm -v crates/fresh-editor/src/services/telemetry.rs || die
echo "pub fn should_run_daily_check(_: &dyn crate::services::time_source::TimeSource, _: &std::path::Path) -> Option<String> { None }" > crates/fresh-editor/src/services/telemetry.rs || die
echo "pub fn track_open(_: &str) {}" >> crates/fresh-editor/src/services/telemetry.rs || die
sed -i 's/"description": "Check for new versions on startup (default: true)[^"]*"/"description": "Check for new versions on startup (default: true). Telemetry disabled by USE flag."/g' crates/fresh-editor/plugins/config-schema.json || die

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you actually limit to changing the default to false?

@masterwolf-git masterwolf-git Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my understanding, the whole point of making a use flag to alter the build was to not have the module compiled at all.

Apart from that, the editor checks for new versions available, and this is tied for some reason with the telemetry, even though functionally they have no correlation whatsoever (I guess the author was trying to convince people to enable telemetry by giving something else bundled?), as the version checker just checks if the URL exists in the git releases. If I just make the default off, I still have those two functions tied together.

If you wish I can just tweak the default, but then maybe use flags would be overkill?

Comment thread app-editors/fresh/fresh-0.4.6.ebuild Outdated
masterwolf-git and others added 3 commits August 6, 2026 15:29
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Closes: gentoo#532 (comment)
Signed-off-by: masterwolf <shimontrolles@gmail.com>
@masterwolf-git

masterwolf-git commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Logs for 4c3a755
build-telemetry.log
build+telemetry.log
Done in the same computer, so no need for new emerge --info.
I will link the old one for convenience emerge --info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants