Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Precisely preserve the timestamps when stripping debugging symbols#2886

Merged
livecodestephen merged 6 commits into
livecode:developfrom
livecodestephen:build-timestamps
Sep 30, 2015
Merged

Precisely preserve the timestamps when stripping debugging symbols#2886
livecodestephen merged 6 commits into
livecode:developfrom
livecodestephen:build-timestamps

Conversation

@livecodestephen

Copy link
Copy Markdown
Contributor

This is an update to #2642.

On Debian Wheezy the cp --attributes-only --preserve=timestamps command was emptying the contents of the destination. I've changed it to using mv and touch instead. This should now work on Squeeze, so it no longer has to ignore any failures.

I also removed an unnecessary mkdir from util/build-extensions.sh. This line was causing an error as basename doesn't have an -s flag on Debian Wheezy.

This was unnecessary as `build_widget` will make the directory if needed.  Moreover,
the `-s` option for `basename` isn't available on Debian Wheezy.
The `--preserve-dates` flag for `strip` and `objcopy` only has whole
second resolution.  This meant that the modification time was being
truncated to an integer number of seconds.  Consequently, when
stripping a file, some of the dependencies of that file would appear
to be newer, and hence the file would be unnecessarily remade during a
second call to make.

Simple soultion: copy the timestamps to a separate file before we
strip and copy them back after.
The 32-bit linux build is built on Debian Squeeze which only has coreutils 8.5.  Version >= 8.6 is required for the `--attributes-only` option on `cp`, so ignore failure of these commands.
On Debian Wheezy the `cp` command was deleting the contents of the destination, so
switch to using `touch` with a reference file.
Comment thread tools/extract-debug-symbols.sh Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest using "touch -m -r "$input" "$input.timestamps" here. That should create the timestamp file with the modification time of the original without needing to copy the file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that would be nicer. I'll do that.

@livecodestephen

Copy link
Copy Markdown
Contributor Author

@livecodeian: Changed to use touch as you suggested.

@livecodeian

Copy link
Copy Markdown
Contributor

@livecode-vulcan review ok e419ee1

@livecode-vulcan

Copy link
Copy Markdown
Contributor

💙 review by @livecodeian ok e419ee1

livecode-vulcan added a commit that referenced this pull request Sep 30, 2015
Precisely preserve the timestamps when stripping debugging symbols

This is an update to #2642.

On Debian Wheezy the `cp --attributes-only --preserve=timestamps` command was emptying the contents of the destination.  I've changed it to using `mv` and `touch` instead.  This should now work on Squeeze, so it no longer has to ignore any failures.

I also removed an unnecessary `mkdir` from `util/build-extensions.sh`.  This line was causing an error as `basename` doesn't have an `-s` flag on Debian Wheezy.
@livecode-vulcan

Copy link
Copy Markdown
Contributor

😎 test success e419ee1

livecodestephen added a commit that referenced this pull request Sep 30, 2015
Precisely preserve the timestamps when stripping debugging symbols
@livecodestephen livecodestephen merged commit c68c1f0 into livecode:develop Sep 30, 2015
@livecodestephen livecodestephen deleted the build-timestamps branch September 30, 2015 10:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants