set sane timestamps when generating header symlinks for non-existing headers
authorModestas Vainius <modax@debian.org>
Tue, 5 Feb 2013 21:52:29 +0000 (21:52 +0000)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Tue, 5 Feb 2013 21:52:29 +0000 (21:52 +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 05c4dfc54152e522cb65bcdebe1b2c4d107041d2..09a9b7d68d6cb84a05325951c2a4f68ac1e4cbbe 100755 (executable)
@@ -848,7 +848,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) {