Folks, triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list? Werner
Am Freitag, 26. Februar 2021, 08:07:26 CET schrieb Werner LEMBERG:
Folks,
triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list?
Werner
run the following command, doesn't even have to be root: rpm -qa --queryformat=%{NAME}\\n > packages.txt then, install your system. after that, run "zypper in $(<packages.txt)" That can leave you with some stuff installed that you did not have before the reinstall - create a new list of installed packages, and compare the two lists after sorting them both alphabetically. Kompare works well for this. Cheers Mathias -- Mathias Homann Mathias.Homann@openSUSE.org OBS: lemmy04 Jabber (XMPP): lemmy@tuxonline.tech IRC: [Lemmy] on freenode and ircnet (bouncer active) telegram: https://telegram.me/lemmy98 keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list?
run the following command, doesn't even have to be root: rpm -qa --queryformat=%{NAME}\\n > packages.txt
then, install your system. after that, run "zypper in $(<packages.txt)"
That can leave you with some stuff installed that you did not have before the reinstall - create a new list of installed packages, and compare the two lists after sorting them both alphabetically. Kompare works well for this.
Thanks! Werner
On 26/02/2021 08.37, Mathias Homann wrote:
Am Freitag, 26. Februar 2021, 08:07:26 CET schrieb Werner LEMBERG:
Folks,
triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list?
run the following command, doesn't even have to be root: rpm -qa --queryformat=%{NAME}\\n > packages.txt
then, install your system. after that, run "zypper in $(<packages.txt)"
That can leave you with some stuff installed that you did not have before the reinstall - create a new list of installed packages, and compare the two lists after sorting them both alphabetically. Kompare works well for this.
The problem is that this procedure doesn't consider packages that can be installed from more than one repository. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On 2021-02-26 12:24, Carlos E. R. wrote:
The problem is that this procedure doesn't consider packages that can be installed from more than one repository.
I use this one zypper --xmlout search --installed-only -v > /tmp/somefile.xml A few years back I wrote this down but never used it. It's supposed to be able to do quite a lot of things in regards to migrating systems. http://machinery-project.org/ https://software.opensuse.org/package/machinery -- /bengan
In data venerdì 26 febbraio 2021 14:48:04 CET, Bengt Gördén ha scritto:
On 2021-02-26 12:24, Carlos E. R. wrote:
The problem is that this procedure doesn't consider packages that can be installed from more than one repository.
I use this one
zypper --xmlout search --installed-only -v > /tmp/somefile.xml
A few years back I wrote this down but never used it. It's supposed to be able to do quite a lot of things in regards to migrating systems. http://machinery-project.org/ https://software.opensuse.org/package/machinery
Thank you for this link. I had exactly that problem and thought it would be a nice to have. Makes we wonder how many things are out there, that I would find useful and simply do not know about their very existence. Kudos! S.
On Fri, 26 Feb 2021 14:48:04 +0100 Bengt Gördén <bengan@bag.org> wrote:
On 2021-02-26 12:24, Carlos E. R. wrote:
The problem is that this procedure doesn't consider packages that can be installed from more than one repository.
I use this one
zypper --xmlout search --installed-only -v > /tmp/somefile.xml
A few years back I wrote this down but never used it. It's supposed to be able to do quite a lot of things in regards to migrating systems. http://machinery-project.org/ https://software.opensuse.org/package/machinery
A warning to anybody trying to use this! I just installed it and ran inspect. It appears it's filled my disk and crippled my system. I haven't finished investigating yet. More later.
On Fri, 26 Feb 2021 19:39:19 +0000 Dave Howorth <dave@howorth.org.uk> wrote:
On Fri, 26 Feb 2021 14:48:04 +0100 Bengt Gördén <bengan@bag.org> wrote:
On 2021-02-26 12:24, Carlos E. R. wrote:
The problem is that this procedure doesn't consider packages that can be installed from more than one repository.
I use this one
zypper --xmlout search --installed-only -v > /tmp/somefile.xml
A few years back I wrote this down but never used it. It's supposed to be able to do quite a lot of things in regards to migrating systems. http://machinery-project.org/ https://software.opensuse.org/package/machinery
A warning to anybody trying to use this!
I just installed it and ran inspect.
It appears it's filled my disk and crippled my system. I haven't finished investigating yet. More later.
OK. I've finished my investigation for now. I ran host:~ # machinery inspect -x localhost and went for dinner. Big mistake. It ran and created a directory ~root/.machinery In that directory it created a log and lots of other files that are presumably the information it is recording. When those files got to 6.8GB they filled my disk and it seems that machinery just abandoned its run at that point without logging anything to file or to the screen. The good news is that I came back after dinner to find a system that was almost but not quite unusable. systemd-journald was logging lots of messages about the inability to do things because the disk was full, but fortunately the system was still responsive. So I discovered the .machinery directory, copied it to another machine and then deleted it and now things seem to be back to normal. So far I'm less than impressed by the machinery package and the packaging. The installation was a pain, since it wants to use single-click installation, which we all agree (I think) is a bad idea. Then the manual procedure it suggests is to install the main repo and update repo that you already have. After I cleaned up its efforts, I just installed it from yast. Doh! Why didn't it suggest that in the first place! Then of course the run. Fine if it needs a load of space, but it would be sensible to let users know beforehand, and ideally provide an estimate when it starts. And when it does run out of disk before it finishes, wouldn't it make sense to log that problem with its dying breath rather than trying to store whatever was the last thing it wrote? In fact, if it runs out of disk before finishing then why doesn't it just delete everything it wrote, since I guess what I've carefully saved is entirely useless. And exactly how much disk does it need? PS I've no idea what it's actually trying to do. It has saved lots of 'changed_managed_files' that are kernel drivers. I generally don't play with those! Most of the space it has used seems to be taken up with unmanaged_files in home. Quite why it thinks it needs those to manage system upgrades etc I'm not sure. Not yet convinced!
On 26/02/2021 21.45, Dave Howorth wrote:
On Fri, 26 Feb 2021 19:39:19 +0000 Dave Howorth <> wrote:
On Fri, 26 Feb 2021 14:48:04 +0100 Bengt Gördén <> wrote:
On 2021-02-26 12:24, Carlos E. R. wrote:
The problem is that this procedure doesn't consider packages that can be installed from more than one repository.
I use this one
...
And exactly how much disk does it need?
PS I've no idea what it's actually trying to do. It has saved lots of 'changed_managed_files' that are kernel drivers. I generally don't play with those! Most of the space it has used seems to be taken up with unmanaged_files in home. Quite why it thinks it needs those to manage system upgrades etc I'm not sure.
Not yet convinced!
I don't understand what it is doing. Thank you for sharing! -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
On 2021/02/25 23:07, Werner LEMBERG wrote:
Folks,
triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list?
Would a list of all the rpms help? Something like (all one line) rpm -qa --last --qf "%25{NVRA}\t%20{DISTRIBUTION}/%20{DISTURL}\n"
/tmp/rpm-qa-dists.txt
Shows me the repo URI as well. Takes about 2 seconds to produce a 4742 rpm package listing. With output something like: Mesa-gallium-18.1.6-205.1.x86_64 openSUSE Tumbleweed/obs://build.opensuse.org/openSUSE:Factory/standard/d998fb3813604f820cc1088f8d7548ee-Mesa-drivers Seems with the proper repos available, giving zypper the rpm list, it should just reinstall all of the ones you list.
On 28/02/2021 21.26, L A Walsh wrote:
On 2021/02/25 23:07, Werner LEMBERG wrote:
Folks,
triggered by my desktop problems reported in previous mails, I wonder how can I save the list of currently installed packages so that a complete reinstallation (i.e., not using `zypper dup`) of 15.2 makes use this list? Would a list of all the rpms help?
Something like (all one line) rpm -qa --last --qf "%25{NVRA}\t%20{DISTRIBUTION}/%20{DISTURL}\n"
/tmp/rpm-qa-dists.txt
Shows me the repo URI as well.
That's very interesting concoction :-) But not the normal repo URL. For example, I get
joe-4.4-lp152.3.6.x86_64 openSUSE Leap 15.2/obs://build.opensuse.org/openSUSE:Leap:15.2/standard/e696ddcbe5ed1029d27b418595ce3959-joe
I would prefer the repository name, but worst case, I can do the conversion with an editor.
Takes about 2 seconds to produce a 4742 rpm package listing.
With output something like:
Mesa-gallium-18.1.6-205.1.x86_64 openSUSE Tumbleweed/obs://build.opensuse.org/openSUSE:Factory/standard/d998fb3813604f820cc1088f8d7548ee-Mesa-drivers
Seems with the proper repos available, giving zypper the rpm list, it should just reinstall all of the ones you list.
I don't know of a zypper command where you can feed an rpm list paired with repos. Perhaps a list of rpms from one repo. -- Cheers / Saludos, Carlos E. R. (from 15.2 x86_64 at Telcontar)
participants (8)
-
Bengt Gördén
-
Carlos E. R.
-
Carlos E.R.
-
Dave Howorth
-
L A Walsh
-
Mathias Homann
-
Stakanov
-
Werner LEMBERG