Bug 489368
Summary: | Duplicate dirnames in rpm headers and unsorted dirnames in general. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Phil Knirsch <pknirsch> |
Component: | rpm | Assignee: | Florian Festi <ffesti> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 11 | CC: | ffesti, herrold, jnovy, n3npq, pmatilai, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-06-28 11:25:51 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Phil Knirsch
2009-03-09 18:10:05 UTC
Phil Why not just one pass, hashing each dir, and inserting into a b-tree, spotting [and avoiding] collisions (and thus dupes)? -- Russ herrold Hm, how would you manage the dirindexes for the basenames then? I suppose instead of using direct integers you could make it a pointer to a dirindex entry in a struct of the dirname and dirindex with which you populate the b-tree. Sample: struct dnames { int dirindex; char *dirname; struct dnames *left; struct dnames *right; }; and have dirindexes: int *dirindexes; dirindexes = malloc(sizeof(int *) * len_of_filelist); This way you can at least build the b-tree and the basenames list and the dirindexes pointer list in 1 pass and just need a quick 2nd pass to generate the final dirnames list together with the correct dirindexes in the b-tree and then save the values of the pointers in dirindexes. And as the dirnames should be a lot smaller than the filelist the time overhead should be minimal. Let's try a reality check, shall we? The savings in removing duplicates in RPMTAG_DIRNAMES is infintessimal. Do the math ... E.g. the savings is (at least) an order of magnitude smaller than the added overhead of attaching file capabilities to *every* file so that perhaps 100+ files can be installed with capabilities. The data in RPMTAG_DIRNAMES has *never* been guaranteed to be sorted. Examples of unsorted RPMTAG_DIRNAMES are everywhere. Pursuing a sort order for RPMTAG_DIRNAMES hardly changes anything. Unsorted RPMTAG_DIRNAMES will remain in *.rpm packages forevermore. So rpm wil continue to have to sort RPMTAG_DIRNAMES if bsearch is desired. Luckily, there's no access on any critical path in rpm that would benefit from pre-sorted RPMTAG_DIRNAMES. There is no benefit -- to rpm, to developers, to Red Hat, to LSB, etc -- from sorting RPMTAG_DIRNAMES. Nor are there any forseeable benefits from a Newer! Better! Bestest! implementation that I can conceive of even after smoking a lot of crack ... Using a B-tree, or a data structure, to achieve a 1-pass generation of simultaneously sorted RPMTAG_DIRNAMES and RPMTAG_FILENAMES with a RPMTAG_DIRINDEXES lookup is just bleeping overkill. At least do the sort by embedding OCAML or using an Oracle database optimized for parallel retrieval or something manly please ... This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |