Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2019-01-02 Thread Panu Matilainen
Like said, this is a generic problem in rpm where diagnostic messages are 
dumped on stdout. Other similar examples include (but not limited to):
```
[pmatilai@sopuli ~]$ rpm -q --whatprovides bar
no package provides bar
[pmatilai@sopuli ~]$ touch foo
[pmatilai@sopuli ~]$ rpm -qf foo
file /home/pmatilai/foo is not owned by any package
```
All spewed into stdout against core unix principles. But the world is full of 
scripts that grep specifically for these messages because they've always been 
there. And so there are scripts that test for empty packages by grepping 
specifically for that "(contains no files)" message, and changing it would 
break those scripts. Ditto for all the other similar cases. And that's exactly 
why we need to address the generic problem rather than individual messages so 
we can do a clean break that people can also then adjust to, once.

I fully agree the rpm behavior is in error, but this is not the right fix to 
the overall problem. NAK.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-450869382___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2019-01-02 Thread Panu Matilainen
Closed #615.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#event-2050402248___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Stanislav Nevolin
I think that the patch fixes an ERROR in user interface of rpm utility.
When a user asks for a list of package's files he wants to get exactly the list 
of files, doesn't he? And if there's no files in the package then he wants to 
get an empty output, doesn't he? Why instead of empty output he gets a text 
message (according to user's locale)? I think it looks unpredictable and non 
intuitive.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449499880___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Andreas Schwab
For the same reason there is ls when a script uses *.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449497239___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread dmitry-vakhnenko
> You can get the list of files with rpm -q --qf='[%{FILENAMES}\n]'. There is 
> nothing dirty about that, those are the building blocks.

So, for what `rpm -ql` ?

And, as example same behaviour of `ls` (Why you have OWN WAY and why this 
solution right?):
```Bash
$ mkdir empty_dir
$ cd empty_dir/
$ ls
$ echo $?
0
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449495684___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Andreas Schwab
You can get the list of files with rpm -q --qf='[%{FILENAMES}\n]'.  There is 
nothing dirty about that, those are the building blocks.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449483367___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread dmitry-vakhnenko
> I don't see that this is the rpm binary's issue

I completely disagree with this imprisonment.

You (or your team ) made strange, unpopular decision that makes problems for 
simple (popular, expected) case. Other software put this warning to stderr or 
just return nothing with success code.

You forced developers to produce hardcode that forces bugs with different 
behaviors in environments.

Software shouldn't force you to write bad code.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449480485___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Russ Herrold
if the problem is an empty file being queried, why not solve teh problem where 
the action occurs (before the test), with something simple like:

[ -s $ARG ] && ... 

I don't see that this is the rpm binary's issue

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449471367___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Stanislav Nevolin
> You can use rpm -q --qf='%{FILENAMES:arraysize}\n' to get the number of files.

Ok. And what about getting a list of included files? Do you have a dirty trick 
for that? And why we can't just trust `rpm -ql` to do this simple task?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449464112___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Stanislav Nevolin
> changing them _will_ break some scripts that expect them there

No, you can't even rely on this behavior in scripts, because this message 
(contains no files) is locale-dependent. You can't use it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449462630___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Andreas Schwab
You can use rpm -q --qf='%{FILENAMES:arraysize}\n' to get the number of files.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449384859___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-21 Thread Panu Matilainen
This (spewing "helpful" messages into stdout) is a much broader problem than 
just this one message, and we should address them all at once or not at all. As 
much as mostly everybody hates these "helpful" messages, changing them *will* 
break some scripts that expect them there, so if/when breakage is necessary 
it's better to break clean once than a little bit here in one release and some 
other bit in the next etc.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449343652___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-20 Thread ニール・ゴンパ
Conan-Kudo approved this pull request.

LGTM



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#pullrequestreview-187249075___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-20 Thread Stanislav Nevolin
> Isn't that what the `--quiet` switch is for...?

No, definitely no. Because --quiet switch suppresses all output, so the output 
of rpm -ql of a normal package with a set of files included in will be also 
empty.

Example:
$ rpm -ql bzip2-devel-1.0.6-28.fc29.x86_64 | wc -l
6
$ rpm -ql --quiet bzip2-devel-1.0.6-28.fc29.x86_64 | wc -l
0

So you can't use --quiet switch to get number of package's files in a shell 
script.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449210038___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Moving unnecessary notice about empty rpm packages to debug message. (#615)

2018-12-20 Thread ニール・ゴンパ
Isn't that what the `--quiet` switch is for...? I'm not sure this patch makes 
sense...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/615#issuecomment-449205132___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint