Bug 146821 - Pkgs with names longer than 79 chars cause problems for genhdlist
Pkgs with names longer than 79 chars cause problems for genhdlist
Status: CLOSED DUPLICATE of bug 146820
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: anaconda (Show other bugs)
3.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Anaconda Maintenance Team
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-01 16:32 EST by James Olin Oden
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:08:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Olin Oden 2005-02-01 16:32:24 EST
Description of problem:
If you try to use the --fileorder option of genhdlist and some of 
the rpms you had pkgorder scan hand file names longer than 79 
characters, then the behavior of genhdlist is non-deterministic.
Depending on the length of the package names it may fail outright, 
generate a "halfway" sorted package list, or something that is just
wrong.  If your lucky it will actually fail the sanity check on the
filename, if not it will not "fail" and you won't find out anythings
wrong until you install the generated media on a system and things 
get installed in a very wrong order (or worse, almost right order).

Version-Release number of selected component (if applicable):
9.1.4.1

How reproducible:
Always (though the extent of the damage is variable)

Steps to Reproduce:
1. In a valid rpm repository preped for building anaconda media
   add a couple rpms whose names are longer than 79 characters.
2. Now run genhdlist, pkgorder, and genhdlist with the proper options
   as you would when building the media.

  
Actual results:
Depends on your package names (things with lots of -'s in the name
will pass the sanity test).  Either it fails the filename sanity, or
you end up with packages sorted wrong.

Expected results:
No problems whatsoever.

Additional info:
The problem is trivial.  Though pkgorder does not care about the size 
of the lines it prints genhdlist creates a static buffer of 80 chars,
and one must be used for \0.  Just need to change it to dynamically
allocate its buffer as needed.  I have a patch for this and will 
attach it.

BTW, if you follow the earlier Fedora notes on building kernel 
modules in seperate rpms, you end up with some really long filenames 
for the kernel module rpms (kernel-module-somemod-%(uname -r)-1-
1.rpm, increase the length of the original kernel release and the 
kernel modules release, and, hypothetically speaking of course, you 
will exceed 79 chars).
Comment 1 James Olin Oden 2005-02-01 16:34:04 EST

*** This bug has been marked as a duplicate of 146820 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:08:06 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.