[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#732696: os-prober: Fails to detect new package-management Haiku builds



On 3/11/14, 1:22 AM, Cyril Brulebois wrote:
> Hi David,

Sorry for the delay --- very busy with other things.

> David Given <dg@cowlark.com> (2013-12-20):
[...]
>> Currently package management builds are only available in nightly
>> releases but there should be an official release Real Soon Now, and
>> package management should become the norm. It'd be nice to get this
>> fixed before this happens.
> 
> I'm not familiar with haiku, is that out yet?

Still in alpha, and it looks like there'll be at least one alpha before
the beta comes along. It's actually pretty solid mostly, although with a
few rough edges.

>> I enclose a patch which should fix this (to be applied to /usr/lib/os-
>> probes/mounted/83haiku).
> 
> Did that get tested against said release if it's published?

Against a nightly build (currently the only place where you can get the
Package Management kernels).

[...]
>> -if head -c 512 "$partition" | grep -qs "system.haiku_loader"; then
>> +if head -c 512 "$partition" | grep -qs 'system.*haiku_loader'; then
[...]
>> -if system="$(item_in_dir "system" "$mpoint")" &&
>> +system="$(item_in_dir "system" "$mpoint")"
>> +packages="$(item_in_dir "packages" "$mpoint/$system")"
>> +found=
>> +if [ "$system" != "" ] &&
[...]
> Do we need to hardcode checking both version? Looking at item_in_dir's
> implementation, the pattern is passed to grep, so we could use
> 'kernel_.*' instead?

It's been a while, so I've forgotten the details, but I have a vague
memory of trying that and it not working. It was very likely something
else I was doing wrong, but I'm not terribly keen on using grep on
binaries because I don't know where the edge cases are, and it all felt
sufficiently brittle that once it *did* work I didn't want to play with it.

TBH if this were mine I'd be inclined to remove most of this logic. The
prober doesn't do anything with the files other than to look to see if
they're there. Simply checking the boot loader for 'haiku' would be a
lot simpler and more robust.

Unfortunately, I don't have access to the machine I've got which has
Haiku on it right now, so I'm afraid I won't be able to do any work on
this for a bit. I did post the patch to one of the Haiku mailing lists
and they didn't spot anything wrong with it, and it *did* work when I
sent it...

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "You cannot truly appreciate _Atlas Shrugged_ until you have read it
│ in the original Klingon." --- Sea Wasp on r.a.sf.w

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: