unable to use mock

cranium2003 cranium2003 at yahoo.com
Wed Jun 7 09:54:08 UTC 2006


hi paul,
--- cranium2003 <cranium2003 at yahoo.com> wrote:

> Hi Paul,
>        I did yum install yum-utils and then
>  python fedora-mirror.py
> syncing: Fedora development core i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora development core i386 source to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora development extras i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora development extras i386 source to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 core i386 debuginfo to /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 core i386 source to /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 extras i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 extras i386 source to /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 updates i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 updates i386 source to /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 updates-testing i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 updates-testing i386 source to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 legacy i386 debuginfo to
> /srv/mirror
> No Repositories Available to Set Up
> syncing: Fedora 5 legacy i386 source to /srv/mirror
> No Repositories Available to Set Up
> 
> whats that mean?? my fedora-mirror.py attached here.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com > #!/usr/bin/python
> 
> ### License: GPL
> ### Author:  Rudolf Kastl
> 
> ### default target: /srv/mirror
> ### how?: use config file and special mirror .repo
> files
> 
> ### todo:
> 
> #### code:
> ### - ConfigParser
> ### - logging
> ### - legacy and updates-testing awareness
> ### - fix hierachy into the fedora mirror dir scheme
> ### - use separate configs for each release
> ### - progressbars
> ### - eta (complete, per repo, per file(?!))
> 
> #### support files/packaging/integration:
> ### - creation of specially crafted .repo files
> ### - cron integration
> ### - 0 conf apache serving as split package
> ### - mock config files as split package
> ### - yum localmirror config files as split package
> ### - discuss access rights on /srv/mirror
> 
> ##################
> ### special cases:
> ### - the fedora core repos differ in logic -> core
> repos have updates, updates-testing, legacy -> to be
> investigated
> ### - development is another special case not having
> updates updates-testing and legacy
> ### - other repos (3rd party) never have updates and
> updates-testing
> ### - SRPMS are another special case -> same for
> each arch of the same release
> #############################
> 
> 
> 
> import os
> 
> flavourlist=["core", "extras", "updates",
> "updates-testing", "legacy"]
> #versionlist=["development", "5", "4", "3", "2"
> ,"1"]
> versionlist=["development", "5"]
> archlist=["i386" ]
> #targetlocation="/home/che/mirror"
> subflavourlist=["debuginfo", "source"]
> 
> ##### block for parsing commandline switches
> from optparse import OptionParser
> 
> parser = OptionParser()
> ### var can be accessed with options.filename
> parser.add_option("-d", "--dest",
> dest="destination", help="Sync Destination",
> metavar="dir", default="/srv/mirror")
> parser.add_option("-n", "--newonly",
> action="store_true", dest="newonly", help="Sync
> Destination", default=False)
> parser.add_option("-t", "--testonly" ,
> action="store_true", dest="testonly", help="No Sync
> Transaction", default=False)
> parser.add_option("-q", "--quiet",
> action="store_false", dest="verbose", default=True,
> help="don't print status msgs to stdout")
> 
> (options, args) = parser.parse_args()
> ##### end bloc
> 
> targetlocation = options.destination
> 
> def syncMirror (version, flavour, arch, subflavour,
> targetlocation):
>         print "syncing: Fedora " + version, flavour,
> arch, subflavour, "to", targetlocation
> 
>         ### handling the special cases
>         if subflavour == "binary":
>                 subflavourid = ""
>                 subflavourpath = ""
>         elif subflavour == "source":
>                 subflavourid = "-"+subflavour
>                 subflavourpath = "/SRPMS"
>         else:
>                 subflavourid = "-"+subflavour
>                 subflavourpath = "-"+subflavour 
>         
>         ### devel is special
>         if version == "development":
>                
> repoid="mirror-"+flavour+"-"+version+subflavourid
>         else:
>                
> repoid="mirror-"+flavour+subflavourid
>         
>         if subflavour == "source":
>                
>
targetdir=targetlocation+"/fedora/"+version+"/"+flavour+subflavourpath
>         else:
>                
>
targetdir=targetlocation+"/fedora/"+version+"/"+flavour+"/"+arch+subflavourpath
>         
>         ### handling the newonly option of reposync
>         if options.newonly == True:
>                 newonly = " -n"
>         else:
>                 newonly = ""
>         
>         ### building the command for syncing a
> single repo
>         syncdistro="mirrorreleasever="+version+"
> mirrorbasearch="+arch+" /usr/bin/reposync"+newonly+"
> -r "+repoid+" -p "+targetdir
> 
>         ### for testing we just print instead of
> sync
>         if options.testonly == True:
>                 print syncdistro
>         else:
>                 ### create potentially missing paths
>                 try:
>                         if os.path.isdir(targetdir)
> == False:
>                                
> os.makedirs(targetdir)
>                 except:
>                         print "Error: Cannot create
> targetdirectory:", targetdir
> 
>                 os.system(syncdistro)
> 
> #### main loop
> for version in versionlist:
>         for flavour in flavourlist:
>                 for arch in archlist:
>                         for subflavour in
> subflavourlist:
>                                 ### stuff that just
> doesent happen
>                                 if version ==
> "development" and flavour == "updates":
>                                         continue
>                                 if version ==
> "development" and flavour == "legacy":
>                                         continue
>                                 if version ==
> "development" and flavour == "updates-testing":
>                                         continue
>                                 else:
>                                        
> syncMirror(version, flavour, arch, subflavour,
> targetlocation)
> 

       What can i do now with my above results?? i am
failing to build local repo.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the fedora-extras-list mailing list