Closed Bug 1399686 Opened 7 years ago Closed 7 years ago

`make package` broken on macOS after landing of bug 1399226

Categories

(Firefox :: New Tab Page, defect)

57 Branch
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: spohl, Assigned: Mardak)

References

Details

Symlinks are being created inside Nightly.app to files that no longer exist as of bug 1399226, such as amazon-ca@2x.png. There appears to be at least one more problematic symlink to a non-existing amazon-com@2x.png. Executing `make package` in the objdir results in the following error:

[...]
Traceback (most recent call last):
  File "/Users/spohl/Documents/mozilla-central/toolkit/mozapps/installer/packager.py", line 333, in <module>
    main()
  File "/Users/spohl/Documents/mozilla-central/toolkit/mozapps/installer/packager.py", line 327, in main
    copier.copy(args.destination)
  File "/Users/spohl/Documents/mozilla-central/python/mozbuild/mozpack/copier.py", line 431, in copy
    copy_results.append((destfile, f.copy(destfile, skip_if_older)))
  File "/Users/spohl/Documents/mozilla-central/python/mozbuild/mozpack/copier.py", line 604, in copy
    file.copy(deflater, skip_if_older)
  File "/Users/spohl/Documents/mozilla-central/python/mozbuild/mozpack/files.py", line 189, in copy
    shutil.copyfileobj(self.open(), dest)
  File "/Users/spohl/Documents/mozilla-central/python/mozbuild/mozpack/files.py", line 217, in open
    return open(self.path, 'rb')
IOError: [Errno 2] No such file or directory: '../../dist/Nightly.app/Contents/Resources/browser/features/activity-stream@mozilla.org/chrome/content/data/content/tippytop/images/amazon-ca@2x.png'
make[3]: *** [stage-package] Error 1
make[2]: *** [make-package] Error 2
make[1]: *** [default] Error 2
make: *** [package] Error 2
Flags: needinfo?(edilee)
The only references that I could find in our codebase are here:
https://dxr.mozilla.org/mozilla-central/rev/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/browser/extensions/activity-stream/data/content/tippytop/top_sites.json#15,25

I'm trying a clobber build now to see if this fixes it.
Seems to work for me:

 0:21.83 /usr/local/bin/terminal-notifier -title Mozilla Build System -group mozbuild -message Packaging complete

Some files were indeed removed. Should CLOBBER be updated?
Flags: needinfo?(edilee)
Ok, it looks like this is due to the way files are being packaged[1] and updating CLOBBER would resolve this. Since all files are packaged under browser/features with the '*' placeholder instead of one-by-one, the packager will attempt to package all files, including symlinks from previous builds that might point to files that no longer exist, as is the case here.

Another solution would be to reference every file individually in package manifest. But there are other places in package-manifest.in that use the '*' placeholder as well, so I wouldn't go this route. Let's just update CLOBBER instead.

Ed, would you mind doing this? Thank you!

[1] https://hg.mozilla.org/mozilla-central/annotate/f9a5e9ed62103c84e4cde915f4d08f1ce71be83e/browser/installer/package-manifest.in#l629
Flags: needinfo?(edilee)
We ended up removing some more icons as part of bug 1399970, so I touched the CLOBBER file there for this and that.
Assignee: nobody → edilee
No longer blocks: 1399226
Depends on: 1399970
Flags: needinfo?(edilee)
Fixed by bug 1399970 https://hg.mozilla.org/mozilla-central/rev/3b514f205252
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Component: Activity Streams: Newtab → New Tab Page
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.