summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-05 15:00:15 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-05 15:00:15 +0200
commit14dfadc054e9bdafd2507dbca70dbec925471ae0 (patch)
tree8d2c0e85fde3010267e87d14f4f88cb352b23a0e /apt
parentcdabff6d329baba8024224b362f79d822ddd943e (diff)
downloadpython-apt-14dfadc054e9bdafd2507dbca70dbec925471ae0.tar.gz
Introduce the rename rules formally, and add some exceptions.
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py4
-rw-r--r--apt/package.py10
2 files changed, 7 insertions, 7 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 56b32d45..8590510c 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -170,8 +170,8 @@ class Cache(object):
reqreinst = set()
for pkg in self:
if (not pkg.candidate.downloadable and
- (pkg._pkg.inst_state == apt_pkg.INSTSTATE_RE_INST_REQ or
- pkg._pkg.inst_state == apt_pkg.INSTSTATE_HOLD_RE_INST_REQ)):
+ (pkg._pkg.inst_state == apt_pkg.INSTSTATE_REINSTREQ or
+ pkg._pkg.inst_state == apt_pkg.INSTSTATE_HOLD_REINSTREQ)):
reqreinst.add(pkg.name)
return reqreinst
diff --git a/apt/package.py b/apt/package.py
index a24486e1..48d14595 100644
--- a/apt/package.py
+++ b/apt/package.py
@@ -379,7 +379,7 @@ class Version(object):
.. versionadded:: 0.7.10
"""
- return self._records.file_name
+ return self._records.filename
@property
def md5(self):
@@ -413,7 +413,7 @@ class Version(object):
for (packagefile, index) in self._cand.file_list:
indexfile = self.package._pcache._list.find_index(packagefile)
if indexfile:
- yield indexfile.archive_uri(self._records.file_name)
+ yield indexfile.archive_uri(self._records.filename)
@property
def uris(self):
@@ -443,19 +443,19 @@ class Version(object):
.. versionadded:: 0.7.10
"""
- base = os.path.basename(self._records.file_name)
+ base = os.path.basename(self._records.filename)
destfile = os.path.join(destdir, base)
if _file_is_same(destfile, self.size, self._records.md5_hash):
print 'Ignoring already existing file:', destfile
return
acq = apt_pkg.Acquire(progress or apt.progress.TextFetchProgress())
apt_pkg.AcquireFile(acq, self.uri, self._records.md5_hash, self.size,
- base, dest_file=destfile)
+ base, destfile=destfile)
acq.run()
for item in acq.items:
if item.status != item.stat_done:
raise FetchError("The item %r could not be fetched: %s" %
- (item.dest_file, item.error_text))
+ (item.destfile, item.error_text))
return os.path.abspath(destfile)
def fetch_source(self, destdir="", progress=None, unpack=True):