[haiku-depot-web] Re: Sample Data

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-depot-web@xxxxxxxxxxxxx
  • Date: Sun, 29 Sep 2013 11:12:09 +0200

On 09/29/2013 10:08 AM, Andrew Lindesay wrote:
It is possibly a silly question, but can somebody (probably Ingo) point
me at the base URL format for the current repository for the nightly
builds?

The base URL for the HaikuPorts package repositories is:

  http://haiku-files.org/files/repo/

The current one (hrev46124) for architecture "x86" is under "9818164862edcbf69404a90267090b9d595908a11941951e904dfc6244c3d566". The "packages" subdirectory of all repository directories is currently just a symlink to the same directory [1], which contains all packages in various versions for all architectures.

Can you also let me know the easiest way to get some sample as-built
".PackageInfo", HPKG and HPKR files?

Actual HPKG and HPKR ("repo") files you can find aplenty on the server. .PackageInfos as such you won't find easily in the wild, but you can extract them from the package files.
On Haiku:

  package extract the-package.hpkg .PackageInfo

From within a configured Haiku build directory on any supported build platform:

  jam -q run ':<build>package' extract the-package.hpkg .PackageInfo

That reminds me: Have you already thought about how to read package and repository meta data from the respective files? Writing a parser for the HPKG and HPKR formats would be quite a bit of work, so I would suggest to either make use of libpackage (via JNI or JNA) or parse the output of the "package" and "package_repo" commands. For the latter the output would need to be canonicalized -- mainly making sure that strings like the summary and the description are printed in a way such that they don't make the output ambiguous and that they can be parsed into their original form again.

CU, Ingo

[1] http://haiku-files.org/files/hpkg/


Other related posts: