Bug 14756

Summary: Download subcommand ignores version constraints
Product: [Yocto Project Subprojects] opkg Reporter: Nick Muggio <nick.muggio>
Component: opkgAssignee: Alex Stewart <alex.stewart>
Status: ACCEPTED --- QA Contact:
Severity: enhancement    
Priority: Undecided    
Version: 0.5   
Target Milestone: next-minor   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Nick Muggio 2022-03-11 17:49:18 UTC
`opkg download` fails if a package version is specified. For example:

$ opkg -f opkg.conf info
Package: testpacka
Version: 2.0.0
Status: unknown ok not-installed
Architecture: all
Maintainer: Nick Muggio <nick.muggio@sdl.usu.edu>
MD5Sum: 7453d7f5061bb2fab5e160dd6cbad113
Size: 596
Filename: testpacka_2.0.0_all.ipk
Description: Test package

Package: testpacka
Version: 2.1.0
Status: unknown ok not-installed
Architecture: all
Maintainer: Nick Muggio <nick.muggio@sdl.usu.edu>
MD5Sum: c045dc15eb51c33ccf21cee8c0050a43
Size: 598
Filename: testpacka_2.1.0_all.ipk
Description: Test package

$ opkg -f opkg.conf download testpacka=2.0.0
Collected errors:
 * opkg_download_cmd: Cannot find package testpacka=2.0.0.
$ opkg -f opkg.conf download testpacka
Downloading https://<feed_url>/testpacka_2.1.0_all.ipk.
Downloaded testpacka as testpacka_2.1.0_all.ipk.
Comment 1 Alex Stewart 2022-03-11 20:30:03 UTC
Thanks for filing. That definitely seems like an unreasonable error.


@nmuggio; Do you think you could put together a regression test for this case, like those in the `opkg.git:tests/regress/`? That will help the fixer to verify that they have solved your issue. `tests/regress/issue11301.py` shows a similar workflow, that you can probably just copy and modify.

If you make that test, you can attach the `.py` directly to this bug. And the fixer can commit it into the codebase when they fix the issue.