[aur-dev] [PATCH v2] UPGRADING: Add note on backward compatible package URLs

Lukas Fleischer archlinux at cryptocrack.de
Wed Aug 10 17:21:20 EDT 2011


On Wed, Aug 10, 2011 at 05:02:40PM -0400, Dave Reisner wrote:
> On Wed, Aug 10, 2011 at 10:53:31PM +0200, Lukas Fleischer wrote:
> > On Wed, Aug 10, 2011 at 04:29:28PM -0400, Dave Reisner wrote:
> > > On Wed, Aug 10, 2011 at 10:12:44PM +0200, Lukas Fleischer wrote:
> [...]
> > > > 
> > > >   RewriteRule ^/packages/([^/]{1,2})([^/]*(/[^/]*)?)$ /packages/$1/$1$2
> > > > 
> > > > Well, this will kinda fail when requesting "/packages/fo/foo" as it will
> > > > try to rewrite that. Given that this rewrite rule is used to provide
> > > > backward compatibility for broken AUR helpers only, I would say that
> > > > this is ok, though.
> > > 
> > > Rewriting /packages/fo/foo is bad, always. The anti-backwards compat
> > > view would be that not rewriting /packages/fo would be "good". If
> > > there's a solution that handles both, I say we go for it. Seems this
> > > might be a little difficult though...
> > 
> > Not sure if I understood you correctly, but my "rewrite PKGBUILD/source
> > package" URLs only approach below already does that. It does indeed
> > rewrite everything except for requests trying to "fetch" any of the
> > directories containing the source tarball and the PKGBUILD (given that
> > such a directory doesn't contain anything else).
> 
> Then _I_ misunderstood. Carry on.
> 
> > > 
> > > > Maybe we should even ignore everything but PKGBUILDs and source
> > > > packages:
> > > > 
> > > >   RewriteRule ^/packages/([^/]{1,2})([^/]*/(PKGBUILD|.*\.tar\.gz))$ /packages/$1/$1$2
> > > > 
> > > > Opinions?
> > > 
> > > -1 from me. Not extensible, but I'll make reference again to
> > > aforementioned difficulty in a 'one size fits all' solution.
> > 
> > Any reasons?
> 
> Just because maybe in the future we'd have some other file in the
> package directory that we'd want to make accessible. Do we plan to
> expire the old URLs at some point (i.e. remove the redirect)?

Well, as I said before, those rewrite rules do only exist because of
some broken AUR handlers (sorry, dude :p ) relying on the current
location of the files we currently provide. The next release
announcement will contain some notice that hardcoding the source tarball
URL is discouraged and unsupported. We might eventually remove the
rewrite rules although there is no schedule yet. This is just a favour
to all AUR helper developers :)


More information about the aur-dev mailing list