Bug 146821

Summary: Pkgs with names longer than 79 chars cause problems for genhdlist
Product: Red Hat Enterprise Linux 3 Reporter: James Olin Oden <james.oden>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: low Docs Contact:
Priority: medium    
Version: 3.0   
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: 2006-02-21 19:08:06 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 James Olin Oden 2005-02-01 21:32:24 UTC
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 21:34:04 UTC

*** This bug has been marked as a duplicate of 146820 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:08:06 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.