The above causes an apparently infinite loop in rpmq, with no output.
$ echo "bar foo" > foo
$ rpm -qlp foo
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
[...]
Another infinite loop, this time with output.
I'd expect rpm to detect the loops and break out of them, outputting an error message.
$ echo foo > foo
$ rpm -qlp foo
The above causes an apparently infinite loop in rpmq, with no output.
$ echo "bar foo" > foo
$ rpm -qlp foo
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
error: open of bar failed: No such file or directory
[...]
Another infinite loop, this time with output.
I'd expect rpm to detect the loops and break out of them, outputting an error message.