[Mageia-dev] [soft-commits] [5686] For non-local media, iurt is suppressing the urpmi. cfg file while creating
Arnaud Patard (Rtp)
arnaud.patard at rtp-net.org
Thu Sep 6 11:53:38 CEST 2012
Thierry Vignaud <thierry.vignaud at gmail.com> writes:
> On 5 September 2012 18:05, Thierry Vignaud <thierry.vignaud at gmail.com> wrote:
>>> Log Message
>>>
>>> For non-local media, iurt is suppressing the urpmi.cfg file while creating
>>> the chroot.
>>
>> Wrong, it's always removed
>>
>>> This has the side effect of forcing people to use things like
>>> --chrooted-urpmi even if the iurt configuration is fine (since it managed
>>> to create the chroot). So, add media while creating the build chroot for
>>> non-local media, as long as --chrooted-urpmi has not been used.
>>
>> Anyway this is insane IMHO: new logic is:
>> - add media
>> - install pkgs
>> - remove media
>> - readd media
>>
>> Either you should use --chrooted-urpmi (instead of re-implementing it)
>> or you should just not remove the media in the first place when using
>> use__urpmi_root,
>> aka if using remote media
>
> Ping?
> Does this patch works for your usage?
@@ -440,8 +428,11 @@ sub build_chroot {
}
# remove files used by --urpmi-root
- sudo($config, "--rm", "$tmp_chroot/etc/urpmi/urpmi.cfg");
- sudo($config, "--rm", "$tmp_chroot/var/lib/urpmi/*");
+ #if (!$urpmi->{use__urpmi_root} || $run->{chrooted_urpmi}) {
+ if (!($urpmi->{use__urpmi_root} && !$run->{chrooted_urpmi})) {
+ sudo($config, "--rm", "$tmp_chroot/etc/urpmi/urpmi.cfg");
+ sudo($config, "--rm", "$tmp_chroot/var/lib/urpmi/*");
+ }
I thought about similar change too. My usage is avoiding to do something like :
$ iurt --chrooted-urpmi -m core/release -- http://127.0.0.1/ -r cauldron <arch> <src.rpm>
when you already have this very same media in the iurt
configuration. So, I guess this change will fix it. Unfortunately, it
may bring troubles in some corner cases.
For instance:
Someone installs iurt and then creates a chroot with:
$ iurt -r cauldron <arch> -c
(repository url http://127.0.0.1/)
Now, tries to rebuild with:
$ iurt --chrooted-urpmi -m myother/release -- http://10.0.0.1/ -r cauldron <arch> <src.rpm>
With your proposed change, the urpmi.cfg file won't be the same. I don't
know if it matters in practice but I wanted to avoid any regressions as
most as possible.
Arnaud
More information about the Mageia-dev
mailing list