Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#10213 - Make the URL for packages be awesome

Attached to Project: Arch Linux
Opened by Dan McGee (toofishes) - Friday, 18 April 2008, 02:42 GMT
Last edited by Dusty Phillips (Dusty) - Sunday, 06 July 2008, 01:03 GMT
Task Type Feature Request
Category Web Sites
Status Closed
Assigned To Dusty Phillips (Dusty)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

With website 6.0 or whatever it is, we should be able to realign the package URLs to human friendly ones.

So instead of: http://archlinux.org/packages/9526
We have: http://archlinux.org/packages/extra/i686/git
and: http://archlinux.org/packages/extra/x86_64/git
This task depends upon

Closed by  Dusty Phillips (Dusty)
Sunday, 06 July 2008, 01:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  This is fixed in git, will go out with the next release. I also cleaned up the details view of packages a bit and duplicated my changes between archweb_dev and archweb_pub.

I left the original id based urls in place too in case there are links to them. Even though get_absolute_url exists, I found links that build urls directly in dependencies and required_bys, so I would not be surprised to see id based urls elsewhere in our code.
Comment by Dan McGee (toofishes) - Friday, 18 April 2008, 03:06 GMT
This simple? You didn't push your updates yet so I can't see what you may have named the architecture field, which I assume you have now due to its inclusion on your details page.

diff --git a/packages/models.py b/packages/models.py
index 0d3b8e7..49f1582 100644
--- a/packages/models.py
+++ b/packages/models.py
@@ -63,7 +63,7 @@ class Package(models.Model):
super(Package,self).save()

def get_absolute_url(self):
- return '/packages/%i/' % self.id
+ return '/packages/%s/%s/%s/' % (self.repo, self.arch, self.pkgname)

def depends_urlize(self):
urls = ''

Comment by Pierre Schmitz (Pierre) - Saturday, 19 April 2008, 09:58 GMT
This would be nice. Especially for the "flag-out-of-date"-link which could be used without knowing the package id.

Loading...