[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: syncRpms.py error...need help



thanks for the patch Alain. Unfortunately, my test
server is packed away in storage so I can't
verify...but I trust you :). 

The scripts were originally written for 8.0, and I
never really tested thoroughly on 9.0. Sorry for the
inconvenience.

    --brett


--- Alain TAUCH <anaconda maisondubonheur com> wrote:
> On Fri, 31 Oct 2003 17:19:15 +0530
> Gautam Pagedar [Gautam] wrote:
> 
> Gautam> Hi Alain,
> Gautam> 
> 
> hi,
> 
> hereafter is a patch for your script:
> 
> --------8<------ cut here
> ------------------8<---------
> --- syncRpms.py 2003-10-31 14:00:40.000000000 +0100
> +++ syncRpms.py.rh9     2003-10-31
> 14:01:31.000000000 +0100
> @@ -27,7 +27,7 @@
>  #      02111-1307  USA
>  #
>  
> -import rpm404 as rpm
> +import rpm
>  import sys, os, glob
>  
>  if len(sys.argv) != 3:
> @@ -42,10 +42,11 @@
>  #       get pkg name to file name mapping
>  #
>  name2file = {}
> +ts = rpm.TransactionSet("",
> rpm._RPMVSF_NOSIGNATURES)
>  for fname in glob.glob(tgtdir + '*.rpm'):
>          fd = os.open(fname, os.O_RDONLY)
> -        (header, isSource) =
> rpm.headerFromPackage(fd)
> -        name2file[header[rpm.RPMTAG_NAME]] = fname
> +        hdr = ts.hdrFromFdno(fd)
> +        name2file[hdr[rpm.RPMTAG_NAME]] = fname
>          os.close(fd)
>  
>  #
> --------8<------ cut here
> ------------------8<---------
> 
> works fine on my rh9.
> 
> -- 
> Alain
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list redhat com
>
https://www.redhat.com/mailman/listinfo/kickstart-list


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]