summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-08 10:42:44 -0500
committerDan McGee <dan@archlinux.org>2010-09-08 10:42:44 -0500
commite0bf193c555c2a07be2f37defb1270e9a1acb39c (patch)
treeb33df96b07cbefa47c963296cbac936ab711f466 /packages
parent6ca71c355d25c02747eec010563244740e5b8c54 (diff)
downloadarchweb-e0bf193c555c2a07be2f37defb1270e9a1acb39c.tar.gz
archweb-e0bf193c555c2a07be2f37defb1270e9a1acb39c.zip
Fix download links to work with package pools
With package pooling we don't put things in the '/any/' folder anymore under each repository; they only show up in the actual architectures. Use a 'real' architecture as part of the download link to rectify this. Fixes FS#20779. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/views.py b/packages/views.py
index 6f05cb8f..784d2540 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -349,9 +349,13 @@ def download(request, name='', repo='', arch=''):
mirrorurl = MirrorUrl.objects.filter(mirror__country='Any',
mirror__public=True, mirror__active=True,
protocol__protocol__iexact='HTTP')[0]
+ arch = pkg.arch.name
+ if arch == 'any':
+ # grab the first non-any arch to fake the download path
+ arch = Arch.objects.exclude(name='any')[0].name
details = {
'host': mirrorurl.url,
- 'arch': pkg.arch.name,
+ 'arch': arch,
'repo': pkg.repo.name.lower(),
'file': pkg.filename,
}