[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#535182: marked as done (apt-get update uses bzip on Packages.gz when no .bz2 is available)



Your message dated Thu, 17 May 2012 15:34:43 +0800
with message-id <CAN3veRcmmxPjffkBOwkR3XJ+W0LQS8ZWuWWz-w9_tFD+BZF12A@mail.gmail.com>
and subject line Bug#535182: apt-get update uses bzip on Packages.gz when no .bz2 is available
has caused the Debian Bug report #535182,
regarding apt-get update uses bzip on Packages.gz when no .bz2 is available
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
535182: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535182
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Subject: apt-get update uses bzip on Packages.gz when no .bz2 is available
Package: apt
Version: 0.7.21
Severity: normal

*** Please type your report below this line ***

This is a repeat of bug #316337. However, history with that bug
indicates that it was resolved as of apt 0.6.44;
however, it seems to have reappeared as of 0.7.21. I am seeing this
error on multiple boxes.

Direct examination of the archive indicates that it contains only a
Package.gz file, not a Package.bz2 file.
This is consistent with it last being updated in about 2005; the
software in it is still functional, however,
as at least one of my boxes has this version installed and it works perfectly.

Output from apt-get update, restricted only to the problem archive:

rnbwpnt@bareback:~$ sudo apt-get update
Get:1 http://etree.org unstable Release.gpg
Get:2 http://etree.org unstable/contrib Translation-en_US
99% [2 Translation-en_US bzip2 0] [Connecting to etree.org]bzip2:
(stdin) is not a bzip2 file.
Ign http://etree.org unstable/contrib Translation-en_US
Get:3 http://etree.org unstable Release
Ign http://etree.org unstable Release
Get:4 http://etree.org unstable/contrib Packages
75% [4 Packages bzip2 0]bzip2: (stdin) is not a bzip2 file.
Err http://etree.org unstable/contrib Packages
  Sub-process bzip2 returned an error code (2)
Fetched 303kB in 17s (17.8kB/s)
W: GPG error: http://etree.org unstable Release: The following
signatures were invalid: NODATA 1 NODATA 2
W: Failed to fetch
http://etree.org/debian/dists/unstable/contrib/binary-i386/Packages.bz2
 Sub-process bzip2 returned an error code (2)

E: Some index files failed to download, they have been ignored, or old
ones used instead.


This repository is known to not support translations or a gpg key.
Even so, it would appear that the Packages.gz
file is somehow being mishandled again, resulting in a failure to
include the respository in the index, making
it impossible to install software.

This bug has appeared within the last couple of versions of apt. I
only noticed it because I tried to install
software from the etree repository on a new squeeze machine; an
existing squeeze machine, which was brought
online in March 2009, did not exhibit this issue when it was
installed, because I installed the same
stuff from the same etree repository at that time. It too is now
exhibiting this error.

It would appear from the error that the download tool is creating a
0-length file instead of no file when encountering a 404, and thus
bzip is returning an error on a 0-length file.


-- Package-specific info:

-- apt-config dump --

APT "";
APT::Architecture "i386";
APT::Build-Essential "";
APT::Build-Essential:: "build-essential";
APT::Install-Recommends "1";
APT::Install-Suggests "0";
APT::Acquire "";
APT::Acquire::Translation "environment";
APT::Authentication "";
APT::Authentication::TrustCDROM "true";
APT::NeverAutoRemove "";
APT::NeverAutoRemove:: "^linux-image.*";
APT::NeverAutoRemove:: "^linux-restricted-modules.*";
Dir "/";
Dir::State "var/lib/apt/";
Dir::State::lists "lists/";
Dir::State::cdroms "cdroms.list";
Dir::State::userstatus "status.user";
Dir::State::status "/var/lib/dpkg/status";
Dir::Cache "var/cache/apt/";
Dir::Cache::archives "archives/";
Dir::Cache::srcpkgcache "srcpkgcache.bin";
Dir::Cache::pkgcache "pkgcache.bin";
Dir::Etc "etc/apt/";
Dir::Etc::sourcelist "sources.list";
Dir::Etc::sourceparts "sources.list.d";
Dir::Etc::vendorlist "vendors.list";
Dir::Etc::vendorparts "vendors.list.d";
Dir::Etc::main "apt.conf";
Dir::Etc::parts "apt.conf.d";
Dir::Etc::preferences "preferences";
Dir::Bin "";
Dir::Bin::methods "/usr/lib/apt/methods";
Dir::Bin::dpkg "/usr/bin/dpkg";
Dir::Log "var/log/apt";
Dir::Log::Terminal "term.log";
DPkg "";
DPkg::Pre-Install-Pkgs "";
DPkg::Pre-Install-Pkgs:: "/usr/sbin/dpkg-preconfigure --apt || true";

-- (no /etc/apt/preferences present) --


-- /etc/apt/sources.list --

deb http://ftp.us.debian.org/debian/ squeeze main non-free contrib
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb http://etree.org/debian/ unstable contrib

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt depends on:
ii  debian-archive-keyring        2009.01.31 GnuPG archive keys of the Debian a
ii  libc6                         2.9-12     GNU C Library: Shared libraries
ii  libgcc1                       1:4.4.0-5  GCC support library
ii  libstdc++6                    4.4.0-5    The GNU Standard C++ Library v3

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc                   <none>         (no description available)
ii  aptitude                  0.4.11.11-1+b1 terminal-based package manager
ii  bzip2                     1.0.5-2        high-quality block-sorting file co
pn  dpkg-dev                  <none>         (no description available)
ii  lzma                      4.43-14        Compression method of 7z format in
pn  python-apt                <none>         (no description available)

-- no debconf information



--- End Message ---
--- Begin Message ---
> This is a repeat of bug #316337.

Investigation leads me to conclude that this is actually an issue with
the httpd running at etree.org.  It returns a status code of 302
instead of 404 when a file is missing.

Closing as this is not a bug in apt.

Details:

> Direct examination of the archive indicates that it contains only a
> Package.gz file, not a Package.bz2 file.
> This is consistent with it last being updated in about 2005; the
> software in it is still functional, however,
> as at least one of my boxes has this version installed and it works perfectly.
>
> Output from apt-get update, restricted only to the problem archive:
>
> rnbwpnt@bareback:~$ sudo apt-get update

> W: Failed to fetch
> http://etree.org/debian/dists/unstable/contrib/binary-i386/Packages.bz2
>  Sub-process bzip2 returned an error code (2)
>
> E: Some index files failed to download, they have been ignored, or old
> ones used instead.
>

Can not confirm what the original problem was.  However, at the moment
the server on etree.org is returning the wrong status code:

$ wget http://etree.org/debian/dists/unstable/contrib/binary-i386/Packages.bz2
-O packages.bz2
--2012-05-17 12:44:30--
http://etree.org/debian/dists/unstable/contrib/binary-i386/Packages.bz2
Resolving etree.org (etree.org)... 152.19.134.46
Connecting to etree.org (etree.org)|152.19.134.46|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://bt.etree.org [following]
--2012-05-17 12:44:35--  http://bt.etree.org/
Resolving bt.etree.org (bt.etree.org)... 152.19.134.46
Connecting to bt.etree.org (bt.etree.org)|152.19.134.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `packages.bz2'

> It would appear from the error that the download tool is creating a
> 0-length file instead of no file when encountering a 404, and thus
> bzip is returning an error on a 0-length file.
>

The server does not return 404, but 302.  This is the source of the
problem.  It is telling apt that the requested file is at the location
'http://bt.etree.org' when this is not correct.  Apt believes that by
following the redirection it has obtained a copy of Packages.bz2.

To add to the confusion, if I disable following redirection and
inspect the file returned by the initial request it is a html page
with a "404" message on it.

It is very likely that the server was similarly mis-configured in June
2009 when the bug was reported.  Apt can not be expected to act
correctly in this case.

Regards


--- End Message ---

Reply to: