Re: [Rpm-maint] [rpm-software-management/rpm] Check inside --root when querying for files (PR #2582)

2023-07-26 Thread Florian Festi
Merged #2582 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2582#event-9924391650
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Check inside --root when querying for files (PR #2582)

2023-07-26 Thread Florian Festi
@ffesti pushed 1 commit.

834f337d997b19a484bc80fa02c5af6ede875097  Check inside --root when querying for 
files

-- 
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2582/files/82dd665bbde453a805a6e536b7d327fdd7a3a52e..834f337d997b19a484bc80fa02c5af6ede875097
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Check inside --root when querying for files (PR #2582)

2023-07-26 Thread Michal Domonkos
@dmnks commented on this pull request.



> @@ -470,11 +470,13 @@ static rpmdbMatchIterator initQueryIterator(QVA_t qva, 
> rpmts ts, const char * ar
 
if (mi == NULL) {
struct stat sb;
-   if (lstat(fn, ) != 0)
+   char * full_fn = rpmGenPath(rpmtsRootDir(ts), fn, NULL);

How about using the simpler `rpmGetPath()` instead? The Gen variant only 
differs in that it also accepts URLs which I don't think we need here :smile: 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2582#pullrequestreview-1547683591
You are receiving this because you are subscribed to this thread.

Message ID: ___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] Check inside --root when querying for files (PR #2582)

2023-07-25 Thread Florian Festi
rpm -qf checks if the argument actually exists if it cant be found in the 
rpmdb and gives different messages based on that.

This was done without taking the root dir into account leading to wrong 
messages if the file only exists in the root dir but not outside.

Resolves: #2576
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2582

-- Commit Summary --

  * Check inside --root when querying for files

-- File Changes --

M lib/query.c (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2582.patch
https://github.com/rpm-software-management/rpm/pull/2582.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2582
You are receiving this because you are subscribed to this thread.

Message ID: rpm-software-management/rpm/pull/2...@github.com
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint