xbps-query(8): --regex now matches EREs in case insensitive mode.

This commit is contained in:
Juan RP 2015-01-18 17:50:26 +01:00
parent b7fd0dcac5
commit 94d0e4e131
3 changed files with 4 additions and 2 deletions

2
NEWS
View File

@ -1,5 +1,7 @@
xbps-0.44 (???):
* xbps-query(8): --regex option now matches EREs in case insensitive mode.
* libxbps: globally check for unresolved shared libraries before accepting
a transaction to make sure there's no broken packages.

View File

@ -181,7 +181,7 @@ ownedby(struct xbps_handle *xhp, const char *pat, bool repo, bool regex)
if (regex) {
ffd.rematch = true;
if (regcomp(&ffd.regex, ffd.pat, REG_EXTENDED|REG_NOSUB) != 0)
if (regcomp(&ffd.regex, ffd.pat, REG_EXTENDED|REG_NOSUB|REG_ICASE) != 0)
return EINVAL;
}
if (repo)

View File

@ -237,7 +237,7 @@ search(struct xbps_handle *xhp, bool repo_mode, const char *pat, const char *pro
sd.regex = regex;
if (regex) {
if (regcomp(&sd.regexp, pat, REG_EXTENDED|REG_NOSUB) != 0)
if (regcomp(&sd.regexp, pat, REG_EXTENDED|REG_NOSUB|REG_ICASE) != 0)
return errno;
}
sd.repo_mode = repo_mode;