How to keep opkg update permanently?

Yesterday ,i have execute the command:

opkg update

Today, i have to install install some packages with opkg install,it says that can't find it.

opkg install coreutils-nohup
Unknown package 'coreutils-nohup'.
Collected errors:
 * opkg_install_cmd: Cannot install package coreutils-nohup.

So i re-update and install packages.

How to keep opkg update permanently?

the opkg package list isn't saved in flash. so it's permanent until next reboot.

The opkg package list isn't saved in flash by default , can it be forced to be saved in specified disk?

you could try /etc/opkg.conf

root@OpenWrt:~# df /var
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                  3932384      2908   3929476   0% /tmp

I want to mount /var on /.

root@OpenWrt:~#vim /etc/opkg.conf
dest root /
dest ram /tmp
dest /var  /
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature

Reboot my router , the /var is still mounted on /tmp.

You don't mount the /var to / in opkg. Leave /var where it is and change the lists_dir to e.g /root

2 Likes

Keeping the downloaded package lists in a permanent location doesn't really make sense. Packages are constantly rebuilt and updated, so the package lists will get out of sync (at least-) ~daily. While that doesn't mean every installable package changes within that time frame, you still need to update in order to find out.

5 Likes

Yes, but during an install, configure, one might reboot many times, and the opkg update is annoying, especially so when one is attempting network configuration. Just download the update, and keep it. My desktop is Arch which is also constantly updating, but I can still work with the last known good set of package names and programs

Not needed in OpenWrt.

1 Like

Uh, it is if one needs to power down, change location

I don't know, I usually don't take my router for a walk when I am installing and configuring.

2 Likes

For those of us in rural areas, we have to move all over the house to find best antenna location. Sometimes we've got to install a pkg we might have forgotten. Since we're mere mortals, we err.
There are many other physical reasons to have to restart.
And, there's a simple answer to the question, edit /etc/opkg.conf
and change the line lists_dir ext /var/opkg-lists to point to /root/opkg or some other local filesystem location.

Since you're a turkey, life will soon be over. Eat some bugs and gravel, enjoy what's left of the day.

Happy Thanksgiving.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.