[ PATCH ] Re: [et-mgmt-tools] Cobbler cobbler-0.8.0-1.el5 not importing 64bit RHEL 4.6 properly FIXED

Michael DeHaan mdehaan at redhat.com
Tue Mar 18 22:25:04 UTC 2008


Lester M. wrote:
>  was having this same problem a while ago when that version was 
> released. I made a patch that will fix the issue that I would like 
> to share with everyone here.
>  
> The architecture type is calculated in many ways I noticed which was 
> my first clue, the first way it uses directories (either as i386 or 
> x86_64 and ia64 I believe from looking at the source codes.), the 2nd 
> way is thathe 3rd way is looking for a certain rpm file. 
> (Kernel-header) of course in RHEL4 the kernel-header rpm does not 
> exist. I still find it very weird that the software could not deduct 
> that if the rpm did not exist fall back to using another method of 
> checking but what the heck.  :-P
>  
> The only thing I did was in action_import.py make another statement to 
> look for a RHEL4 version rpm, an rpm specific to RHEL4.. I used the 
> code for the search pattern that is used in RHEL5 (kernel-header).
>  
>  
> Please review my patch for inclusion, as it fixes that problem.

Excellent.  I'm away from my development setup this week (class stuff), 
so I'll test this out and patch it early next week.
There's also an open defect on the WebUI and repo management to 
investigate, so this may make a likely candidate for an 0.8.3.

Thanks!


> -- Les
>
> Name : cobbler
> Version : 0.8.2-2
>
>  
>
>  <-- ##### Start Patch ##### -->
>
> --- action_import.py    2008-03-18 21:48:40.000000000 -0400
> +++ /usr/lib/python2.4/site-packages/cobbler/action_import.py   
> 2008-03-18 22:08:11.000000000 -0400
> @@ -565,7 +565,23 @@
>                 elif x.find("ia64") != -1:
>                     foo["result"] = "ia64"
>                     return
> -
> +
> +
> +# This extra code block is a temporary fix for rhel4.x 64bit distro 
> ARCH identification-- L.M.
> +       for x in fnames:
> +           if not x.endswith("rpm"):
> +               continue
> +           if x.find("kernel-largesmp") != -1:
> +               print _("- kernel header found: %s") % x
> +               if x.find("i386") != -1:
> +                   foo["result"] = "x86"
> +                   return
> +               elif x.find("x86_64") != -1:
> +                   foo["result"] = "x86_64"
> +                   return
> +               elif x.find("ia64") != -1:
> +                   foo["result"] = "ia64"
> +                   return
>
>     def learn_arch_from_tree(self,dirname):
>         """
>
>  <-- ##### End Patch ##### -->
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools




More information about the et-mgmt-tools mailing list