From: Marek Benc <merkur32@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add most debian patches to nvi.
Date: Thu, 22 Jan 2015 17:39:31 +0100 [thread overview]
Message-ID: <54C127C3.9070705@gmail.com> (raw)
In-Reply-To: <87r3umby1w.fsf@gnu.org>
On 01/22/2015 05:05 PM, Ludovic Courtès wrote:
> Marek Benc <merkur32@gmail.com> skribis:
>
>> On 01/21/2015 04:03 PM, Ludovic Courtès wrote:
>>> I agree with Andreas: there are 20 patches, and that level of patching
>>> goes beyond our mission, IMO.
>>>
>>> I would rather leave it as is if it’s usable, or remove it, or point to
>>> a new upstream if there is one.
>> In that case, I think at least two of the patches should be allowed to
>> get in, the ones about the Berkely db library, since it's spewing out
>> errors without them. (but the editor itself works)
> You mean there are run-time errors without nvi-db4.patch? What kind?
I mistyped, it's only warnings, the editor seems to work okay. In
particular,
the warnings look like this:
BDB0635 DB_CREATE must be specified to create databases.
BDB0511 page sizes must be a power-of-2
> The second patch is about page sizes apparently. Do you know what the
> deal is?
nvi seems to store the data of files in Berkely DB database objects, and
when
setting up a database for a file, it determines a page size to fit the file
into 15 pages or less, using a page size of at least 1K and at most 10K.
The way it does the calculation, I quote:
psize = ((sb.st_size / 15) + 1023) / 1024;
if (psize > 10)
psize = 10;
if (psize == 0)
psize = 1;
psize *= 1024;
makes psize hold a variable that's a multiple of 1024, but not necessarilya
power of two (for example, 3072). This didn't use to be a problem
before, but
nowadays, BDB requires pages to be powers of two, and so the modified
code, I
quote:
psize = ((sb.st_size / 15) + 1023) / 1024;
if (psize >= 8) psize=8<<10;
else if (psize >= 4) psize=4<<10;
else if (psize >= 2) psize=2<<10;
else psize=1<<10;
psize *= 1024;
fixes that problem.
> Two/three patches would be OK, but we need to have an understanding of
> why we’re carrying these particular patches.
Sure, I understand.
>
> Thank you!
>
> Ludo’.
Marek
next prev parent reply other threads:[~2015-01-22 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54BFBAED.3090502@gmail.com>
2015-01-21 14:44 ` [PATCH] gnu: Add most debian patches to nvi Marek Benc
2015-01-21 15:03 ` Ludovic Courtès
2015-01-21 15:25 ` Marek Benc
2015-01-22 16:05 ` Ludovic Courtès
2015-01-22 16:39 ` Marek Benc [this message]
2015-01-22 16:45 ` Marek Benc
2015-01-22 20:52 ` Ludovic Courtès
2015-01-22 22:17 ` Marek Benc
2015-01-23 8:48 ` Ludovic Courtès
2015-01-20 18:20 Marek Benc
2015-01-21 9:35 ` Andreas Enge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C127C3.9070705@gmail.com \
--to=merkur32@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.