summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2017-02-27 15:14:09 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-28 09:32:38 +0000
commit9752fd1c10b8fcc819822fa6eabc2c1050fcc03b (patch)
treecc3feee149b03de72f106b955728be45bcd1bc92 /lib/bb/fetch2
parentf5ab65610d6d6c0587948b644292f57c07dece0c (diff)
downloadbitbake-contrib-9752fd1c10b8fcc819822fa6eabc2c1050fcc03b.tar.gz
fetch2: don't use deprecated bb.data APIs
Cleanup some more usage of bb.data APIs in the fetchers. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/bzr.py7
-rw-r--r--lib/bb/fetch2/clearcase.py1
-rw-r--r--lib/bb/fetch2/cvs.py2
-rw-r--r--lib/bb/fetch2/git.py1
-rw-r--r--lib/bb/fetch2/gitannex.py1
-rw-r--r--lib/bb/fetch2/gitsm.py1
-rw-r--r--lib/bb/fetch2/hg.py1
-rw-r--r--lib/bb/fetch2/local.py1
-rw-r--r--lib/bb/fetch2/osc.py5
-rw-r--r--lib/bb/fetch2/perforce.py3
-rw-r--r--lib/bb/fetch2/repo.py1
-rw-r--r--lib/bb/fetch2/sftp.py2
-rw-r--r--lib/bb/fetch2/ssh.py1
-rw-r--r--lib/bb/fetch2/svn.py5
-rw-r--r--lib/bb/fetch2/wget.py5
15 files changed, 11 insertions, 26 deletions
diff --git a/lib/bb/fetch2/bzr.py b/lib/bb/fetch2/bzr.py
index 0f1c420ef..16123f8af 100644
--- a/lib/bb/fetch2/bzr.py
+++ b/lib/bb/fetch2/bzr.py
@@ -27,7 +27,6 @@ import os
import sys
import logging
import bb
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import runfetchcmd
@@ -43,14 +42,14 @@ class Bzr(FetchMethod):
"""
# Create paths to bzr checkouts
relpath = self._strip_leading_slashes(ud.path)
- ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath)
+ ud.pkgdir = os.path.join(d.expand('${BZRDIR}'), ud.host, relpath)
ud.setup_revisions(d)
if not ud.revision:
ud.revision = self.latest_revision(ud, d)
- ud.localfile = data.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision), d)
+ ud.localfile = d.expand('bzr_%s_%s_%s.tar.gz' % (ud.host, ud.path.replace('/', '.'), ud.revision))
def _buildbzrcommand(self, ud, d, command):
"""
@@ -58,7 +57,7 @@ class Bzr(FetchMethod):
command is "fetch", "update", "revno"
"""
- basecmd = data.expand('${FETCHCMD_bzr}', d)
+ basecmd = d.expand('${FETCHCMD_bzr}')
proto = ud.parm.get('protocol', 'http')
diff --git a/lib/bb/fetch2/clearcase.py b/lib/bb/fetch2/clearcase.py
index 8df8f53d2..36beab6a5 100644
--- a/lib/bb/fetch2/clearcase.py
+++ b/lib/bb/fetch2/clearcase.py
@@ -65,7 +65,6 @@ import os
import sys
import shutil
import bb
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import runfetchcmd
diff --git a/lib/bb/fetch2/cvs.py b/lib/bb/fetch2/cvs.py
index 64c50c216..490c95471 100644
--- a/lib/bb/fetch2/cvs.py
+++ b/lib/bb/fetch2/cvs.py
@@ -63,7 +63,7 @@ class Cvs(FetchMethod):
if 'fullpath' in ud.parm:
fullpath = '_fullpath'
- ud.localfile = bb.data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d)
+ ud.localfile = d.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath))
def need_update(self, ud, d):
if (ud.date == "now"):
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 0a5785d48..0779e809a 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -76,7 +76,6 @@ import re
import bb
import errno
import bb.progress
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import runfetchcmd
from bb.fetch2 import logger
diff --git a/lib/bb/fetch2/gitannex.py b/lib/bb/fetch2/gitannex.py
index 4937a1089..c66c21142 100644
--- a/lib/bb/fetch2/gitannex.py
+++ b/lib/bb/fetch2/gitannex.py
@@ -22,7 +22,6 @@ BitBake 'Fetch' git annex implementation
import os
import bb
-from bb import data
from bb.fetch2.git import Git
from bb.fetch2 import runfetchcmd
from bb.fetch2 import logger
diff --git a/lib/bb/fetch2/gitsm.py b/lib/bb/fetch2/gitsm.py
index 939fb3f09..a95584c82 100644
--- a/lib/bb/fetch2/gitsm.py
+++ b/lib/bb/fetch2/gitsm.py
@@ -31,7 +31,6 @@ NOTE: Switching a SRC_URI from "git://" to "gitsm://" requires a clean of your r
import os
import bb
-from bb import data
from bb.fetch2.git import Git
from bb.fetch2 import runfetchcmd
from bb.fetch2 import logger
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index ddbebb5f3..b5f268601 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -29,7 +29,6 @@ import sys
import logging
import bb
import errno
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import MissingParameterError
diff --git a/lib/bb/fetch2/local.py b/lib/bb/fetch2/local.py
index 83778883e..2ff77234e 100644
--- a/lib/bb/fetch2/local.py
+++ b/lib/bb/fetch2/local.py
@@ -29,7 +29,6 @@ import os
import urllib.request, urllib.parse, urllib.error
import bb
import bb.utils
-from bb import data
from bb.fetch2 import FetchMethod, FetchError
from bb.fetch2 import logger
diff --git a/lib/bb/fetch2/osc.py b/lib/bb/fetch2/osc.py
index 26f88e1f4..2b4f7d9c1 100644
--- a/lib/bb/fetch2/osc.py
+++ b/lib/bb/fetch2/osc.py
@@ -10,7 +10,6 @@ import os
import sys
import logging
import bb
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import MissingParameterError
@@ -47,7 +46,7 @@ class Osc(FetchMethod):
else:
ud.revision = ""
- ud.localfile = data.expand('%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.path.replace('/', '.'), ud.revision), d)
+ ud.localfile = d.expand('%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.path.replace('/', '.'), ud.revision))
def _buildosccommand(self, ud, d, command):
"""
@@ -55,7 +54,7 @@ class Osc(FetchMethod):
command is "fetch", "update", "info"
"""
- basecmd = data.expand('${FETCHCMD_osc}', d)
+ basecmd = d.expand('${FETCHCMD_osc}')
proto = ud.parm.get('protocol', 'ocs')
diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index e00cca90e..3debad59f 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/lib/bb/fetch2/perforce.py
@@ -26,7 +26,6 @@ BitBake 'Fetch' implementation for perforce
import os
import logging
import bb
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import logger
@@ -89,7 +88,7 @@ class Perforce(FetchMethod):
ud.setup_revisions(d)
- ud.localfile = data.expand('%s_%s_%s.tar.gz' % (cleanedhost, cleanedpath, ud.revision), d)
+ ud.localfile = d.expand('%s_%s_%s.tar.gz' % (cleanedhost, cleanedpath, ud.revision))
def _buildp4command(self, ud, d, command, depot_filename=None):
"""
diff --git a/lib/bb/fetch2/repo.py b/lib/bb/fetch2/repo.py
index 24dcebb0c..1be91cc69 100644
--- a/lib/bb/fetch2/repo.py
+++ b/lib/bb/fetch2/repo.py
@@ -25,7 +25,6 @@ BitBake "Fetch" repo (git) implementation
import os
import bb
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import runfetchcmd
diff --git a/lib/bb/fetch2/sftp.py b/lib/bb/fetch2/sftp.py
index da857dd9f..81884a6aa 100644
--- a/lib/bb/fetch2/sftp.py
+++ b/lib/bb/fetch2/sftp.py
@@ -62,12 +62,10 @@ SRC_URI = "sftp://user@host.example.com/dir/path.file.txt"
import os
import bb
import urllib.request, urllib.parse, urllib.error
-from bb import data
from bb.fetch2 import URI
from bb.fetch2 import FetchMethod
from bb.fetch2 import runfetchcmd
-
class SFTP(FetchMethod):
"""Class to fetch urls via 'sftp'"""
diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
index e668b0d4b..6047ee417 100644
--- a/lib/bb/fetch2/ssh.py
+++ b/lib/bb/fetch2/ssh.py
@@ -43,7 +43,6 @@ IETF secsh internet draft:
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import re, os
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import logger
diff --git a/lib/bb/fetch2/svn.py b/lib/bb/fetch2/svn.py
index 3271be326..3f172eec9 100644
--- a/lib/bb/fetch2/svn.py
+++ b/lib/bb/fetch2/svn.py
@@ -28,7 +28,6 @@ import sys
import logging
import bb
import re
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import MissingParameterError
@@ -61,7 +60,7 @@ class Svn(FetchMethod):
# Create paths to svn checkouts
relpath = self._strip_leading_slashes(ud.path)
- ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
+ ud.pkgdir = os.path.join(d.expand('${SVNDIR}'), ud.host, relpath)
ud.moddir = os.path.join(ud.pkgdir, ud.module)
ud.setup_revisions(d)
@@ -69,7 +68,7 @@ class Svn(FetchMethod):
if 'rev' in ud.parm:
ud.revision = ud.parm['rev']
- ud.localfile = data.expand('%s_%s_%s_%s_.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
+ ud.localfile = d.expand('%s_%s_%s_%s_.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision))
def _buildsvncommand(self, ud, d, command):
"""
diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 1cc445a42..0c61dfa20 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -33,7 +33,6 @@ import logging
import bb
import bb.progress
import urllib.request, urllib.parse, urllib.error
-from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import FetchError
from bb.fetch2 import logger
@@ -84,9 +83,9 @@ class Wget(FetchMethod):
else:
ud.basename = os.path.basename(ud.path)
- ud.localfile = data.expand(urllib.parse.unquote(ud.basename), d)
+ ud.localfile = d.expand(urllib.parse.unquote(ud.basename))
if not ud.localfile:
- ud.localfile = data.expand(urllib.parse.unquote(ud.host + ud.path).replace("/", "."), d)
+ ud.localfile = d.expand(urllib.parse.unquote(ud.host + ud.path).replace("/", "."))
self.basecmd = d.getVar("FETCHCMD_wget") or "/usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate"