[haiku-bugs] Re: [Haiku] #14927: HaikuDepot doesn't show any packages

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 18 Nov 2019 07:56:34 -0000

#14927: HaikuDepot doesn't show any packages
---------------------------------------+----------------------------
   Reporter:  KapiX                    |      Owner:  apl-haiku
       Type:  bug                      |     Status:  reopened
   Priority:  normal                   |  Milestone:  Unscheduled
  Component:  Applications/HaikuDepot  |    Version:  R1/Development
 Resolution:                           |   Keywords:
 Blocked By:                           |   Blocking:
Has a Patch:  0                        |   Platform:  All
---------------------------------------+----------------------------
Comment (by pulkomandy):

I agree with you that it would be more logical and less confusing to
 rename "url" to "identifier" and use a UUID. If I remember correctly this
 was discussed but rejected.


 What was rejected is breaking the repository format, and preventing
 seamless upgrades. If we had replaced the URL with an UUID, we would have
 prevented users from upgrading from the old to the new format, because the
 ID of the repos would have changed. So we are stuck with the url as an
 identifier.

 This has, however, no impact on how we name things, at least in the
 sourcecode. So, yes, think of 'url' as an unique identifier for the repo,
 which happens to be in URL form, but that could change for new repos (for
 existing ones, we can't change it).


4 If the old URL, now base-URL still points to a valid repository, can't
 the indentifier-URL be extracted from there over the network?


 Do this carefully. You can get it from the package repo file on the
 server, but you have to make sure you are reaching the actual repo and not
 some man-in-the-middle trying to add malware to your install. The more
 secure way would be to hardcode a list of well-known repos to migrate?
 But, maybe it's ok if we just trust the server for the case where no URL
 is currently set. We don't have signing of the repos or packages
 currently, so maybe it isn't worth too much effort securing this migration
 (and once we have migrated, this problem doesn't remain)

 Still, base-url and url are not, in general, interchangeable. base-url is
 where to find the data on the web, and url is a badly named identifier for
 the data.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14927#comment:12>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: