Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911276 - sys-apps/portage: Add 'force' functionality to other subcommands of ebuild
Summary: sys-apps/portage: Add 'force' functionality to other subcommands of ebuild
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-27 06:14 UTC by konsolebox
Modified: 2023-08-11 02:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Initial implementation (ebuild-force.patch,5.82 KB, patch)
2023-07-27 06:14 UTC, konsolebox
Details | Diff
Implementation of it as a feature; affects digest/manifest as well (ebuild-force-as-feature.patch,5.19 KB, patch)
2023-07-28 08:35 UTC, konsolebox
Details | Diff
Adds --noauto option (ebuild-noauto.patch,1.07 KB, patch)
2023-07-28 08:35 UTC, konsolebox
Details | Diff
Force as feature documentation patch (ebuild-force-as-feature-make-conf-5.patch,1.69 KB, patch)
2023-07-30 07:31 UTC, konsolebox
Details | Diff
Noauto as option documentation patch (ebuild-noauto-make-conf-5.patch,608 bytes, patch)
2023-07-30 07:31 UTC, konsolebox
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description konsolebox 2023-07-27 06:14:01 UTC
Created attachment 866348 [details, diff]
Initial implementation

Allowing commands like 'compile' to be easily re-executed without needing to remove the ".command-ed" file will allow source code to be debugged more easily.

Attached patch file provides concept implementation that will allow '--force' option of ebuild to also work on other subcommands that aren't 'manifest' or 'digest' with the internal effect of ignore the dot files.

Currently the implementation works by adding a 'force' argument to doebuild() and doebuild_environment() which in turn assigns PORTAGE_FORCE=1 to [my]settings.  This value is then recognized by spawn() and __dyn_* shell functions.

Ideally I think the better implementation would be to add 'force' as a FEATURE, just like 'noauto', have '--force' work as an alternative method to assign it, and add '--noauto' that also assigns 'noauto' for <em>consistency</em>.  Option-based assignment has stronger priority.

This force feature most practically is usable with noauto enabled but dev should have the option to run it without it as well. And again; for <em>consistency</em>.
Comment 1 konsolebox 2023-07-28 08:35:23 UTC
Created attachment 866506 [details, diff]
Implementation of it as a feature; affects digest/manifest as well
Comment 2 konsolebox 2023-07-28 08:35:51 UTC
Created attachment 866507 [details, diff]
Adds --noauto option
Comment 3 konsolebox 2023-07-28 08:38:11 UTC
I implemented "Ideally I think the better implementation would be to add 'force' as a FEATURE, just like 'noauto', have '--force' work as an alternative method to assign it, and add '--noauto' that also assigns 'noauto' for <em>consistency</em>.  Option-based assignment has stronger priority." with the feature affecting digest and manifest subcommands as well.

Only missing is the documentation changes needed to be done in make.conf(5).
Comment 4 konsolebox 2023-07-30 07:31:20 UTC
Created attachment 866643 [details, diff]
Force as feature documentation patch
Comment 5 konsolebox 2023-07-30 07:31:40 UTC
Created attachment 866644 [details, diff]
Noauto as option documentation patch
Comment 6 konsolebox 2023-07-30 08:02:53 UTC
Easily test these updates by importing https://github.com/konsolebox/overlay/tree/c78a08360e55f199bd06a3eeb9221166593fbcc9/sys-apps/portage to your ::local and enable 'unofficial' USE.
Comment 7 konsolebox 2023-08-02 12:31:33 UTC
Example use case for this is https://bugs.gentoo.org/911542.

I was able to rebuild and install the qbittorrent package after editing its sources to get debugging output by using the following commands:

ebuild /usr/portage/net-p2p/qbittorrent/qbittorrent-4.5.4.ebuild compile --force --noauto
ebuild /usr/portage/net-p2p/qbittorrent/qbittorrent-4.5.4.ebuild install qmerge

Such things can't be done easily when debugging directly from raw source since you'd have to make sure configurations and destination directories are properly replicated.
Comment 8 konsolebox 2023-08-11 02:56:02 UTC
I think it's better to only apply 'force' against subcommands specified in the ebuild command.  I'll create and test that variation.