Closed Bug 920637 Opened 7 years ago Closed 7 years ago

Nightly OS X xulrunner builds broken (OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current')

Categories

(Firefox Build System :: General, defect, P1)

defect

Tracking

(firefox27+ fixed)

RESOLVED FIXED
mozilla27
Tracking Status
firefox27 + fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(2 files, 1 obsolete file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=28354687&tree=Mozilla-Central

Traceback (most recent call last):
  File "/builds/slave/m-cen-osx64-xr-ntly-0000000000/build/toolkit/mozapps/installer/packager.py", line 375, in <module>
    main()
  File "/builds/slave/m-cen-osx64-xr-ntly-0000000000/build/toolkit/mozapps/installer/packager.py", line 369, in main
    copier.copy(args.destination)
  File "/builds/slave/m-cen-osx64-xr-ntly-0000000000/build/python/mozbuild/mozpack/copier.py", line 212, in copy
    os.mkdir(d)
OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current'
make[3]: *** [stage-package] Error 1
make[2]: *** [postflight_all] Error 2
make[1]: *** [realbuild] Error 2
make: *** [build] Error 2

This is fallout from bug 918392 changing how directories are created. The code now assumes the parent directory exists.
Priority: -- → P1
I've been assuming that the Android single-locale repacks like https://tbpl.mozilla.org/php/getParsedLog.php?id=28561264&tree=Mozilla-Central are busted from the same thing, am I actually right?
Summary: Nightly OS X xulrunner builds broken (OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current') → Nightly OS X xulrunner builds and Android l10n repacks broken (OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current')
(In reply to Phil Ringnalda (:philor) from comment #1)
> I've been assuming that the Android single-locale repacks like
> https://tbpl.mozilla.org/php/getParsedLog.php?id=28561264&tree=Mozilla-
> Central are busted from the same thing, am I actually right?

It's likely not the same thing.
(In reply to Mike Hommey [:glandium] from comment #2)
> It's likely not the same thing.

Actually, it probably is. Too early to think straight.
FileCopier now requires the caller to create the destination directory.
Attachment #813270 - Flags: review?(mshal)
Assignee: nobody → gps
Comment on attachment 813270 [details] [diff] [review]
Ensure destination directory exists in packager

Looks good, though I wonder if we will need to move the directory creation to before the '# shlibsign libraries' block since args.destination is referenced there:

                copier.add(libbase + '.chk',
                           LibSignFile(os.path.join(args.destination,
                                                    libname)))
Attachment #813270 - Flags: review?(mshal) → review+
Comment on attachment 813270 [details] [diff] [review]
Ensure destination directory exists in packager

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

::: toolkit/mozapps/installer/packager.py
@@ +370,5 @@
> +    try:
> +        os.makedirs(args.destination)
> +    except OSError as e:
> +        if e.errno != errno.EEXIST:
> +            raise

Why not do it in the copier?
Yeah, doing it in FileCopier is better. I thought there was some API
change that said the caller was responsible. I must be thinking of an
earlier revision or something else.
Attachment #813314 - Flags: review?(mh+mozilla)
Comment on attachment 813314 [details] [diff] [review]
FileCopier should create destination directory if it doesn't exist

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

::: python/mozbuild/mozpack/copier.py
@@ +169,5 @@
>          have_symlinks = hasattr(os, 'symlink')
>          destination = os.path.normpath(destination)
>  
> +        try:
> +            os.makedirs(destination)

I'd rather you do that in the except for the mkdir further below.
Attachment #813314 - Flags: review?(mh+mozilla) → review-
The mkdir() loop below is actually quite scary because it removes
symlinks and adjusts file permissions. Performing these actions parents
of destination is scary and would complicate that loop's logic. I think
this implementation is cleanest. I've added a comment to this effect.
Attachment #813451 - Flags: review?(mh+mozilla)
Attachment #813314 - Attachment is obsolete: true
Attachment #813451 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/74c262c73ebb
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/74c262c73ebb
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Yeah, turns out that didn't fix the Android l10n repacks, bug 923950.
Summary: Nightly OS X xulrunner builds and Android l10n repacks broken (OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current') → Nightly OS X xulrunner builds broken (OSError: [Errno 2] No such file or directory: '../../dist/universal/xulrunner/XUL.framework/Versions/Current')
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.