> I'm using `--shell` for some general purposes because it
splits stdout and stderr of
> command, which is desired and expected behaviour.
>
> For example:
> $ mock -q -r epel7.cfg --shell 'rpmspec -P somespec.spec' >
spec-parsed.spec ,
> or `rpmspec -q ` and so on.
> rpmspec will output smth like
>> warning: bogus date in %changelog: Thu May 26 2006 Tim Waugh
<twaugh(a)redhat.com>
>> 3.1-13
> on most of specs to stderr. But in case of --*-chroot or systemd-nspawn I'll
get
> broken spec with mixed output and so on. It looks for me as systemd's bug now,
not
> mock's. Isn't it?
Really? With mock-1.3.3 I run:
mock --shell --new-chroot ">&2 echo 'error'" >/tmp/o
2>/tmp/e
and /tmp/o is empty end /tmp/e contains:
Erm.. I'm strongly confused, but now (after last `yum update`?) it works fine on
C7.3!
So, I will stress-test systemd_nspawn again.
The only weird way with redirecting stderr only. But looks like it is systemd's bug,
and
not so important for me now.
I tried with Fedora rawhide (26):
# dnf -y --releasever=26 --installroot=/srv/mycontainer install systemd passwd dnf
fedora-release vim-minimal
// strange for me (!)
# systemd-nspawn -D /srv/mycontainer /bin/bash -c "echo hello; echo error
>&2" 2>/dev/null
hello
error
// ok
# systemd-nspawn -D /srv/mycontainer /bin/bash -c "echo hello; echo error
>&2" 1>/dev/null
Spawning container mycontainer on /srv/mycontainer.
Press ^] three times within 1s to kill container.
error
Container mycontainer exited successfully.
// ok
# systemd-nspawn -D /srv/mycontainer /bin/bash -c "echo hello; echo error
>&2" 2>e 1>o
# cat e
...
error
...
$ mock -q -r epel-7-x86_64 --shell --new-chroot "echo stdout; echo 'error'
>&2" 2>/dev/null
stdout
error
Same with last RHEL7/Centos 7.3.
Unless you have
config_opts['plugin_conf']['root_cache_opts']['age_check'] =
False
then root cache should be deleted when timestamp of config change.
If you experience something else, then it is bug.
No, I haven't this line in config. And it looks like a bug for me also.
But I need some more time to stable reproduce it. Currently it is heizenbug =\
> Miroslav, do you have any plans/PoC on implementing templates
> (
https://github.com/rpm-software-management/mock/issues/6#issuecomment-262...
> ) ? :)
Not in my TODO list for near future.
Ok, I would send another useful proposals ;)