Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666678 - GLEP 75: "hexadecimal integer" is ill-defined
Summary: GLEP 75: "hexadecimal integer" is ill-defined
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: GLEP Changes (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GLEP Editors
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-21 08:47 UTC by Ulrich Müller
Modified: 2018-12-01 12:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Clarify conversion into hexadecimal notation. (0001-glep-0075-Clarify-conversion-into-hexadecimal-notati.patch,1.40 KB, text/plain; charset=utf-8)
2018-12-01 11:19 UTC, Ulrich Müller
Details
Fix a typo. (0002-glep-0075-Fix-a-typo.patch,1022 bytes, text/plain; charset=utf-8)
2018-12-01 11:19 UTC, Ulrich Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2018-09-21 08:47:07 UTC
In section "Filename hash structure", item 3. says:

3. For each integer C in cutoff list:

    a. Take C most significant bits of H and store them as V.
    b. Convert V into hexadecimal integer, left padded with zeros
       to C/4 digits (rounded up) and append it to the path, followed
       by the path separator.
    c. Shift H left C bits.

In b. it is not clear what an "hexadecimal integer" is; it could use letters abcdef or ABCDEF (corresponding to %x or %X format specifiers).

Also in c., shifting H left will leave you with the same most significant bits in the next iteration step. Shouldn't it rather say that C bits are chopped off the left end of H?
Comment 1 Ulrich Müller gentoo-dev 2018-09-21 08:50:21 UTC
Also (just above) it says 2⁴ = 8. :-)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-09-21 15:41:13 UTC
Would you be able to submit a series of patches for this?
Comment 3 Ulrich Müller gentoo-dev 2018-12-01 11:19:26 UTC
Created attachment 556866 [details]
Clarify conversion into hexadecimal notation.

(In reply to Michał Górny from comment #2)
> Would you be able to submit a series of patches for this?

Attached.
Comment 4 Ulrich Müller gentoo-dev 2018-12-01 11:19:49 UTC
Created attachment 556868 [details]
Fix a typo.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-01 11:28:32 UTC
Thanks.  LGTM.  Please either push or send to ml, as you see fit.
Comment 6 Larry the Git Cow gentoo-dev 2018-12-01 12:59:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/data/glep.git/commit/?id=1993155e3e113c21cb25891167ce885be74b0ade

commit 1993155e3e113c21cb25891167ce885be74b0ade
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2018-12-01 11:16:43 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2018-12-01 12:57:02 +0000

    glep-0075: Fix a typo.
    
    Bug: https://bugs.gentoo.org/666678
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 glep-0075.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/data/glep.git/commit/?id=30c40c96a8b75f78d1a1aa51e4f3e0c31bfb0118

commit 30c40c96a8b75f78d1a1aa51e4f3e0c31bfb0118
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2018-12-01 11:14:51 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2018-12-01 12:57:01 +0000

    glep-0075: Clarify conversion into hexadecimal notation.
    
    Bug: https://bugs.gentoo.org/666678
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 glep-0075.rst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)