Hello,
I am running a version 3.15.0 Alpine mini root filesystem in a chroot
environment.
When I run 'apk add' to install a custom-built package, I get this error:
ERROR: You tried to add a non-repository package to system, but it
would be lost on next reboot. Enable package caching (apk cache
--help) or use --force-non-repository if you know what you are doing.
In my case, the underlying filesystem is persistent, so I don't
believe enabling package caching is appropriate.
Additionally, the mini root filesystem is not aware of reboots at all.
I simply chroot into the filesystem when I want to use it. (Actually,
I am using lxroot, not chroot, but that probably makes no difference.)
My question is: How do I configure the extracted mini root filesystem
so that it believes it is persistent? I'd like to avoid using
--force-non-repository if possible.
Thank you,
Parke
> ERROR: You tried to add a non-repository package to system, but it> would be lost on next reboot. Enable package caching (apk cache> --help) or use --force-non-repository if you know what you are doing.>> Additionally, the mini root filesystem is not aware of reboots at all.> I simply chroot into the filesystem when I want to use it. (Actually,> I am using lxroot, not chroot, but that probably makes no difference.)>> My question is: How do I configure the extracted mini root filesystem> so that it believes it is persistent? I'd like to avoid using> --force-non-repository if possible.
That warning is printed when apk detects that its database is on a tmpfs
(and is missing either the cache or the override flag, as you saw). A
regular chroot always worked for me, so I'm not sure if lxroot is doing
something different here.
On Wed, Jan 5, 2022 at 4:35 PM alice <alice@ayaya.dev> wrote:
> That warning is printed when apk detects that its database is on a tmpfs> (and is missing either the cache or the override flag, as you saw). A> regular chroot always worked for me, so I'm not sure if lxroot is doing> something different here.
Interesting. I do happen to be running on tmpfs in this particular
case, although just for testing purposes.
Thanks for the explanation.
> Interesting. I do happen to be running on tmpfs in this particular> case, although just for testing purposes.
Then i would guess it is caused by having the apk db (i think it is
/lib/apk/db/) on the tmpfs- that will always throw that error.