trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nottheoil...@apache.org
Subject [trafficserver] branch master updated: Get the list of files from Autoconf vs. Git
Date Fri, 10 Feb 2017 21:35:09 GMT
This is an automated email from the ASF dual-hosted git repository.

nottheoilrig pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  0b0241e   Get the list of files from Autoconf vs. Git
0b0241e is described below

commit 0b0241ee356d0ea1a86dbcb0acef8fafabce653e
Author: Jack Bates <jack@nottheoilrig.com>
AuthorDate: Thu Feb 9 09:06:28 2017 -0700

    Get the list of files from Autoconf vs. Git
    
    This will work with source tarballs as well as checkouts.
    
    Fixes #1431
---
 tools/check-unused-dependencies | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tools/check-unused-dependencies b/tools/check-unused-dependencies
index d44eeda..eb35b4d 100755
--- a/tools/check-unused-dependencies
+++ b/tools/check-unused-dependencies
@@ -20,8 +20,8 @@
 # symbols from libfoo.
 #
 # The list of programs is gathered by scraping Automake files, which are
-# themselves gathered from Git. ldd does the actual business of checking
-# for unused dependencies.
+# themselves gathered from Autoconf. ldd does the actual business of
+# checking for unused dependencies.
 #
 # There are a couple of manual exceptions listed below, either because
 # we deliberately link with an unused library -- possibly for
@@ -35,6 +35,7 @@ import re
 import subprocess
 import sys
 
+config_files_re = re.compile(r'(?<=config_files=").*(?=")')
 programs_re = re.compile(r'([^\n ]*_)PROGRAMS \+?= (.*)')
 
 
@@ -71,10 +72,12 @@ def get_dependencies(program):
 
 
 success = True
-args = ['git', 'ls-files']
-for filename in subprocess.Popen(args, stdout=subprocess.PIPE).stdout:
-  filename = filename[:-1]
-  if os.path.basename(filename) == 'Makefile.am':
+filename = 'config.status'
+contents = open(filename).read()
+config_files = config_files_re.search(contents).group(0)
+for filename in config_files.split():
+  filename = filename + '.am'
+  if os.path.exists(filename):
     contents = open(filename).read()
     contents = contents.replace('\\\n', '')
     for prefix, programs in programs_re.findall(contents):

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message