Bug 2620

Summary: installing packages fails repeatedly with file "corrupt" error message
Product: [Websites] maemo.org Website Reporter: pgruebele
Component: RepositoriesAssignee: unassigned <nobody>
Status: RESOLVED FIXED QA Contact: repositories <repositories>
Severity: major    
Priority: High CC: andrew.james.barr, bugzilla770, cosinus, eero.tamminen, erik--maemo, ferenc, ijon-c, jobi, laurent, loek.van-der-helm, luciano.wolf, maemo.mlf.01, marcus, silentkeystroke, Simon80, supermaninfl, tuukka.tolvanen
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: Windows   
Bug Depends on:    
Bug Blocks: 2656    
Attachments: Temporary Workaround for installing the SDK

Description pgruebele (reporter) 2007-12-21 17:23:28 UTC
STEPS TO REPRODUCE THE PROBLEM: browse to maemo site and try to install canola2
by following the steps.  Same thing randomly happens with some other apps.

EXPECTED OUTCOME: packages/apps install properly

ACTUAL OUTCOME: app manager says file is "corrupt"

REPRODUCIBILITY: always
(always/sometimes/once)

EXTRA SOFTWARE INSTALLED: none

OTHER COMMENTS: cannot really use N800/OS2008 due to inability to install
packages.  I reflashed the N800 but no improvement.
Comment 1 tuukka.tolvanen nokia 2007-12-21 23:02:48 UTC
repository.maemo.org seems to be mostly yielding, in place of .deb packages,
error pages with the wrong 200 OK http response, so application manager
successfully gets garbage and complains correctly. testcase:
http://repository.maemo.org/extras/pool/chinook/free/p/python-runtime/python2.5-runtime_c1.0-2_all.deb

http://lists.maemo.org/pipermail//maemo-developers/2007-December/013458.html
says:
    The correct behavior would be to send a "503 Service Unavailable" or 
    other error message inside header, to inform correctly the apt utility.
Comment 2 Neil MacLeod maemo.org 2007-12-22 03:02:55 UTC
extras-devel is also hosed:

http://repository.maemo.org/extras-devel/dists/chinook/non-free/binary-armel/Packages.gz

Ferenc seems to be around, hopefully he can take a look at this soon (Ferenc,
hope you don't mind being added on cc!)
Comment 3 rbtest 2007-12-22 03:17:24 UTC
Just my objective 2c... it would seem to be a hosed http handler on the server. 

Test case : Browse
http://repository.maemo.org/extras/pool/chinook/free/q/quiver/

Click on the quiver_0.1.18-1_armel.deb  (it will download everytime)
Click on the quiver_0.1.19-1_armel.deb  (it will error everytime)

So some logic wrapped around http requests is interfering.
Comment 4 Andrew Flegg maemo.org 2007-12-22 15:58:08 UTC
*** Bug 2636 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Flegg maemo.org 2007-12-22 15:58:27 UTC
*** Bug 2635 has been marked as a duplicate of this bug. ***
Comment 6 Laurent GUERBY 2007-12-22 16:22:20 UTC
Note that the content answer depends on the effective akamai IP for
repository.maemo.org.
Comment 7 Jonathan Greene 2007-12-23 16:42:31 UTC
This is impacting all sorts of applications both new and updates.  NEEDS
COMMENT AND RESOLUTION!
Comment 8 pgruebele (reporter) 2007-12-23 18:57:42 UTC
It actually seems to have gotten better yesterday.  I was finally able to
install canola2 and UKMP and others...
Comment 9 Simon80 2007-12-23 19:14:39 UTC
As a temporary workaround, I've found that changing my sources.list to point to
stage.maemo.org instead of repository.maemo.org has allowed me to keep working,
for some reason.
Comment 10 Jarmo Lahtiranta 2007-12-23 19:57:44 UTC
(In reply to comment #9)
> As a temporary workaround, I've found that changing my sources.list to point to
> stage.maemo.org instead of repository.maemo.org has allowed me to keep working,
> for some reason.

I can confirm this. After changing the repository to stage.maemo.org I could
install Python2.5-runtime, which earlier failed every time and was blocking the
install of several other programs.
Comment 11 Manuel Segura 2007-12-23 20:04:49 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > As a temporary workaround, I've found that changing my sources.list to point to
> > stage.maemo.org instead of repository.maemo.org has allowed me to keep working,
> > for some reason.
> 
> I can confirm this. After changing the repository to stage.maemo.org I could
> install Python2.5-runtime, which earlier failed every time and was blocking the
> install of several other programs.
> 

this solution works for me too
Comment 12 tuukka.tolvanen nokia 2007-12-23 22:57:16 UTC
*** Bug 2610 has been marked as a duplicate of this bug. ***
Comment 13 Rob Woolley 2007-12-27 01:10:46 UTC
Created an attachment (id=685) [details]
Temporary Workaround for installing the SDK

This is a temporary hack that works around the repository problem when
installing the SDK.

At present, if someone tries to install the SDK it is unable to get the
source/Sources.gz file because the server reports "Service unavailable". 
However, this file is available if repostory.maemo.org is used instead of
repository.maemo.org

This patch adds a line to the shell script in the maemo SDK binary. This line
modifies the sources.list file and replaces 'repository' with 'repostory'

Your mileage may vary.  This is my first time installing the SDK so there may
be complications I'm not aware of.
Comment 14 Andrew Barr 2007-12-27 04:47:25 UTC
I'm rather amused at this 'repostory' workaround, it originated on the ITT
forums, and it has been repeated verbatim in several places, with no one
bothering to understand _why_ it worked: repository.maemo.org points to the
Akamai cache, and *.maemo.org points to the actual server, which is the same
reason that stage.maemo.org works, which was pointed out on the mailing lists
(I think). repository.maemo.org is "bad", and everything else is "good". People
have been repeating 'repostory' like some kind of magic incantation.

I realize there are many people who have not said anything who understand fully
why this works, but it touched on a pet peeve of mine to see this endlessly
(and IMHO mindlessly) repeated verbatim, which suggests the number of people
who have repeated it verbatim have no understanding of the underlying
mechanism.

Frankly, this whole mess is a good reason why Nokia should dump Akamai for this
kind of thing and do as their upstream Debian does and make use of the
open-source mirror resources available. Akamai is good for streaming music
videos and high-demand websites and whatnot to IE and Firefox, but for APT,
which expects a bit more standards-compliant and robust HTTP behavior, it's
just a pain in the ass.
Comment 15 Jussi Kukkonen 2007-12-31 12:03:41 UTC
*** Bug 2681 has been marked as a duplicate of this bug. ***
Comment 16 tuukka.tolvanen nokia 2008-01-01 03:24:39 UTC
I was able to pull a random 203 packages from extras/pool/chinook/free just
fine today (looks like I got 217.212.252.80) so this seems to wfm now from here
at least?
Comment 17 Naba Kumar nokia 2008-01-01 13:21:53 UTC
Yes, I can confirm too. It's working fine now.