Skip to content

Commit 1232554

Browse files
authored
Merge pull request #246 from JeffersonLab/drop_and_pop_as_found
Drop and pop as found
2 parents 9e2ab41 + 42b4568 commit 1232554

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

vsdb/BScrawler.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def checkOasisCVMFS(packagename,version,dirtag):
6767
folder_name="evtgen-"
6868
elif packagename.replace("\"","") == "hepmc":
6969
folder_name="HepMC-"
70+
elif packagename.replace("\"","") == "diracxx":
71+
folder_name="Diracxx-"
7072
else:
7173
folder_name=folder_name+"-"
7274

@@ -95,10 +97,10 @@ def main(argv):
9597
pushcmd="mysql --host="+dbhost+" --database="+dbname+" --user="+dbuser#+"<tables.sql"
9698

9799
p = subprocess.Popen(pushcmd.split(" "),stdin=subprocess.PIPE)
98-
stdout,stderr = p.communicate(file("/work/halld2/home/tbritton/GlueX_Software/build_scripts/vsdb/tables.sql").read())
100+
stdout,stderr = p.communicate(file("/group/halld/Software/build_scripts/vsdb/tables.sql").read())
99101

100102

101-
reconpackcmd="xsltproc /work/halld2/home/tbritton/GlueX_Software/build_scripts/xml/packages_sql.xslt /work/halld2/home/tbritton/GlueX_Software/build_scripts/xml/packages.xml | grep INSERT | "+"mysql -h "+dbhost+" -D "+dbname+" -u "+dbuser
103+
reconpackcmd="xsltproc /group/halld/Software/build_scripts/xml/packages_sql.xslt /group/halld/Software/build_scripts/xml/packages.xml | grep INSERT | "+"mysql -h "+dbhost+" -D "+dbname+" -u "+dbuser
102104
#print reconpackcmd
103105

104106
ps = subprocess.Popen(reconpackcmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
@@ -124,14 +126,15 @@ def main(argv):
124126

125127
directories=os.listdir(loc)
126128
for afile in directories:
127-
#if "_jlab" not in afile:
128-
# continue
129+
129130
if ".xml" not in afile:
130131
continue
131132
if "~" in afile:
132133
continue
133134
if afile == "version_jlab.xml" or afile == "version_set_correlations.xml" or afile=="version.xml":
134135
continue
136+
#if "test" in afile:
137+
# continue
135138
# ADD afile to versionset. Get that version set id
136139
check_for_file="SELECT id from versionSet where filename=\""+afile+"\";"
137140
#print check_for_file
@@ -185,12 +188,13 @@ def main(argv):
185188
#if 'name' not in child.attrib:
186189
# continue
187190
check_package_num="SELECT id from package where name=\""+child.attrib['name']+"\";"
188-
#print check_package_num
191+
print check_package_num
189192
curs.execute(check_package_num)
190193
num = curs.fetchall()
191194

192195
ID=-1
193-
#print num
196+
print("Getting ID number")
197+
print num
194198
#if len(num[0])
195199
if num[0]['id']:
196200
ID=num[0]['id']

0 commit comments

Comments
 (0)