NI Linux Real-Time Discussions

Showing results for 
Search instead for 
Did you mean: 

opkg --force-downgrade?

Has anyone been able to get the opkg --force-downgrade option to work?  I've tried all sorts of variations without success.  The only way I can revert a package to a previous version is by uninstalling it, restricting access to the only the specific version I want (either by removing the package from the repo or directing the sbRIO to another repo that doesn't have the updated version), and reinstalling the package.  I'm hoping somebody has a better way.

0 Kudos
Message 1 of 12

I got it down-gradable by directly using the .ipk file name with --force-downgradable.

Not sure how "--force-downgradable" command works with all the packages/Repo at one time



Message 2 of 12

[Deleted duplicate]

0 Kudos
Message 3 of 12

Thanks Bhaskar.  To make sure I understand you correctly, these are the steps:

  1. Manually download the previous package to the target.
  2. Install the local copy of the package using the --force-downgrade option.

I was hoping to find a way to retrieve the prior package from the repository and downgrade it all in one step, much like an upgrade works.  This adds more complexity when trying to automate the process.

0 Kudos
Message 4 of 12

Usually, the feeds put up by NI only have one version of a particular software package, so there's usually nothing to downgrade to. Could you share your use-case where you're interested in automating downgrading software packages?

0 Kudos
Message 5 of 12

We are setting up our own opkg repository to deploy our software--as packages--to our devices around the world.  Our operations team has to be able to roll back to a previous version in case the updated version doesn't work as expected on that particular device.

0 Kudos
Message 6 of 12

opkg version 0.3.2 added support for targeted installs [1]. You can check which version you are running via "opkg --version", if it is 0.3.2 you are all set. If not, you may want to consider upgrading.



Message 7 of 12

Thanks Alejandro!

0 Kudos
Message 8 of 12


We're running into some problems getting a newer version installed on our 9627.  I've tried following the instructions in the INSTALL file, but it fails on my vm during the ./configure step:


No package 'libarchive' found


I installed libarchive using pip, so I'm not sure why configure isn't finding it.  Maybe because I'm not using any options?  Can you create a list of steps expalining how to compile and deploy it to an sbrio?




0 Kudos
Message 9 of 12

pip is a domain specific package manager (python). What you need to do is install the libarchive SDK which is needed to be able compile opkg against it (it uses libarchive to decompress ipk's). What you need to do is install the libarchive-dev package via opkg (opkg install libarchive-dev).


Currently, we don't enable gpg or curl on opkg, so you need to disable it during configure. If you are compiling from master, you need to set sysconfdir and localstatedir too. So, a working configure should look like this:


./configure --enable-gpg=no --sysconfdir=/etc --localstatedir=/var -enable-curl=no


I don't have a 9627 handy, so can't give you step by steps instructions. But hopefully this info will point you in the right direction. If you hit another death end, please post.

Message 10 of 12