more work on the finalization of the API

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@67 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2007-02-05 15:24:50 +00:00
parent 9cd83170b0
commit 73e26f0d9d
2 changed files with 15 additions and 4 deletions
+14 -4
View File
@@ -59,14 +59,24 @@ if (not validFile):
entropyTools.print_info("extracting data and calculating info for: "+tbz2File.split("/")[len(tbz2File.split("/"))-1]+" please wait...")
# fill all the info
etpData = entropyTools.extractPkgData(tbz2File)
#os.mkdir(etpConst['packagestmpdir']+"/")
# ugly, ugly way to print data without caring about type
# look where I can store the file and return its path
#etpOutfile = entropyTools.allocateFile(etpData)
etpOutfile = "test.etp"
etpOutput = []
# append header
etpOutput.append(ETP_HEADER_TEXT)
for i in etpData:
if (etpData[i]):
entropyTools.print_generic(i+": "+etpData[i]+"\n")
etpOutput.append(i+": "+etpData[i]+"\n")
f = open(etpOutfile,"w")
f.writelines(etpOutput)
f.flush()
f.close()
# clean garbage
os.system("rm -rf "+etpConst['packagestmpdir']+"/"+etpData['name']+"-"+etpData['version'])
entropyTools.print_info("extracted: "+tbz2File+" to "+etpConst['packagessuploaddir']+" IT'S A FAKE FOR NOW")
entropyTools.print_info("extracted: "+tbz2File+" to "+etpConst['packagessuploaddir'])
+1
View File
@@ -44,6 +44,7 @@ ETP_REPODIR = "/repository"+ETP_ARCH_VAR
ETP_DBDIR = "/database"+ETP_ARCH_VAR
ETP_UPDIR = "/upload"+ETP_ARCH_VAR
ETP_STOREDIR = "/store"+ETP_ARCH_VAR
ETP_HEADER_TEXT = "~entropy~API"+ETP_API+ETP_API_SUBLEVEL+"~(C)~Sabayon Linux~released under the GPLv2~\n"
etpConst = {
'packagestmpdir': ETP_DIR+ETP_TMPDIR, # etpConst['packagestmpdir'] --> temp directory