is my update script complete and right, as I use cooker
now and rolling later, meaning
should not be used at all?
echo " updating distro OpenMandriva : "
yes | sudo dnf clean all
yes | sudo dnf dsync
echo "======== phase 1/2 completed - hit any key to continue ========="
sudo flatpak update -y
echo "========phase 2/2 completed hit a key to close ==========="
dnf upgrade should not be used for cooker and rolling,
distro-sync saves you from headaches
My evergreen command is:
$ sudo dnf clean all;dnf clean all;dnf repolist;sudo dnf distro-sync
or, my favorite (also in case of console complains about conflicts etc.):
$ sudo dnf clean all;dnf clean all;dnf repolist;sudo dnf --allowerasing distro-sync | tee konsole-sync.log
cool thx, that would mean, my script is
basically correct just lacking the part
dnf repolist;sudo dnf --allowerasing distro-sync | tee konsole-sync.log
dnf repolist forces lists to refresh before doing anything. May be redundant however I prefer better safe than sorrow (my opinion)
tee command creates a log of the current transaction so that it’s possible to read it afterwards should one get any doubt. Not strictly needed still convenient.
I am a scripts fan
From DNF Command Reference:
dnf [options] repolist [--enabled|--disabled|--all]
Depending on the exact command lists enabled, disabled or all known repositories. Lists all enabled repositories by default. Provides more detailed information when
-v option is used.
This command by default does not force a sync of expired metadata. See also Metadata Synchronization.
sudo dnf clean all erases all metadata. If you then run
sudo dnf dsync it has to refresh metadata and will also list enabled repositories. So using
dnf repolist in this context is useless.
In my experience with dnf in OMLx it appears that if one runs
sudo dnf clean all then the next
sudo dnf >any command< command will refresh metadata.
cool thanks, I also trying myself on script writing,
to be mentioned I wrote a python GUI app, where I can list my command lines hosted in a
file, I can modify, extend, delete them, and most importantly execute them.
There is a temporary input field for your sudo password, which is
initially empty, and will not be stored whatsoever : - )
thanks for clearing this, the dnf commands are quite
complicated if one dives into details.
Thank both of you, now I can use the script since you confirmed it
to be basically correct.
By the way I like to mention, that I am really enjoying OML so far
and it is great that a team creates such a nice project, out of passion,
being payed for.
Thank you from me as well. I had been using dnf upgrade to update Cooker, will use distro-sync from now on.