set sane timestamps when generating header symlinks for non-existing headers
authorModestas Vainius <modax@debian.org>
Tue, 15 Nov 2016 19:34:19 +0000 (19:34 +0000)
committerRaspbian forward porter <root@raspbian.org>
Tue, 15 Nov 2016 19:34:19 +0000 (19:34 +0000)
This is particularly important for QtCore/QtConfig symlink because typically
qconfig.h does not exist when syncqt is run by ./configure. So instead of
assigning a modification timestamp equal to the epoch (00:00 January 1, 1970
GMT.) for the symlink, just use current time().

Gbp-Pq: Name 02_syncqt_sane_timestamp_for_nonexisting_headers.diff

bin/syncqt

index e0b2061a9e2cba71afa433b23bb62bec8a796341..b20ebe85207db05f789bbc9b1fbf0a7cbc7fd402 100755 (executable)
@@ -886,7 +886,7 @@ foreach my $lib (@modules_to_sync) {
                             print "SYMBOL: $_\n";
                         }
                     } else {
-                        my $ts = (stat($iheader))[9];
+                        my $ts = (-e $iheader) ? (stat($iheader))[9] : time;
                         #find out all the places it goes..
                         my @headers;
                         if ($public_header) {