Re: syncRpms.py error...need help

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

 



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@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx
>
https://www.redhat.com/mailman/listinfo/kickstart-list


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




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux