Switch to native touch for config/makefiles/autotargets.mk

RESOLVED FIXED in mozilla20

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

Trunk
mozilla20
All
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Assignee)

Description

5 years ago
With bug 820053 and bug 820289, we end up running:
   touch -t 198001030000 "../../../dist/bin/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/.mkdir.done"

which fails with the following error:
  touch: cannot touch `../../../dist/bin/browser/extensions/972ce4c6-7e08-4474-a285-3208198ce6fd/.mkdir.done': No such file or directory

Once again, we're being hit by msys' handling of command lines. It turns out msys programs are doing {} expansion themselves, instead of the shell doing it. So when executing touch {a}, what touch considers is a, and when executing touch {a,b}, what touch considers is a and b. This doesn't happen when executing win32 executables (tested with cl).
(Assignee)

Comment 1

5 years ago
Created attachment 690842 [details] [diff] [review]
Add support for -t option of touch in pymake builtins
Attachment #690842 - Flags: review?(ted)
(Assignee)

Comment 2

5 years ago
Created attachment 690843 [details] [diff] [review]
Use pymake native touch in config/makefiles/autotargets.mk
Attachment #690843 - Flags: review?(ted)
(Assignee)

Comment 3

5 years ago
Created attachment 690845 [details] [diff] [review]
Add support for -t option of touch in pymake builtins

Better without a debug print.
Attachment #690845 - Flags: review?(ted)
(Assignee)

Updated

5 years ago
Attachment #690842 - Attachment is obsolete: true
Attachment #690842 - Flags: review?(ted)
Attachment #690843 - Flags: review?(ted) → review+
Comment on attachment 690845 [details] [diff] [review]
Add support for -t option of touch in pymake builtins

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

This could stand a unit test or two.
Attachment #690845 - Flags: review?(ted) → review+
(Assignee)

Comment 5

5 years ago
Created attachment 690858 [details] [diff] [review]
Add a pymake unit test for native touch -t
Attachment #690858 - Flags: review?(ted)
Attachment #690858 - Flags: review?(ted) → review+

Comment 8

5 years ago
https://hg.mozilla.org/mozilla-central/rev/dcec67acfda3
https://hg.mozilla.org/mozilla-central/rev/8b5953a0cbf7
https://hg.mozilla.org/mozilla-central/rev/500855f76d16
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
For some reason, this change triggered this output for me & others (e.g. snorp) when doing a pull -u:
> $ hg pull -u
> pulling from https://hg.mozilla.org/mozilla-central/
> searching for changes
> adding changesets
> adding manifests
> adding file changes
> added 289 changesets with 1187 changes to 792 files
> not updating: path contains illegal component: /pymake/tests/native-touch.mk
> $ hg --version
> Mercurial Distributed SCM (version 2.2.2)

The workaround is to run "hg up --clean -r default", but it'd be good to figure out what happened here that's triggering the problem.
Specifically, that seems to be the last change -- 500855f76d16 -- which triggered this.
(That's the change that added build/pymake/tests/native-touch.mk.)

I hit this on 64-bit Linux (Ubuntu 12.10); snorp hit it on Mac.
You need to log in before you can comment on or make changes to this bug.