mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
fetch, fetch2: Get rid of DeprecationWarning notice
* This patch fixes a cosmetic issue currently we get with master
WARNING: /home/kraj/work/bitbake/lib/bb/fetch2/__init__.py:733:
DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead. bb.mkdirhier("%s/%s" % (rootdir, destdir))
(Bitbake rev: 36fe59ce314c295d239b76de34c8714def2c32d5)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+1
-1
@@ -497,7 +497,7 @@ def main():
|
|||||||
doc.insert_doc_item(doc_ins)
|
doc.insert_doc_item(doc_ins)
|
||||||
|
|
||||||
# let us create the HTML now
|
# let us create the HTML now
|
||||||
bb.mkdirhier(output_dir)
|
bb.utils.mkdirhier(output_dir)
|
||||||
os.chdir(output_dir)
|
os.chdir(output_dir)
|
||||||
|
|
||||||
# Let us create the sites now. We do it in the following order
|
# Let us create the sites now. We do it in the following order
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Bzr(Fetch):
|
|||||||
bb.utils.remove(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir)), True)
|
bb.utils.remove(os.path.join(ud.pkgdir, os.path.basename(ud.pkgdir)), True)
|
||||||
bzrcmd = self._buildbzrcommand(ud, d, "fetch")
|
bzrcmd = self._buildbzrcommand(ud, d, "fetch")
|
||||||
logger.debug(1, "BZR Checkout %s", loc)
|
logger.debug(1, "BZR Checkout %s", loc)
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", bzrcmd)
|
logger.debug(1, "Running %s", bzrcmd)
|
||||||
runfetchcmd(bzrcmd, d)
|
runfetchcmd(bzrcmd, d)
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ class Cvs(Fetch):
|
|||||||
else:
|
else:
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(pkgdir)
|
bb.utils.mkdirhier(pkgdir)
|
||||||
os.chdir(pkgdir)
|
os.chdir(pkgdir)
|
||||||
logger.debug(1, "Running %s", cvscmd)
|
logger.debug(1, "Running %s", cvscmd)
|
||||||
myret = os.system(cvscmd)
|
myret = os.system(cvscmd)
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Git(Fetch):
|
|||||||
|
|
||||||
# If the checkout doesn't exist and the mirror tarball does, extract it
|
# If the checkout doesn't exist and the mirror tarball does, extract it
|
||||||
if not os.path.exists(ud.clonedir) and os.path.exists(repofile):
|
if not os.path.exists(ud.clonedir) and os.path.exists(repofile):
|
||||||
bb.mkdirhier(ud.clonedir)
|
bb.utils.mkdirhier(ud.clonedir)
|
||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
runfetchcmd("tar -xzf %s" % (repofile), d)
|
runfetchcmd("tar -xzf %s" % (repofile), d)
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ class Git(Fetch):
|
|||||||
os.chdir(coprefix)
|
os.chdir(coprefix)
|
||||||
runfetchcmd("%s checkout -q -f %s%s" % (ud.basecmd, ud.tag, readpathspec), d)
|
runfetchcmd("%s checkout -q -f %s%s" % (ud.basecmd, ud.tag, readpathspec), d)
|
||||||
else:
|
else:
|
||||||
bb.mkdirhier(codir)
|
bb.utils.mkdirhier(codir)
|
||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.tag, readpathspec), d)
|
runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.tag, readpathspec), d)
|
||||||
runfetchcmd("%s checkout-index -q -f --prefix=%s -a" % (ud.basecmd, coprefix), d)
|
runfetchcmd("%s checkout-index -q -f --prefix=%s -a" % (ud.basecmd, coprefix), d)
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Hg(Fetch):
|
|||||||
fetchcmd = self._buildhgcommand(ud, d, "fetch")
|
fetchcmd = self._buildhgcommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", fetchcmd)
|
logger.debug(1, "Running %s", fetchcmd)
|
||||||
runfetchcmd(fetchcmd, d)
|
runfetchcmd(fetchcmd, d)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class Osc(Fetch):
|
|||||||
oscfetchcmd = self._buildosccommand(ud, d, "fetch")
|
oscfetchcmd = self._buildosccommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", oscfetchcmd)
|
logger.debug(1, "Running %s", oscfetchcmd)
|
||||||
runfetchcmd(oscfetchcmd, d)
|
runfetchcmd(oscfetchcmd, d)
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class Perforce(Fetch):
|
|||||||
|
|
||||||
# create temp directory
|
# create temp directory
|
||||||
logger.debug(2, "Fetch: creating temporary directory")
|
logger.debug(2, "Fetch: creating temporary directory")
|
||||||
bb.mkdirhier(data.expand('${WORKDIR}', localdata))
|
bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
|
||||||
data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
|
data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
|
||||||
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
|
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
|
||||||
tmpfile = tmppipe.readline().strip()
|
tmpfile = tmppipe.readline().strip()
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class Repo(Fetch):
|
|||||||
else:
|
else:
|
||||||
username = ""
|
username = ""
|
||||||
|
|
||||||
bb.mkdirhier(os.path.join(codir, "repo"))
|
bb.utils.mkdirhier(os.path.join(codir, "repo"))
|
||||||
os.chdir(os.path.join(codir, "repo"))
|
os.chdir(os.path.join(codir, "repo"))
|
||||||
if not os.path.exists(os.path.join(codir, "repo", ".repo")):
|
if not os.path.exists(os.path.join(codir, "repo", ".repo")):
|
||||||
runfetchcmd("repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d)
|
runfetchcmd("repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), d)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class Svk(Fetch):
|
|||||||
localdata = data.createCopy(d)
|
localdata = data.createCopy(d)
|
||||||
data.update_data(localdata)
|
data.update_data(localdata)
|
||||||
logger.debug(2, "Fetch: creating temporary directory")
|
logger.debug(2, "Fetch: creating temporary directory")
|
||||||
bb.mkdirhier(data.expand('${WORKDIR}', localdata))
|
bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
|
||||||
data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata)
|
data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata)
|
||||||
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
|
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false")
|
||||||
tmpfile = tmppipe.readline().strip()
|
tmpfile = tmppipe.readline().strip()
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class Svn(Fetch):
|
|||||||
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
|
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", svnfetchcmd)
|
logger.debug(1, "Running %s", svnfetchcmd)
|
||||||
runfetchcmd(svnfetchcmd, d)
|
runfetchcmd(svnfetchcmd, d)
|
||||||
|
|||||||
@@ -731,7 +731,7 @@ class FetchMethod(object):
|
|||||||
destdir = urldata.path.rsplit("/", 1)[0]
|
destdir = urldata.path.rsplit("/", 1)[0]
|
||||||
else:
|
else:
|
||||||
destdir = "."
|
destdir = "."
|
||||||
bb.mkdirhier("%s/%s" % (rootdir, destdir))
|
bb.utils.mkdirhier("%s/%s" % (rootdir, destdir))
|
||||||
cmd = 'cp %s %s/%s/' % (file, rootdir, destdir)
|
cmd = 'cp %s %s/%s/' % (file, rootdir, destdir)
|
||||||
|
|
||||||
if not cmd:
|
if not cmd:
|
||||||
@@ -742,7 +742,7 @@ class FetchMethod(object):
|
|||||||
os.chdir(rootdir)
|
os.chdir(rootdir)
|
||||||
if 'subdir' in urldata.parm:
|
if 'subdir' in urldata.parm:
|
||||||
newdir = ("%s/%s" % (rootdir, urldata.parm.get('subdir')))
|
newdir = ("%s/%s" % (rootdir, urldata.parm.get('subdir')))
|
||||||
bb.mkdirhier(newdir)
|
bb.utils.mkdirhier(newdir)
|
||||||
os.chdir(newdir)
|
os.chdir(newdir)
|
||||||
|
|
||||||
cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, True), cmd)
|
cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', data, True), cmd)
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class Bzr(FetchMethod):
|
|||||||
bzrcmd = self._buildbzrcommand(ud, d, "fetch")
|
bzrcmd = self._buildbzrcommand(ud, d, "fetch")
|
||||||
bb.fetch2.check_network_access(d, bzrcmd, ud.url)
|
bb.fetch2.check_network_access(d, bzrcmd, ud.url)
|
||||||
logger.debug(1, "BZR Checkout %s", loc)
|
logger.debug(1, "BZR Checkout %s", loc)
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", bzrcmd)
|
logger.debug(1, "Running %s", bzrcmd)
|
||||||
runfetchcmd(bzrcmd, d)
|
runfetchcmd(bzrcmd, d)
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ class Cvs(FetchMethod):
|
|||||||
else:
|
else:
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(pkgdir)
|
bb.utils.mkdirhier(pkgdir)
|
||||||
os.chdir(pkgdir)
|
os.chdir(pkgdir)
|
||||||
logger.debug(1, "Running %s", cvscmd)
|
logger.debug(1, "Running %s", cvscmd)
|
||||||
bb.fetch2.check_network_access(d, cvscmd, ud.url)
|
bb.fetch2.check_network_access(d, cvscmd, ud.url)
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class Git(FetchMethod):
|
|||||||
|
|
||||||
# If the checkout doesn't exist and the mirror tarball does, extract it
|
# If the checkout doesn't exist and the mirror tarball does, extract it
|
||||||
if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror):
|
if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror):
|
||||||
bb.mkdirhier(ud.clonedir)
|
bb.utils.mkdirhier(ud.clonedir)
|
||||||
os.chdir(ud.clonedir)
|
os.chdir(ud.clonedir)
|
||||||
runfetchcmd("tar -xzf %s" % (ud.fullmirror), d)
|
runfetchcmd("tar -xzf %s" % (ud.fullmirror), d)
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class Hg(FetchMethod):
|
|||||||
fetchcmd = self._buildhgcommand(ud, d, "fetch")
|
fetchcmd = self._buildhgcommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", fetchcmd)
|
logger.debug(1, "Running %s", fetchcmd)
|
||||||
bb.fetch2.check_network_access(d, fetchcmd, ud.url)
|
bb.fetch2.check_network_access(d, fetchcmd, ud.url)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class Osc(FetchMethod):
|
|||||||
oscfetchcmd = self._buildosccommand(ud, d, "fetch")
|
oscfetchcmd = self._buildosccommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", oscfetchcmd)
|
logger.debug(1, "Running %s", oscfetchcmd)
|
||||||
bb.fetch2.check_network_access(d, oscfetchcmd, ud.url)
|
bb.fetch2.check_network_access(d, oscfetchcmd, ud.url)
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class Perforce(FetchMethod):
|
|||||||
|
|
||||||
# create temp directory
|
# create temp directory
|
||||||
logger.debug(2, "Fetch: creating temporary directory")
|
logger.debug(2, "Fetch: creating temporary directory")
|
||||||
bb.mkdirhier(data.expand('${WORKDIR}', localdata))
|
bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
|
||||||
data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
|
data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
|
||||||
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
|
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
|
||||||
tmpfile = tmppipe.readline().strip()
|
tmpfile = tmppipe.readline().strip()
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class Repo(FetchMethod):
|
|||||||
else:
|
else:
|
||||||
username = ""
|
username = ""
|
||||||
|
|
||||||
bb.mkdirhier(os.path.join(codir, "repo"))
|
bb.utils.mkdirhier(os.path.join(codir, "repo"))
|
||||||
os.chdir(os.path.join(codir, "repo"))
|
os.chdir(os.path.join(codir, "repo"))
|
||||||
if not os.path.exists(os.path.join(codir, "repo", ".repo")):
|
if not os.path.exists(os.path.join(codir, "repo", ".repo")):
|
||||||
bb.fetch2.check_network_access(d, "repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url)
|
bb.fetch2.check_network_access(d, "repo init -m %s -b %s -u %s://%s%s%s" % (ud.manifest, ud.branch, ud.proto, username, ud.host, ud.path), ud.url)
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class Svk(FetchMethod):
|
|||||||
localdata = data.createCopy(d)
|
localdata = data.createCopy(d)
|
||||||
data.update_data(localdata)
|
data.update_data(localdata)
|
||||||
logger.debug(2, "Fetch: creating temporary directory")
|
logger.debug(2, "Fetch: creating temporary directory")
|
||||||
bb.mkdirhier(data.expand('${WORKDIR}', localdata))
|
bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
|
||||||
data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata)
|
data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.XXXXXX', localdata), localdata)
|
||||||
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
|
tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
|
||||||
tmpfile = tmppipe.readline().strip()
|
tmpfile = tmppipe.readline().strip()
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class Svn(FetchMethod):
|
|||||||
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
|
svnfetchcmd = self._buildsvncommand(ud, d, "fetch")
|
||||||
logger.info("Fetch " + loc)
|
logger.info("Fetch " + loc)
|
||||||
# check out sources there
|
# check out sources there
|
||||||
bb.mkdirhier(ud.pkgdir)
|
bb.utils.mkdirhier(ud.pkgdir)
|
||||||
os.chdir(ud.pkgdir)
|
os.chdir(ud.pkgdir)
|
||||||
logger.debug(1, "Running %s", svnfetchcmd)
|
logger.debug(1, "Running %s", svnfetchcmd)
|
||||||
bb.fetch2.check_network_access(d, svnfetchcmd, ud.url)
|
bb.fetch2.check_network_access(d, svnfetchcmd, ud.url)
|
||||||
|
|||||||
Reference in New Issue
Block a user