Skip to content

Commit

Permalink
Merge pull request #4033 from smuzaffar/fix-duplicateReflexLibrarySea…
Browse files Browse the repository at this point in the history
…rch-for-patch-releases

Fix duplicate reflex library search for patch releases
  • Loading branch information
smuzaffar committed May 28, 2014
2 parents 3ed292f + 9b7752d commit 1f403a3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Utilities/ReleaseScripts/scripts/duplicateReflexLibrarySearch.py
Expand Up @@ -32,6 +32,7 @@
#Ordered List to search for matched packages
equivDict = \
[
{'L1TCalorimeter' : ['l1t::CaloTower.*']},
{'GsfTracking' : ['reco::GsfTrack(Collection|).*(MomentumConstraint|VertexConstraint)', 'Trajectory.*reco::GsfTrack']},
{'ParallelAnalysis' : ['examples::TrackAnalysisAlgorithm']},
{'PatCandidates' : ['pat::PATObject','pat::Lepton']},
Expand Down Expand Up @@ -89,7 +90,7 @@ def searchClassDefXml ():
xmlFiles = []
for srcDir in [os.environ.get('CMSSW_BASE'),os.environ.get('CMSSW_RELEASE_BASE')]:
if not len(srcDir): continue
for xml in commands.getoutput ('cd '+os.path.join(srcDir,'src')+'; find . -name "*classes_def.xml" -print').split ('\n'):
for xml in commands.getoutput ('cd '+os.path.join(srcDir,'src')+'; find . -name "*classes_def.xml" -follow -print').split ('\n'):
if xml and (not xml in xmlFiles):
xmlFiles.append(xml)
if options.showXMLs:
Expand Down Expand Up @@ -233,9 +234,11 @@ def searchClassDefXml ():
def searchDuplicatePlugins ():
""" Searches the edmpluginFile to find any duplicate
plugins."""
edmpluginFile = os.path.join(os.environ.get('CMSSW_BASE'),'lib',os.environ.get('SCRAM_ARCH'),'.edmplugincache')
if len (os.environ.get('CMSSW_RELEASE_BASE')):
edmpluginFile = edmpluginFile+ ' ' + os.path.join(os.environ.get('CMSSW_RELEASE_BASE'),'lib',os.environ.get('SCRAM_ARCH'),'.edmplugincache')
edmpluginFile = ''
libenv = 'LD_LIBRARY_PATH'
if os.environ.get('SCRAM_ARCH').startswith('osx'): libenv = 'DYLD_FALLBACK_LIBRARY_PATH'
for libdir in os.environ.get(libenv).split(':'):
if os.path.exists(libdir+'/.edmplugincache'): edmpluginFile = edmpluginFile + ' ' + libdir+'/.edmplugincache'
cmd = "cat %s | awk '{print $2\" \"$1}' | sort | uniq | awk '{print $1}' | sort | uniq -c | grep '2 ' | awk '{print $2}'" % edmpluginFile
output = commands.getoutput (cmd).split('\n')
for line in output:
Expand Down

0 comments on commit 1f403a3

Please sign in to comment.