On 2014-06-23 20:19, James Antill wrote:
> On Mon, 2014-06-23 at 20:00 +0200, Anders Blomdell wrote:
>> On 2014-06-23 16:50, James Antill wrote:
>>> On Sat, 2014-06-21 at 20:54 -0400, Bob Lightfoot wrote:
>>>> Dear Yum Developers:
>>>>     I recently ran reposync on a remote repo
>>>> {http://buildlogs.centos.org/centos/7/os/x86_64-latest/} from my
>>>> Centos6-i686 system in an attempt to mirror the repo.  Reposync
>>>> downloaded 4726 rpms.
>>>>      Performing the identical task from my Centos6-X86_64 system
>>>> resulted in 8468 rpms being downloaded.
>>>>      I would expect the mirroring of a repo to be identical regardless
>>>> of arch of the host/local system.
>>>>      Is this a valid expectation?
>>>
>>>  No, from the man page:
>>>
>>>        -a ARCH, --arch=ARCH
>>>               Act as if running the specified  arch  (default:  current  
>>> arch,
>>>               note:  does  not  override $releasever. x86_64 is a superset 
>>> for
>>>               i*86.).
>> Suggested patch is here:
>>
>>   http://lists.baseurl.org/pipermail/yum-devel/2014-May/010622.html
> 
>  Look at how repoquery works, with --archlist. That's probably what you
> want to do (you can probably ignor the code for when YumBase.arch
> doesn't exist now). But that should work to allow multiple arches, and
> have a default basearch and auto. setup for x86_64 etc.
> 

OK, by dumb luck I got at least parts right :-)

    parser.add_option("--releasever", default=None,
                      help="set value of $releasever in yum config and repo 
files")
    ...
    repoq.preconf.releasever = opts.releasever

+    parser.add_option("--releasever", default=None,
+        help='set the releasever to use')
...
+    if opts.releasever:
+        my.preconf.releasever = opts.releasever
   

Why repoquery does not needed:

+    if opts.arch:
+        my.preconf.arch = opts.arch

is beyond me (i.e. it did not work without it for me), perhaps something to do 
with: 

/usr/lib/python2.7/site-packages/yum/__init__.py:        
warnings.warn(_('doConfigSetup() will go away in a future version of Yum.\n')

my basearch argument is of course totally bogus (a function of arch). With my 
patch, I can
successfully reposync (fedora-19,fedora-20)(i386/x86_64) from the same machine 
(only arches I have so far), 
which was not possible before. Any reason not to add this (or something 
sismilar) to reposync?

/Anders

-- 
Anders Blomdell                  Email: anders.blomd...@control.lth.se
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to