more bug fixes, additions, stabilizations and such

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@61 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2007-02-04 23:29:59 +00:00
parent 4582d96583
commit a88bd381a7
3 changed files with 40 additions and 20 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
cd ..
for tbz2 in `find $1 -name "*.tbz2"`; do
python entropy-specifications-generator $tbz2
if [ "$?" != "0" ]; then
echo
echo "test of "$tbz2" failed"
echo
sleep 10
fi
done
+10 -18
View File
@@ -19,7 +19,7 @@ pData = {
'useflags': "", # USE flags used
'license': "", # License adpoted
'keywords': "", # supported ARCHs (by the SRC)
'supportedBinaryARCHs': "", # supported ARCHs (by the BIN)
'binkeywords': "", # supported ARCHs (by the BIN)
'download': "", # link to download the binary package
'sources': "", # link to the sources
'mirrorlinks': "", # =mirror://openoffice|link1|link2|link3
@@ -32,26 +32,18 @@ pData = {
ETP_API = "1"
ETP_API_SUBLEVEL = ".0"
ETP_DIR = "/var/lib/entropy"
# variables
# should we import these into make.conf ?
pTree = "/var/lib/entropy/packages"
pTree = ETP_DIR+"/packages"
pTmpDir = pTree+"/tmp"
# fetch PORTAGE_BINHOST
f = open("/etc/make.conf","r")
makeConf = f.readlines()
pBinHost = ""
for line in makeConf:
line = line.strip()
if line.startswith("PORTAGE_BINHOST"):
pBinHost = line.split('"')[1]
break
if (pBinHost == ""):
# force PORTAGE_BINHOST to our defaults
pBinHost = "http://www.sabayonlinux.org/binhost/All/"
if not pBinHost.endswith("/"):
pBinHost += "/"
pBinDir = pTree+"/repository/%%ARCH%%"
pDatabaseDir = ETP_DIR+"/database/"
# FIXME: workout the PORTAGE_BINHOST management
# use PORTAGE_BINHOST with multiple entries?
pBinHost = "ftp://192.168.1.254/binhost/%%ARCH%%/"
pDbHost = "ftp://192.168.1.254/database/%%ARCH%%/"
import commands
if (commands.getoutput("q -V").find("portage-utils") != -1):
@@ -62,7 +54,7 @@ else:
pFindLibraryXT = "equery belongs -en "
# the ARCHs that we support
pArchs = ["x86", "amd64"]
pArchs = ["x86", "amd64"] # maybe ppc someday
# Portage /var/db/<pkgcat>/<pkgname-pkgver>/*
# you never know if gentoo devs change these things
+19 -2
View File
@@ -134,6 +134,7 @@ def extractPkgData(package):
# Fill sources
# FIXME: resolve mirror:// in something useful
# FIXME: resolve amd64? url x86? url
# portage.thirdpartymirrors['openoffice'] for example
# !! keep mirror:// but write at the beginning something like
try:
@@ -142,6 +143,22 @@ def extractPkgData(package):
f.close()
except IOError:
pass
# manage pData['sources'] to create pData['mirrorlinks']
# =mirror://openoffice|link1|link2|link3
tmpMirrorList = pData['sources'].split()
for i in tmpMirrorList:
if i.startswith("mirror://"):
# parse what mirror I need
x = i.split("/")[2]
mirrorlist = portage.thirdpartymirrors[x]
out = "="+i+"|"
for mirror in mirrorlist:
out += mirror+"|"
if out.endswith("|"):
out = out[:len(out)-1]
pData['mirrorlinks'] += out+" "
pData['mirrorlinks'] = removeSpaceAtTheEnd(pData['mirrorlinks'])
# Fill USE
f = open(tbz2TmpDir+dbUSE,"r")
@@ -177,9 +194,9 @@ def extractPkgData(package):
pkgArchs = pData['keywords']
for i in pArchs:
if pkgArchs.find(i) != -1 and (pkgArchs.find("-"+i) == -1): # in case we find something like -amd64...
pData['supportedBinaryARCHs'] += i+" "
pData['binkeywords'] += i+" "
pData['supportedBinaryARCHs'] = removeSpaceAtTheEnd(pData['supportedBinaryARCHs'])
pData['binkeywords'] = removeSpaceAtTheEnd(pData['binkeywords'])
# Fill dependencies
# to fill dependencies we use *DEPEND files