<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14756</bug_id>
          
          <creation_ts>2022-03-11 17:49:18 +0000</creation_ts>
          <short_desc>Download subcommand ignores version constraints</short_desc>
          <delta_ts>2023-01-06 19:02:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>next-minor</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nick Muggio">nick.muggio</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92771</commentid>
    <comment_count>0</comment_count>
    <who name="Nick Muggio">nick.muggio</who>
    <bug_when>2022-03-11 17:49:18 +0000</bug_when>
    <thetext>`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 &lt;nick.muggio@sdl.usu.edu&gt;
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 &lt;nick.muggio@sdl.usu.edu&gt;
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://&lt;feed_url&gt;/testpacka_2.1.0_all.ipk.
Downloaded testpacka as testpacka_2.1.0_all.ipk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92772</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2022-03-11 20:30:03 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>