Re: RFC: deb/ddeb support for debuginfod

2019-12-01 Thread Florian Weimer
* Florian Weimer: > * Frank Ch. Eigler: > >> +inline bool >> +string_endswith(const string& haystack, const string& needle) >> +{ >> + return (haystack.size() >= needle.size() && >> + haystack.substr(haystack.size()-needle.size()) == needle); >> +} > > I think you should use std::equal becau

Re: RFC: deb/ddeb support for debuginfod

2019-12-01 Thread Florian Weimer
* Frank Ch. Eigler: > +inline bool > +string_endswith(const string& haystack, const string& needle) > +{ > + return (haystack.size() >= needle.size() && > + haystack.substr(haystack.size()-needle.size()) == needle); > +} I think you should use std::equal because substr allocations. So som

RFC: deb/ddeb support for debuginfod

2019-11-30 Thread Frank Ch. Eigler
Hi - I present the following quick hack to add .deb/.ddeb support to debuginfod. It works ... but my reservation is political. :-) It works by letting the RPM-scanning code paths recognize .deb and .ddeb files by their suffix, and run them through a different stream-extractor (dpkg-deb --fsys-tar