Comment 2 for bug 913837

Revision history for this message
Leigh Taylor (leigh-taylor-l) wrote :

If you do a search for "arm" in the apt-mirror script, it will take you to a regular expression with multiple architectures specified.

It would be possible to add the architecture required into that regular expressions (it's just a set of alternatives).

Alternatively changing the test expression to ...

if($config_line =~ /deb-([\w\-]+)/)

Makes any architecture comprising word characters (letters digits underscores), or "-" acceptable.

However you MUST move this test below the test for deb-src, otherwise "src" will be treated as an architecture (you don't want this).

I found this problem when I was trying to mirror the Raspbian repository which is architecture "armhf". There was an entry in the regex for "arm" but not "armhf", so the test passed and "arm" became the architecture which caused a failure further down.

I'm not sure why there is a specific list of architectures - perhaps to eliminate the match with "deb-src". By moving the test below the specific test for deb-src, this clash disappears so the more general regular expression can be used.

Setting the default architecture and just specifying "deb" works because this test is not involved. As far as I can infer from the code you can change the default architecture as many times as you like in mirror.list and it just affects the following lines until you change it again.