mirror of
https://github.com/ukui/apt.git
synced 2026-03-09 09:35:45 -07:00
Store size from volatile sources for already installed versions
Volatile sources are parsed after the status file, so if we have a
version already installed the size information is not stored, so that
a reinstall of said version is refused claiming a broken repository.
References: 1412cf5140
This commit is contained in:
@@ -404,8 +404,13 @@ uint32_t debListParser::VersionHash()
|
||||
half-configured, triggers-awaited, triggers-pending, installed
|
||||
*/
|
||||
bool debListParser::ParseStatus(pkgCache::PkgIterator &,
|
||||
pkgCache::VerIterator &)
|
||||
pkgCache::VerIterator &Ver)
|
||||
{
|
||||
// the status file has no info about the download size and
|
||||
// usually this is fine as we will have picked that info up already –
|
||||
// except if we have volatile sources which are parsed after the status file.
|
||||
if (Ver->Size == 0)
|
||||
Ver->Size = Section.FindULL(pkgTagSection::Key::Size);
|
||||
return true;
|
||||
}
|
||||
bool debStatusListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
|
||||
|
||||
@@ -7,6 +7,9 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
|
||||
setupenvironment
|
||||
configarchitecture 'amd64' 'i386'
|
||||
|
||||
# XXX: Remove temporary hack
|
||||
rm rootdir/etc/apt/apt.conf.d/temporary-allow-unsized-packages
|
||||
|
||||
# regression test for #754904
|
||||
cat > foo.rpm <<EOF
|
||||
I'm not a deb, I'm a teapot.
|
||||
|
||||
Reference in New Issue
Block a user