[haiku-depot-web] Thoughts on Repo Identifiers

  • From: Andrew Lindesay <apl@xxxxxxxxxxxxxx>
  • To: haiku-depot-web@xxxxxxxxxxxxx
  • Date: Tue, 09 Aug 2016 00:04:47 +1200

Hello;

Currently HaikuDepot (HD) is only fetching material for the HaikuPorts
repository (see #12793).  Time permitting, I might see if I can slowly
get that sorted out so that HD is able to work with other repositories
that might be configured in HDS.

If I use `pkgman list`, I am seeing output such as;

```
Haiku
base-url:  http://packages.haiku-os.org/haiku/master/x86_gcc2/current/
priority:  1

HaikuPorts
base-url: 
http://packages.haiku-os.org/haikuports/master/repo/x86_gcc2/current/
priority:  1
```

I assume that the name "Haiku" and "HaikuPorts" is coming from the
`repo.info` file in the repository when the repository is added to the
Haiku host.  In these cases, the name looks like an identifier, but for
Michel's repository it is "Guest One's bin ports x86_gcc2".  So I think
the string is intended to be a human-readable name rather than an
identifier for the repository.  Would that be right?  If this is the
case then using the `repo.info` name field as an identifier would be a
bad idea.

Another way to correlate the local repositories with those on HDS would
be via the URL.  Both the local system and HDS have the URL configured
so this should be a good common key and is already in place.  The
downside would be that the URL may change for some reason, but I don't
think that seems very likely.

There is perhaps an argument here for introducing an artificial key to
identify the repository such as;

* org.haiku-os.haiku
* org.haiku-os.haikuports
* za.co.clasquin-johnson.clasqm

...but that would require some coordinated work in a number of areas to
pull together.

Does anybody have any thoughts on this matter?

Regards;

-- 
Andrew Lindesay
www.silvereye.co.nz

Other related posts: