From 6b52c533451af556b43995a75f1e68b55d369c00 Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Thu, 9 Mar 2006 14:36:30 +0000 Subject: [PATCH] =?UTF-8?q?=20.a=20dosyalar=C4=B1=20i=C3=A7erisinde=20buil?= =?UTF-8?q?dno=20hesab=C4=B1n=C4=B1=20bozan=20timestamp'leri=200=20ile=20p?= =?UTF-8?q?ad'liyoruz=20art=C4=B1k..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bir süre deneyelim, sorun çıkarsa clean_ar_timestamps fonksiyonuna bağlantığı koparırız, her şey eski haline döner. --- pisi/build.py | 3 --- pisi/util.py | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index b40aa882..80e8dd7b 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -614,9 +614,6 @@ class Builder: changed = True break else: - #FIXME: workaround for .a issue, skip .a files - if fn.path.endswith('.a') and fn.type=='library': - continue if fo.hash != fn.hash: changed = True break diff --git a/pisi/util.py b/pisi/util.py index 24d9d589..ec057abb 100644 --- a/pisi/util.py +++ b/pisi/util.py @@ -300,6 +300,19 @@ def copy_file(src,dest): check_dir(os.path.dirname(dest)) shutil.copyfile(src, dest) +def clean_ar_timestamps(ar_file): + """clean the timestamps of the ar files""" + content = open(ar_file).readlines() + if not content[0].strip() == '!': + return + fp = open(ar_file, 'w') + for line in content: + pos = line.rfind(chr(32) + chr(96)) + if pos > -1 and line[pos - 57:pos + 2].find(chr(47)) > -1: + line = line[:pos - 41] + '0000000000' + line[pos - 31:] + fp.write(line) + fp.close() + # FIXME: this should be done in a much much simpler way # as it stands, it seems to be a kludge to solve # an unrelated problem @@ -312,7 +325,14 @@ def get_file_hashes(top, excludePrefix=None, removePrefix=None): given.""" def sha1_sum(f, data=False): + if not data and f.endswith('.a'): + #workaround for .a issue.. + #don't skip .a files, + #but pad their timestamps with '0'.. + clean_ar_timestamps(f) + func = None + if data: func = sha1_data else: