[Yum-devel] [patch] use basepath in URL resolution

Jeremy Katz katzj at redhat.com
Sun Oct 1 23:13:08 UTC 2006


On Sun, 2006-10-01 at 19:05 -0400, seth vidal wrote:
> On Sun, 2006-10-01 at 18:30 -0400, Jeremy Katz wrote:
> > On Sat, 2006-09-30 at 07:47 +0200, Tim Lauridsen wrote:
> > > Jeremy Katz wrote: 
> > > If the '--urls' options is used then repo.urls[0] + relativepath is
> > > printed. 
> > > > Does it make sense to have YumAvailablePackage.remote_url as a property
> > > > which returns basepath/url + relativepath?
> > > >   
> > > It could be useful for printing the full remote URL, like done in the
> > > in the tools above.
> > 
> > *nod*  That's the use case I was basically thinking of -- anyone else
> > agree?
> 
> not so good for mirrors, what does it hand you back? the next mirror url
> in the list+relative path?

I would think that you have something like
  if basepath:
    url = basepath
  else:
    url = urls[0] # next in mirror list
  return url + relativepath

Basically, we _already_ have tools doing urls[0] + relativepath, and
that's obviously not the case (given the basepath stuff).  If we at
least encapsulate it in a function, then we can be consistent about
what's done and make changes to the behavior over time as we see fit

Jeremy




More information about the Yum-devel mailing list