-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg rquery
returns duplicate results
#2164
Comments
It seems to be a repo database query problem, not a repo database update problem: On another machine, I did [root@lister /usr/home/jhood]# pkg rquery --no-repo-update -a %n | sort -u | wc -l
33908
[root@lister /usr/home/jhood]# pkg rquery --no-repo-update -a %n | wc -l
56348
[root@lister /usr/home/jhood]# |
I wonder if this has something to do with |
I think it does somehow, I haven't investigated it yet |
I just spent some time in gdb and yes it certainly has to do with the work from ffdb473 More specifically, the |
May I ask why that work was done? It seems there are no consumers (yet) of the new function We might be better off backing out the offending commit and releasing an updated version. It might also be useful to include a test case at least to exercise the new function especially until we make use of it elsewhere |
Yes, it is used for the PackageKit's backend, which isn't opensourced yet.
This might be a bit too much. I'll look into this in near days and will try to fix it. |
Hum, I can't reproduce this. Do you have 2 remote repositories set up by any chance? What I tried:
|
Yes, two remote repositories. |
Well, then it is an expected behavior, I guess? You query two remote repos and both contain |
I should have qualified that the remote repositories contain different packages
|
yes activating 2 repo results in duplicated from the same repo, this is the bug, I can reproduce but I don't have time to investigate yet |
I have one remote repo on both of my machines in my original report. In |
@arrowd Not all packages are duplicated; for me jhood@jhood_lfs:/home/jhood/src/hg/master 0 $ pkg rquery '%n %o %R' firefox
firefox www/firefox FreeBSD
firefox www/firefox FreeBSD |
I found that In the |
There are consumers today of
|
Rework iterator, so that it can loop over both local and remote repositories, without looping twice on some of the remote repositories. This allows pkg rquery to not show twice some packages from a given repo when multirepository is activated somehow. Fixes: #2164
Still seeing duplicated results in my case.
|
can you pkg rquery "%n %R" or a case which has duplicated listing? |
I think it's fixed for me. jhood@jhood_lfs:/home/jhood/src/pkg 0 $ src/pkg -v
1.20.990.5-a9b88ac1
jhood@jhood_lfs:/home/jhood/src/pkg 0 $ src/pkg rquery -a %n | wc -l
33918
jhood@jhood_lfs:/home/jhood/src/pkg 0 $ src/pkg rquery -a %n | sort -u | wc -l
33918
jhood@jhood_lfs:/home/jhood/src/pkg 0 $ src/pkg -vv | sed -n '/Repo/,$p'
Repositories:
FreeBSD: {
url : "pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
jhood@jhood_lfs:/home/jhood/src/pkg 0 $
|
On FreeBSD 13.2p1:
pkg rquery %n firefox
against a local repository also returns duplicate results. I haven't characterized this any further yet.The text was updated successfully, but these errors were encountered: