Closed Bug 1251352 Opened 8 years ago Closed 8 years ago

Bootstrap script ignores --no-interactive in Arch Linux

Categories

(Firefox Build System :: General, defect)

All
Linux
defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: qheaden, Assigned: qheaden)

References

Details

Attachments

(2 files, 2 obsolete files)

When running bootstrap.py using the --no-interactive flag on Arch Linux, it does not append the correct flag to the install command to prevent prompting. It also doesn't suppress the warning prompt for AUR. This causes problems with automated install scripts that use the bootstrap.
Assignee: nobody → qheaden
Attached patch patch-1 (obsolete) — Splinter Review
I've set Gregory Szorc (Build Config module owner) as the person for review. But if someone else should be the patch reviewer, feel free to change it. Also, I made this patch as a result of my having trouble building a Dockerfile using an Arch base that uses bootstrap.py to install dependencies. If there is another solution in the pipeline, and this one is useless, feel free to let me know. :)
Attachment #8723700 - Flags: review?(gps)
This explains why Arch was hanging on a prompt in bug 1245969!
Blocks: 1245969
Comment on attachment 8723700 [details] [diff] [review]
patch-1

Review of attachment 8723700 [details] [diff] [review]:
-----------------------------------------------------------------

I'll land this for you with nits addressed.

::: python/mozboot/mozboot/archlinux.py
@@ +138,5 @@
>      def pacman_install(self, *packages):
>          command = ['pacman', '-S', '--needed']
> +        if self.no_interactive:
> +            command.append('--noconfirm')
> +        command.extend(packages)

Looks like we .extend(packages) twice?

@@ +177,5 @@
>          self.run_as_root(command)
>  
>      def aur_install(self, *packages):
>          path = tempfile.mkdtemp()
> +        if self.no_interactive == False:

if not self.no_interactive:
Attachment #8723700 - Flags: review?(gps) → review+
Attached patch patch-2Splinter Review
Nits have been addressed in patch 2.
Attachment #8723700 - Attachment is obsolete: true
Attachment #8723714 - Flags: review?(gps)
I noticed you attached a plain diff to this bug. You should either use MozReview or something like `hg bzexport` or git-moz-bz to upload patch files so the VCS metadata (such as your author information) is preserved.
Comment on attachment 8723714 [details] [diff] [review]
patch-2

Review of attachment 8723714 [details] [diff] [review]:
-----------------------------------------------------------------

This is basically what I landed.
Attachment #8723714 - Flags: review?(gps) → review+
Okay. Did you still need me to upload the diff using MozReview?
Attached patch patch-3Splinter Review
Fixed patch description.
Attachment #8723722 - Attachment is obsolete: true
Attachment #8723723 - Flags: review?(gps)
(In reply to Quentin Headen [:qheaden] from comment #8)
> Okay. Did you still need me to upload the diff using MozReview?

No. I already landed this. See comment #4 for the link. You shouldn't need to do anything else in this bug unless the patch isn't behaving as expected.
Attachment #8723723 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/5f2b6a81e84a
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: