Closed Bug 790995 Opened 8 years ago Closed 8 years ago

bootstrapper fails to install packages

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: mcote, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

I have a Ubuntu 12.04 64-bit system. I can already build m-c on it, but I ran the bootstrap.py script anyway to see what it would say.

It identified several packages to install in two passes, but it appears to have skipped the actual installation.

Here's the output. Note that I didn't press any keys; it just aborted the installation automatically.

----

$ curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py | python - 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4188  100  4188    0     0   2824      0  0:00:01  0:00:01 --:--:--  3446
[sudo] password for mcote: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libjson-perl libxml-libxml-perl libxml-namespacesupport-perl
  libxml-sax-base-perl libxml-sax-perl libxml-simple-perl
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 658 kB of archives.
After this operation, 2,038 kB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
autoconf2.13 is already the newest version.
libcurl4-openssl-dev is already the newest version.
libiw-dev is already the newest version.
libnotify-dev is already the newest version.
libxt-dev is already the newest version.
yasm is already the newest version.
mercurial is already the newest version.
libasound2-dev is already the newest version.
mesa-common-dev is already the newest version.
The following extra packages will be installed:
  libossp-uuid16
The following NEW packages will be installed:
  libossp-uuid16 uuid
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 63.3 kB of archives.
After this operation, 198 kB of additional disk space will be used.
Do you want to continue [Y/n]? Abort.

Your system should be ready to build Firefox! If you have not already,
obtain a copy of the source code by running:

    hg clone https://hg.mozilla.org/mozilla-central

Or, if you prefer Git:

    git clone git://github.com/mozilla/mozilla-central.git
I haven't tested this, but I'm optimistic it will work.

If you want to test, apply this patch in mozilla-central and run:

  python python/mozbuild/bin/bootstrap.py
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #660889 - Flags: review?(jhammel)
The patch didn't apply cleanly, but once I applied it manually (and figured out that you meant python/mozboot/bin/bootstrap.py :) it appeared to work. I didn't get prompted to install the first batch of packages above (libjson-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-perl libxml-simple-perl) though, only libossp-uuid16 and uuid. Is that ok?
(In reply to Mark Côté ( :mcote ) from comment #2)
> The patch didn't apply cleanly, but once I applied it manually (and figured
> out that you meant python/mozboot/bin/bootstrap.py :) it appeared to work. I
> didn't get prompted to install the first batch of packages above
> (libjson-perl libxml-libxml-perl libxml-namespacesupport-perl
> libxml-sax-base-perl libxml-sax-perl libxml-simple-perl) though, only
> libossp-uuid16 and uuid. Is that ok?

If it didn't prompt for all packages, I'm guessing that those were already installed and it just ran the program and it had no output.

In the future, we'll probably want to query the package manager for package presence before blindly performing an "apt-get install". This is territory for a follow-up bug.
No, I definitely don't have those packages installed. As I say, it prompted me when I ran it originally, meaning I don't have them installed--otherwise it would have just said something like "X is already the newest version". Now it doesn't, but I haven't installed those packages.

But maybe that has to do with other changes that landed in the meantime?
Doh. I commented out a line while testing locally. Uncomment line 17 from ubuntu.py and it should work.
This applies cleanly on m-c
Attachment #660889 - Attachment is obsolete: true
Attachment #660889 - Flags: review?(jhammel)
Attachment #661051 - Flags: review?(jhammel)
Comment on attachment 661051 [details] [diff] [review]
Change how commands are executed, v2

+        print('Executing as root:', ' '.join(command))

I generally use subprocess.list2cmdline for outputting.

It would be nice to keep the packages as lists and not just function arguments but this is more than fine for now.
Attachment #661051 - Flags: review?(jhammel) → review+
https://hg.mozilla.org/mozilla-central/rev/150886c947f0
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Cool, looks like it works!
Comment on attachment 661051 [details] [diff] [review]
Change how commands are executed, v2

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

::: python/mozboot/mozboot/ubuntu.py
@@ +13,5 @@
>          self.version = version
>          self.dist_id = dist_id
>  
>      def install_system_packages(self):
> +        self.run_as_root(['apt-get', 'build-dep', 'firefox'])

Hmm, I thought we weren't supposed to use build-dep anymore.
Hello,
     I am facing the same issue. How was it solved?
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.