summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py22
-rw-r--r--apt/cdrom.py2
-rw-r--r--apt/debfile.py6
-rw-r--r--apt/package.py22
4 files changed, 26 insertions, 26 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 05d8d1a9..60fd6553 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -78,10 +78,10 @@ class Cache(object):
if progress is None:
progress = apt.progress.OpProgress()
self._run_callbacks("cache_pre_open")
- self._cache = apt_pkg.GetCache(progress)
- self._depcache = apt_pkg.GetDepCache(self._cache)
- self._records = apt_pkg.GetPkgRecords(self._cache)
- self._list = apt_pkg.GetPkgSourceList()
+ self._cache = apt_pkg.Cache(progress)
+ self._depcache = apt_pkg.DepCache(self._cache)
+ self._records = apt_pkg.PackageRecords(self._cache)
+ self._list = apt_pkg.SourceList()
self._list.ReadMainList()
self._set = set()
self._weakref = weakref.WeakValueDictionary()
@@ -154,8 +154,8 @@ class Cache(object):
@property
def required_download(self):
"""Get the size of the packages that are required to download."""
- pm = apt_pkg.GetPackageManager(self._depcache)
- fetcher = apt_pkg.GetAcquire()
+ pm = apt_pkg.PackageManager(self._depcache)
+ fetcher = apt_pkg.Acquire()
pm.GetArchives(fetcher, self._list, self._records)
return fetcher.FetchNeeded
@@ -270,7 +270,7 @@ class Cache(object):
def install_archives(self, pm, install_progress):
"""
The first parameter *pm* refers to an object returned by
- apt_pkg.GetPackageManager().
+ apt_pkg.PackageManager().
The second parameter *install_progress* refers to an InstallProgress()
object of the module apt.progress.
@@ -309,8 +309,8 @@ class Cache(object):
if install_progress is None:
install_progress = apt.progress.InstallProgress()
- pm = apt_pkg.GetPackageManager(self._depcache)
- fetcher = apt_pkg.GetAcquire(fetch_progress)
+ pm = apt_pkg.PackageManager(self._depcache)
+ fetcher = apt_pkg.Acquire(fetch_progress)
while True:
# fetch archives first
res = self._fetch_archives(fetcher, pm)
@@ -494,8 +494,8 @@ def _test():
if not os.path.exists(dir):
os.mkdir(dir)
apt_pkg.Config.Set("Dir::Cache::Archives", "/tmp/pytest")
- pm = apt_pkg.GetPackageManager(cache._depcache)
- fetcher = apt_pkg.GetAcquire(apt.progress.TextFetchProgress())
+ pm = apt_pkg.PackageManager(cache._depcache)
+ fetcher = apt_pkg.Acquire(apt.progress.TextFetchProgress())
cache._fetch_archives(fetcher, pm)
#sys.exit(1)
diff --git a/apt/cdrom.py b/apt/cdrom.py
index 907ac622..b9625ebf 100644
--- a/apt/cdrom.py
+++ b/apt/cdrom.py
@@ -45,7 +45,7 @@ class Cdrom(object):
"""
def __init__(self, progress=None, mountpoint=None, nomount=True):
- self._cdrom = apt_pkg.GetCdrom()
+ self._cdrom = apt_pkg.Cdrom()
if progress is None:
self._progress = CdromProgress()
else:
diff --git a/apt/debfile.py b/apt/debfile.py
index c60fc92d..6e4adb39 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -57,7 +57,7 @@ class DebPackage(object):
"missing '%s' member" %
"debian-binary"))
control = apt_inst.debExtractControl(open(self.filename))
- self._sections = apt_pkg.ParseSection(control)
+ self._sections = apt_pkg.TagSection(control)
self.pkgname = self._sections["Package"]
def __getitem__(self, key):
@@ -357,7 +357,7 @@ class DebPackage(object):
"""Satisfy the dependencies."""
# turn off MarkAndSweep via a action group (if available)
try:
- _actiongroup = apt_pkg.GetPkgActionGroup(self._cache._depcache)
+ _actiongroup = apt_pkg.ActionGroup(self._cache._depcache)
except AttributeError:
pass
# check depends
@@ -458,7 +458,7 @@ class DscSrcPackage(DebPackage):
conflicts_tags = ["Build-Conflicts", "Build-Conflicts-Indep"]
fobj = open(file)
- tagfile = apt_pkg.ParseTagFile(fobj)
+ tagfile = apt_pkg.TagFile(fobj)
sec = tagfile.Section
try:
while tagfile.Step() == 1:
diff --git a/apt/package.py b/apt/package.py
index 411f9635..3dbdf058 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -158,7 +158,7 @@ class Record(Mapping):
"""
def __init__(self, record_str):
- self._rec = apt_pkg.ParseSection(record_str)
+ self._rec = apt_pkg.TagSection(record_str)
def __hash__(self):
return hash(self._rec)
@@ -448,9 +448,9 @@ class Version(object):
if _file_is_same(destfile, self.size, self._records.MD5Hash):
print 'Ignoring already existing file:', destfile
return
- acq = apt_pkg.GetAcquire(progress or apt.progress.TextFetchProgress())
- apt_pkg.GetPkgAcqFile(acq, self.uri, self._records.MD5Hash, self.size,
- base, destFile=destfile)
+ acq = apt_pkg.Acquire(progress or apt.progress.TextFetchProgress())
+ apt_pkg.AcquireFile(acq, self.uri, self._records.MD5Hash, self.size,
+ base, destfile=destfile)
acq.Run()
for item in acq.Items:
if item.Status != item.StatDone:
@@ -474,8 +474,8 @@ class Version(object):
If *unpack* is ``True``, the path to the extracted directory is
returned. Otherwise, the path to the .dsc file is returned.
"""
- src = apt_pkg.GetPkgSrcRecords()
- acq = apt_pkg.GetAcquire(progress or apt.progress.TextFetchProgress())
+ src = apt_pkg.SourceRecords()
+ acq = apt_pkg.Acquire(progress or apt.progress.TextFetchProgress())
dsc = None
src.Lookup(self.package.name)
@@ -497,8 +497,8 @@ class Version(object):
continue
finally:
fobj.close()
- apt_pkg.GetPkgAcqFile(acq, src.Index.ArchiveURI(path), md5, size,
- base, destFile=destfile)
+ apt_pkg.AcquireFile(acq, src.Index.ArchiveURI(path), md5, size,
+ base, destfile=destfile)
acq.Run()
for item in acq.Items:
@@ -879,7 +879,7 @@ class Package(object):
# this feature only works if the correct deb-src are in the
# sources.list
# otherwise we fall back to the binary version number
- src_records = apt_pkg.GetPkgSrcRecords()
+ src_records = apt_pkg.SourceRecords()
src_rec = src_records.Lookup(src_pkg)
if src_rec:
src_ver = src_records.Version
@@ -1016,7 +1016,7 @@ class Package(object):
self._pcache._depcache.MarkDelete(self._pkg, purge)
# try to fix broken stuffsta
if auto_fix and self._pcache._depcache.BrokenCount > 0:
- fix = apt_pkg.GetPkgProblemResolver(self._pcache._depcache)
+ fix = apt_pkg.ProblemResolver(self._pcache._depcache)
fix.Clear(self._pkg)
fix.Protect(self._pkg)
fix.Remove(self._pkg)
@@ -1043,7 +1043,7 @@ class Package(object):
self._pcache._depcache.MarkInstall(self._pkg, auto_inst, from_user)
# try to fix broken stuff
if auto_fix and self._pcache._depcache.BrokenCount > 0:
- fixer = apt_pkg.GetPkgProblemResolver(self._pcache._depcache)
+ fixer = apt_pkg.ProblemResolver(self._pcache._depcache)
fixer.Clear(self._pkg)
fixer.Protect(self._pkg)
fixer.Resolve(True)