Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiet option fix #444

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Quiet option fix #444

wants to merge 2 commits into from

Conversation

sshedi
Copy link
Contributor

@sshedi sshedi commented Aug 3, 2023

No description provided.

tools/cli/main.c Outdated Show resolved Hide resolved
tools/cli/main.c Outdated Show resolved Hide resolved
tools/cli/main.c Outdated Show resolved Hide resolved
pytests/tests/test_quiet.py Outdated Show resolved Hide resolved
@sshedi sshedi force-pushed the quiet-fix branch 5 times, most recently from 6cc66b0 to f3000c0 Compare August 4, 2023 08:34
@sshedi
Copy link
Contributor Author

sshedi commented Aug 4, 2023

We can also fix this by doing something like:

--- a/common/utils.c
+++ b/common/utils.c
@@ -443,6 +443,9 @@ TDNFYesOrNo(

     if(!pArgs->nAssumeYes && !pArgs->nAssumeNo)
     {
+        if (pArgs->nQuiet) {
+            error out;
+        }
         while(1) {

But this will be a costly operation. Let's fail early and quick. Imagine downloading giga byte size package on a slow network and seeing this error post download.

@oliverkurth
Copy link
Contributor

But this will be a costly operation. Let's fail early and quick. Imagine downloading giga byte size package on a slow network and seeing this error post download.

The question is before downloading packages though. Which makes sense because you want to say be able to say "no" before downloading gigabytes on your modem link.

@sshedi
Copy link
Contributor Author

sshedi commented Aug 5, 2023

But this will be a costly operation. Let's fail early and quick. Imagine downloading giga byte size package on a slow network and seeing this error post download.

The question is before downloading packages though. Which makes sense because you want to say be able to say "no" before downloading gigabytes on your modem link.

Ahh, I missed it. Shall we switch to this solution? Simple and easy to maintain.

@oliverkurth
Copy link
Contributor

But this will be a costly operation. Let's fail early and quick. Imagine downloading giga byte size package on a slow network and seeing this error post download.

The question is before downloading packages though. Which makes sense because you want to say be able to say "no" before downloading gigabytes on your modem link.

Ahh, I missed it. Shall we switch to this solution? Simple and easy to maintain.

Yes, agreed.

@oliverkurth
Copy link
Contributor

I think this looks good. But as discussed, this will be merged some time in the future for Photon > 5.0 (I created a label for that purpose).

@sshedi
Copy link
Contributor Author

sshedi commented Aug 8, 2023

I think this looks good. But as discussed, this will be merged some time in the future for Photon > 5.0 (I created a label for that purpose).

No problem. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants