Bug 1215678 - The disk image repository should be automatically deleted after installation.
Summary: The disk image repository should be automatically deleted after installation.
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Installation (show other bugs)
Version: Current
Hardware: All openSUSE Tumbleweed
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL: https://forums.opensuse.org/t/how-to-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 13:42 UTC by roke beedell
Modified: 2023-09-25 14:14 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roke beedell 2023-09-25 13:42:32 UTC
At least when the installer is a NetInstaller, because it's simply not required anymore. Ideally the repository should be deleted.
Comment 1 roke beedell 2023-09-25 13:43:03 UTC
See https://forums.opensuse.org/t/how-to-downgrade-a-package-via-zypper/139774/27 for additional information.
Comment 2 Stefan Hundhammer 2023-09-25 13:46:32 UTC
If you are using a Net installer ISO, is there even anything in the repos on the ISO?
Comment 3 roke beedell 2023-09-25 13:47:31 UTC
(In reply to Stefan Hundhammer from comment #2)
> If you are using a Net installer ISO, is there even anything in the repos on
> the ISO?

How would I check?
Comment 4 Stefan Hundhammer 2023-09-25 13:47:59 UTC
For other installation media, the repos on the media at least give you a chance to go back the the earliest version of a package. Why would such a repo ever be a problem?
Comment 5 Stefan Hundhammer 2023-09-25 13:49:16 UTC
(In reply to roke beedell from comment #3)
> (In reply to Stefan Hundhammer from comment #2)
> > If you are using a Net installer ISO, is there even anything in the repos on
> > the ISO?
> 
> How would I check?

For example in the YaST package manager's "repositories" view if you select that repo in the list in the left side panel.
Comment 6 roke beedell 2023-09-25 13:49:58 UTC
(In reply to Stefan Hundhammer from comment #4)
> For other installation media, the repos on the media at least give you a
> chance to go back the the earliest version of a package. Why would such a
> repo ever be a problem?

Some of my devices have very little storage.

I also can't see any situation in which that would be preferable to something like a BTRFS snapshot, since it only holds the packages which the system installed with rather than the packages which I'm using at the time.
Comment 7 roke beedell 2023-09-25 13:52:21 UTC
(In reply to roke beedell from comment #0)
> At least when the installer is a NetInstaller, because it's simply not
> required anymore. Ideally the repository should be deleted.

Sorry, shouldn't have mentioned NetInstaller here, since it doesn't seem to keep them

```log
RokeJulianLockhart@s1e8h4:~> zypper lr -u
Repository priorities in effect:                                                                                                                                                                                                                                                            (See 'zypper lr -P' for details)
      90 (raised priority)  :  1 repository
      99 (default priority) :  8 repositories

#  | Alias                            | Name                                   | Enabled | GPG Check | Refresh | URI
---+----------------------------------+----------------------------------------+---------+-----------+---------+---------------------------------------------------------------------------------
 1 | download.opensuse.org-non-oss    | Main Repository (NON-OSS)              | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/non-oss/
 2 | download.opensuse.org-oss        | Main Repository (OSS)                  | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/oss/
 3 | download.opensuse.org-tumbleweed | Main Update Repository                 | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/tumbleweed/
 4 | home_Dead_Mozay                  | home:Dead_Mozay (openSUSE_Tumbleweed)  | Yes     | (r ) Yes  | No      | https://download.opensuse.org/repositories/home:/Dead_Mozay/openSUSE_Tumbleweed/
 5 | openSUSE-20230920-0              | openSUSE-20230920-0                    | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/tumbleweed/repo/oss/
 6 | packman                          | Packman                                | Yes     | (r ) Yes  | Yes     | https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/
 7 | repo-debug                       | openSUSE-Tumbleweed-Debug              | No      | ----      | ----    | http://download.opensuse.org/debug/tumbleweed/repo/oss/
 8 | repo-openh264                    | Open H.264 Codec (openSUSE Tumbleweed) | Yes     | (r ) Yes  | Yes     | http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed
 9 | repo-source                      | openSUSE-Tumbleweed-Source             | No      | ----      | ----    | http://download.opensuse.org/source/tumbleweed/repo/oss/
10 | snappy                           | snappy                                 | Yes     | (r ) Yes  | Yes     | https://download.opensuse.org/repositories/system:/snappy/openSUSE_Tumbleweed
11 | vscode                           | vscode                                 | Yes     | (r ) Yes  | No      | https://packages.microsoft.com/yumrepos/vscode
```

unlike the all-encompassing disk image.
Comment 8 Stefan Hundhammer 2023-09-25 13:54:27 UTC
Not everybody uses Btrfs. And how is storage a problem for repos residing on the installation media?
Comment 9 roke beedell 2023-09-25 13:56:32 UTC
(In reply to Stefan Hundhammer from comment #8)
> Not everybody uses Btrfs. And how is storage a problem for repos residing on
> the installation media?

Ah, I think I misinterpreted how this worked – does the repo URI point to connected installation media rather than to a selection of packages retained on the installation partition after installation?
Comment 10 Stefan Hundhammer 2023-09-25 14:00:32 UTC
Bugzilla power user tip:

Bugzilla in its infinite wisdom always messes up anything to fit into its 66 (or so) characters wide formatting, so preformatted output is always completely clobbered. This can be avoided by prefixing each line with a '>' (greater than) character to mark it as a quote which it will not destroy.

In your example, this could be achieved with

  zypper lr -u | sed -e 's/^/> /'

i.e. replacing the start of each line ('^') with a '> ', a "greater than" character and a blank.

Just a remark for future use; no need to add your output from comment #7 again.
Comment 11 roke beedell 2023-09-25 14:03:16 UTC
(In reply to Stefan Hundhammer from comment #10)
> Bugzilla power user tip:
> 
> Bugzilla in its infinite wisdom always messes up anything to fit into its 66
> (or so) characters wide formatting, so preformatted output is always
> completely clobbered. This can be avoided by prefixing each line with a '>'
> (greater than) character to mark it as a quote which it will not destroy.
> 
> In your example, this could be achieved with
> 
>   zypper lr -u | sed -e 's/^/> /'
> 
> i.e. replacing the start of each line ('^') with a '> ', a "greater than"
> character and a blank.
> 
> Just a remark for future use; no need to add your output from comment #7
> again.

Apologies, I'm used to using Markdown, since that's what newer versions of Bugzilla use. Though that log wasn't particularly useful anyway, since it just illustrates what I said.

I think the moderator at forums.opensuse.org and I incorrectly surmised what my repolist actually contained. I'll close this until I can inspect a new installation a little more closely. Apologies.
Comment 12 Stefan Hundhammer 2023-09-25 14:09:33 UTC
(In reply to roke beedell from comment #9)
> (In reply to Stefan Hundhammer from comment #8)
> > Not everybody uses Btrfs. And how is storage a problem for repos residing on
> > the installation media?
> 
> Ah, I think I misinterpreted how this worked – does the repo URI point to
> connected installation media rather than to a selection of packages retained
> on the installation partition after installation?

Yes, exactly. We don't simply copy the entire repo's content to your disk; that would be fatal if the target system barely fits on it. During installation, libzypp (the engine behind 'zypper') downloads one or a handful of RPMs, installs them and then normally removes the download again. Where installing an RPM means unpacking the cpio archive that it really is and executing some pre- and post-installation scripts if the package defines any.

libzypp also has some caches for repo metadata at /var/cache/zypp, but it doesn't keep any packages there forever. That directory has a total size of just 200 MiB on my machine; very small when compared to the ginormous space that every single one of the web browsers commonly consumes in your home directory.
Comment 13 roke beedell 2023-09-25 14:11:39 UTC
Thanks for that.
Comment 14 Stefan Hundhammer 2023-09-25 14:14:47 UTC
(In reply to roke beedell from comment #11)
> Apologies, I'm used to using Markdown, since that's what newer versions of
> Bugzilla use. 

No problem. We know that our Bugzilla is ancient. ;-(


> I think the moderator at forums.opensuse.org and I incorrectly surmised what
> my repolist actually contained. I'll close this until I can inspect a new
> installation a little more closely. Apologies.

Hint: Try QDirStat to explore those things. You might have to start it as root to get permissions for all directories (an "xhost +" is helpful in that case).

https://github.com/shundhammer/qdirstat

It's on all openSUSE distros since 2015, so you can simply do 

  sudo zypper in qdirstat

Also try the "Packages" and the "Unpackaged Files" views:

https://github.com/shundhammer/qdirstat/blob/master/doc/Pkg-View.md
https://github.com/shundhammer/qdirstat/blob/master/doc/Unpkg-View.md