Re: [PATCH libosinfo/osinfo-db 0/5] Force anchored patterns when matching regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 11, 2018 at 01:15:26PM -0400, Cole Robinson wrote:
> On 09/07/2018 03:18 PM, Fabiano Fidêncio wrote:
> > This patch series basically consists in a fix for a possibly always
> > present issue that I've faced Today after adding more data to osinfo-db.
> > 
> > Please, take a careful look at "db: Force anchored ..." patch as this is
> > the most important patch of the series.
> > 
> > As this change ends up exposing a few more issues on osinfo-db, would be
> > really nice to have the osinfo-db patches merged altogether.
> > 
> > It's important to note that the osinfo-db patches themselves are **not**
> > going to break something in case they're used against a "non-patched"
> > libosinfo.
> > 
> > Also, the osinfo-db patches will have their commit message edited after
> > the libosinfo patches are pushed, so I can reference the proper commit
> > hash in their commit messages.
> > 
> > libosinfo:
> > Fabiano Fidêncio (2):
> >    tests: Expand the arch's parser for isodetect
> >    db: Force anchored patterns when matching regex
> > 
> >   osinfo/osinfo_db.c     | 2 +-
> >   tests/test-isodetect.c | 2 ++
> >   2 files changed, 3 insertions(+), 1 deletion(-)
> > 
> > osinfo-db:
> > Fabiano Fidêncio (3):
> >    altlinux: Fix publisher-id for 4.0 and 4.1
> >    win10: Fix volume-id
> >    openbsd: Fix all publisher-ids
> > 
> 
> I guess technically this could constitute an API break: if a user has custom
> installed db entries and is depending on this behavior, they could see
> different results after an update. That said I doubt it's an issue in
> practice, and implying ANCHORED mode is the better long term option IMO, so:
> 
> Reviewed-by: Cole Robinson <crobinso@xxxxxxxxxx>

If we want anchored matches, then the osinfo-db regexes should
include the "^" and "$" anchors as they see fit. We shouldn't force
it in libosinfo API itself. Note that we explicitly allow apps to
load & interpret the XML files directly without using libosinfo APIs,
which further pushes to using anchors in the XML

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux