Skip to content

Report error about future timestamps#147

Merged
dirkmueller merged 2 commits into
openSUSE:masterfrom
bmwiedemann:checktime
May 14, 2025
Merged

Report error about future timestamps#147
dirkmueller merged 2 commits into
openSUSE:masterfrom
bmwiedemann:checktime

Conversation

@bmwiedemann

Copy link
Copy Markdown
Member

Report error about future timestamps

The latest .changes entry is used for SOURCE_DATE_EPOCH,
which is expected to always be in the past for mtime-clamping to work.

Note that the break had to be dropped, because it skipped the other checks
if the line started with a day-of-week (e.g. Sun)

The latest .changes entry is used for SOURCE_DATE_EPOCH,
which is expected to always be in the past for mtime-clamping to work.

Note that the 'break' had to be dropped, because it skipped the other checks
if the line started with a day-of-week (e.g. Sun)
esac
DATE=`date +%s --date "$DATESTR" 2> /dev/null`
test $? -gt 0 -o -z "$DATE" -o "$LAST_IS_YEAR" != true && {
test $? -gt 0 -o -z "$DATE" -o "$LAST_IS_YEAR" != true -o "$DATE" -gt "$now" && {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you touch this line anyway, could you convert it into more readable if [ ... ] || [ ... ]; then syntax? Currently it's more perl than sh...

@dirkmueller dirkmueller merged commit c67c5f7 into openSUSE:master May 14, 2025
@DimStar77

Copy link
Copy Markdown
Contributor

regression detected: #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants