Skip to content
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

search / list - page/page-size not honored for exact search in 0.10.6 #1322

Closed
steve6375 opened this issue Jun 3, 2017 · 17 comments
Closed
Assignees
Milestone

Comments

@steve6375
Copy link

steve6375 commented Jun 3, 2017

choco list chocolatey -r --not-broken --approved-only -a -e -by-id-only --page=0 --page-size=3

This worked in 0.10.5, but 0.10.6 shows many more than 3 items

@ferventcoder
Copy link
Member

ferventcoder commented Jun 3, 2017

Howdy - some switches are incompatible with others. In this case, there were some fixes to --exact/-e to make it work in all instances, so it may not be compatible with other switches like page/page size.

I would recommend if you are using this with any scripting (the -r makes it look like you are), be very leary of using -a as all versions has some known strain on the community repo - it should be avoided in tools provided to the community.

@steve6375
Copy link
Author

If I don't use -e then I get boxstarter.chocolatey listed and not chocolatey.

chocolatey is just an example. The command is used in a script to list to the user the most recent versions available in case they want an earlier version.

How do you suggest I list the latest 10 versions of any application?

@ferventcoder
Copy link
Member

I'd say it is fine to use -e, but with exact you don't need --by-id-only.

@ferventcoder
Copy link
Member

Maybe by default list the current version and let the user decide to see older versions, then go back and run with -a and take only the first ten results.

@steve6375
Copy link
Author

yes, that is what I do, but i need to use -a and -e and page size does not work...

@ferventcoder
Copy link
Member

I'm not sure GetPackageById supports paging. Let's leave this issue open until we know for sure.

@ferventcoder
Copy link
Member

You can filter the results to first ten before you present to the user. What are you using to script this? PowerShell?

@steve6375
Copy link
Author

no, cmd. I could use | more to get first n lines maybe

@steve6375
Copy link
Author

choco list chocolatey -r --not-broken --approved-only -a -e --page=0 --page-size=3

does not work, so it's not --by-id that is the problem...

@steve6375
Copy link
Author

steve6375 commented Jun 4, 2017

choco list chocolatey --approved-only -e -a --page=0 --page-size=3

also does not work. So it is -e -a that is the problem. Isn't that why you need page parameters?

@steve6375
Copy link
Author

choco list chocolatey --approved-only -a --page=0 --page-size=3

strangely - this lists three 7zip packages!!!

@ferventcoder
Copy link
Member

See above - I confirmed immediately that it was -e. There was no question on that. The rest has been giving you helpful suggestions on your script.

@ferventcoder
Copy link
Member

And here is more info on why - #1322 (comment)

@ferventcoder
Copy link
Member

This issue is in triage until we determine if paging can be used with the new way of returning packages for -e that works with without error - at that time we either call the switches incompatible or switch this to a bug to fix. Make sense? :)

@ferventcoder
Copy link
Member

#1004 was the issue.

@ferventcoder
Copy link
Member

For us, having info and search/list -e work 100% of the time is going to be most desirable.

@ferventcoder ferventcoder changed the title page/page-size not working in 0.10.6 search /list - page/page-size not honored for exact in 0.10.6 Jun 4, 2017
@ferventcoder ferventcoder self-assigned this Jun 4, 2017
@ferventcoder ferventcoder added this to the 0.10.6.2 milestone Jun 4, 2017
@ferventcoder
Copy link
Member

Good news, page size is supported! This is fixed for 0.10.6.2.

@ferventcoder ferventcoder changed the title search /list - page/page-size not honored for exact in 0.10.6 search / list - page/page-size not honored for exact in 0.10.6 Jun 4, 2017
@ferventcoder ferventcoder changed the title search / list - page/page-size not honored for exact in 0.10.6 search / list - page/page-size not honored for exact search in 0.10.6 Jun 4, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.6.2, 0.10.7 Jun 6, 2017
@ferventcoder ferventcoder removed this from the 0.10.6.2 milestone Jun 6, 2017
ferventcoder added a commit that referenced this issue Jun 8, 2017
Due to some changes in the way that 0.10.6 worked to allow for GH-1004
to always return results with info and exact searches, page size and
page was being ignored. Fortunately limiting results is supported - even
though it does need to call completely through and then filter locally.
ferventcoder added a commit that referenced this issue Jun 8, 2017
* stable:
  (version) 0.10.7
  (doc) update CHANGELOG/nuspec
  (GH-1328) Serialize/deserialize package files warnings
  (maint) clean up install/uninstall template
  (GH-1330) Use $packageArgs in default uninstall script
  (GH-1323) File/File64 as params not aliases
  (GH-1324) requestedExecutionLevel = asInvoker
  (GH-1327) AutoUninstaller - split multiple file paths
  (maint) add parameter props to UseOriginalLocation
  (maint) formatting
  (GH-1323) rename file to downloadFilePath
  (GH-1325) List/Search - no fail on local directory
  (docs) add to PowerShell CONTRIBUTING
  (GH-1326) Always show heading
  (GH-976) Use Write-FunctionCallLogMessage
  (maint) formatting
  (GH-1322) Fix: search - exact ignores page/page-size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants