Hi, When installing a new mageia system in a chroot by using: $ urpmi --urpmi-root /chroot --noclean --auto basesystem I expect to find all installed packages in /chroot/var/cache/urpmi/rpms since --noclean option is used. However if a local media was used by urpmi during installation, packages coming from this local media are not kept and therefore /chroot/var/cache/urpmi/rpms is empty. I understand this is probably done because packages coming from a local media are not downloaded before being installed and they can be retrieved on the system since the media is local but when --urpmi-root is used the second assumption is no longer true once the chrooted system is booted. If --noclean is also used I think urpmi should consider this as "please keep all rpms you installed so I can reuse them later whatever will happen." Also adding --no-install option makes the urpmi command a nop which seems weird. Would it be possible to change this behaviour and make urpmi stored all installed packages even if they're part of a local media, at least when --noclean and --urpmi-root are both used ? Thanks Reproducible: Steps to Reproduce:
Since it's the host urpmi that is running, did you check if the rpms got stored in host /var/cache/urpmi/rpms
CC: (none) => tmb
yes I did check and the packages weren't stored in /var/cache/urpmi/rpms, neither in the host nor in the chroot. I would expect them to be stored in host /var/cache/urpmi/rpm if --root is used and in chroot /var/cache/urpmi/rpms if --urpmi-root is used though.
Assignee: bugsquad => thierry.vignaud
Could anybody take a look at this, that would be great !
Yes this is working as intended. --no-clean means to skip the code deleting temporary files, but if using a local media there are no temporary files so it has no effect. It will never mean copy extra files.
CC: (none) => pterjan
According the man page, --noclean is not about temporary files but about keeping packages in a cache. So if the user asks to keep them in the cache of the rootfs, I think urpmi should do that. The local media is not local to the rooted/target system (created by --urpmi-root option), it's local only for the host system where the urpmi command has been issued. So if one wants to use the new created rootfs through a container for example then he has no way to access to the (host) local media anymore. I tried to explain that in my initial request.
Cache is a set temporary files. Keep the cache means to not delete it. It only applies when files are downloaded into the cache directory, which does not happen for local media as they are installed directly from the already local file. You want to have urpmi copy files into the chroot, which is unrelated to not cleaning up the cache.
This is the cache of downloaded packages.
Status: NEW => RESOLVEDResolution: (none) => INVALID
(In reply to Pascal Terjan from comment #6) > Cache is a set temporary files. Then rename it into "temporary_directory" instead of "cache".., > Keep the cache means to not delete it. > It only applies when files are downloaded into the cache directory, which > does not happen for local media as they are installed directly from the > already local file. You should then clarify the documentation then since nothing mentions *downloaded* packages. > You want to have urpmi copy files into the chroot, which is unrelated to not > cleaning up the cache. In my opinion, the primary use of the cache is to be able to reinstall packages that may not be available anymore. And they can be missing because you want to reinstall a previous version or because the media is not reachable anymore (and you can't assume that local media will be always present). If there's another way to backup *all* installed packages in the target system, then fine, just teach me please. But then realize that your current cache becomes totally useless.