Description of Problem: rpm --dbpath /home/pzb/special/one/usr/lib/rpmdb/i386-redhat-linux/redhat -q --whatprovides /usr/bin/sendmail shows that /usr/bin/sendmail is not owned by any package, while sendmail provides /usr/bin/sendmail /home/pzb/special/one contains the extract rpmdb-redhat package from Hampton beta 1 Version-Release number of selected component (if applicable): rpm 4.0.3-1.03 and rpmdb-redhat-7.2.90-0.20020206.i386 How Reproducible: always
sendmail package name-version-release, please, so I can verify what's going on, as I also suspect that some packager may have done Provides: /usr/sbin/sendmail without realizing that that is a packaging error. Meanwhile, you are confusing Provides: with contains, as in the statement The sendmail package contains /usr/bin/sendmail, but does not Provide: /usr/sbin/sendmail. That's wired into the design of rpm. So the designed syntax is rpm -qf ... /usr/sbin/sendmail not rpm -q --provides /usr/sbin/sendmail And, yes, I'm deliberately blurring the implementation in rpm so that down the road, file paths are gonna be just another form of Provides: Nope, rpm is not there yet.
sendmail-8.11.6-12 redhat-lsb-1.1.0-0.2 rpm -q --provides sendmail-8.11.6-12smtpdaemon /usr/sbin/sendmail /usr/bin/mailq /usr/bin/newaliases /usr/bin/rmail /usr/share/man/man1/mailq.1.gz /usr/share/man/man1/newaliases.1.gz /usr/share/man/man5/aliases.5.gz sendmail = 8.11.6-12
Broken packaging. This is a feature request disguised as a bug report ATM. I get a lot of those.
so I need to file bugs against the LPRng and sendmail packages because they provide things starting with a '/'?
Dunno yet, stay tuned.
Providing things starting with "/" is the right thing todo. Thanks, Florian La Roche
While you may feel that providing things starting with / is the right thing to do, it does not work correctly with any released version of RPM. RPM does not support providing things that start with a /, so it is a packaging problem. This is still present in beta2, so I'm reopening, changing to beta2, and adding jbj to the CC, as he was the one that said you can't have provides starting with /.
In fact, provided tokens with a '/' does "work" correctly (i.e. dependencies will be resolved) in rpm-4.0.3 but queries need to be taught to look in the Providename index if not found as a file name. Florian: while we agree that providing '/' tokens is the Right Thing to Do, the open question is "When?" and the answer AFAIK ATM is "Not now." That leads to the answer of "Broken packaging.". Still.
Still seeing this with sendmail-8.12.2-8.
This seems to be consistent within rawhide, so I'll close this bug now. cu, Florian La Roche
This is _not_ fixed. You CAN NOT provide things starting with a "/" and expect it to work correctly. Please see jbj's last comment. This is still "broken packaging" as of sendmail-8.12.2-8. Please do not close this bug until sendmail no longer has Provide tags that start with /.
So fix the problem with --whatprovides instead of squawking and send me a patch. The fix is gonna be in lib/query.c, all that's needed is to check Providename if a token starting with '/' is not found in Basenames: case RPMQV_WHATPROVIDES: if (arg[0] != '/') { mi = rpmdbInitIterator(rpmdb, RPMTAG_PROVIDENAME, arg, 0); if (mi == NULL) { rpmError(RPMERR_QUERYINFO, _("no package provides %s\n"), arg); retcode = 1; } else { retcode = showMatches(qva, mi, showPackage); } break; } /*@fallthrough@*/ case RPMQV_PATH:
Fixed (by always looking in Providename, then Basenames if arg starts with '/') in rpm-4.0.4-7x.9