coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
857 stars 195 forks source link

RemovedBasePackages list isn't nicely line-wrapped in `status` output #1613

Open fbruetting opened 5 years ago

fbruetting commented 5 years ago

Host system details

Deployments:
  ostree://fedora-workstation:fedora/29/x86_64/silverblue
                   Version: 29.20181013.n.0 (2018-10-13 11:41:41)
                BaseCommit: a2eb5c4dc8cafe6bc8cdfe93b1d115de43226dec5a988b7c5ad79c705f128647
              GPGSignature: Valid signature by 5A03B4DD8254ECA02FDA1637A20AA56B429476B4
       RemovedBasePackages: gnome-shell-extension-alternate-tab-3.30.1-1.fc29.noarch, gnome-shell-extension-places-menu-3.30.1-1.fc29.noarch, gnome-shell-extension-window-list-3.30.1-1.fc29.noarch, gnome-classic-session-3.30.1-1.fc29.noarch, gnome-shell-extension-apps-menu-3.30.1-1.fc29.noarch, gnome-shell-extension-launch-new-instance-3.30.1-1.fc29.noarch
           LayeredPackages: adapta-gtk-theme adobe-source-code-pro-fonts adobe-source-sans-pro-fonts adobe-source-serif-pro-fonts
                            android-tools atomic baobab cheese chrome-gnome-shell chromium dconf-editor dnf easytag exa exfat-utils fd-find
                            ffmpeg file-roller file-roller-nautilus git glances gnome-encfs-manager gnome-logs gnome-screenshot gnome-tweaks
                            gnome-usage gpick hack-fonts htop iftop julia libratbag-ratbagd linux-libertine-biolinum-fonts
                            linux-libertine-fonts mosh mozilla-fira-mono-fonts mozilla-fira-sans-fonts neovim powerline-go pv ripgrep task
                            tilix tilix-nautilus tmux tokei xenlism-wildfire xenlism-wildfire-midnight youtube-dl zsh
             LocalPackages: rpmfusion-nonfree-release-29-0.5.noarch rpmfusion-free-release-29-0.5.noarch

Expected vs actual behavior

I think I don’t have to explain anything, just look at the removed package list. ;)

bildschirmfoto von 2018-10-13 19-47-24

By the way:

I wanted to get rid of the default shell extensions. When I tried to delete them, I got an error because they are dependencies of gnome-classic-session. But when I deleted that classic session, the extensions stayed on the system. How can I remove that classic session with all it’s dependencies via rpm-ostree? I couldn’t find something in the manual.

dustymabe commented 5 years ago

I think I don’t have to explain anything, just look at the removed package list. ;)

it probably would help if you explained it so we don't have to infer what you mean. What packages are you trying to remove and what is happening that makes you think there is a bug?

fbruetting commented 5 years ago

No, it’s just the presentation of the status command which isn’t aligned for all RemovedBasePackages. LayeredPackages and LocalPackages are properly aligned in contrast. I don’t have a functional complain here.

dustymabe commented 5 years ago

ahh i see. The print formatting seems to be off. :+1:

jlebon commented 5 years ago

By the way:

I wanted to get rid of the default shell extensions. When I tried to delete them, I got an error because they are dependencies of gnome-classic-session. But when I deleted that classic session, the extensions stayed on the system. How can I remove that classic session with all it’s dependencies via rpm-ostree? I couldn’t find something in the manual.

Right. In dnf/yum parlance, rpm-ostree treats all packages in the base layer as "user-installed". I'm not sure we could implement a "delete leaf deps" very easily, though I'm not sure if we'd want to. Removing from the base shouldn't be done lightly so a greedy version override remove would have to be done with a lot of care. Forcing each package to be listed reinforces that. On the compose side, we've also had instances where a package we definitely do want in the tree was dropped out because it was previously only getting pulled in through a top-level request. The same issue could occur client-side if we made override remove greedy.

fbruetting commented 5 years ago

On the compose side, we've also had instances where a package we definitely do want in the tree was dropped out because it was previously only getting pulled in through a top-level request.

I’m not really into that topic and don’t really want to go off-topic, but shouldn’t that be listed explicitly as a dependency then? Because if that top-level package changes it’s dependencies, then the affected dependency might also be missing in the future, though that seems to be needed by the system? (Hope I understood correctly…)

jlebon commented 5 years ago

Yeah, exactly. The dependency should've been listed directly in the manifest packages section. But we didn't realize that until it was too late and removed when the package that previously brought it in was removed (or as you said, the package changed its dependencies and dropped it).

fbruetting commented 5 years ago

Occurs again, please reopen.

$ rpm-ostree --version
rpm-ostree:
 Version: '2019.5'
 Git: 8fda63603f625c83eef3d38ae4fd605b2e045ba4
 Features:
  - compose
  - rust

Bildschirmfoto von 2019-08-07 20-51-29

jlebon commented 5 years ago

Ahh right. This was fixed in #1632 but then regressed in #1852 as part of adding EVR grouping. And of course, we don't have any test that checks that we line-wrap properly. This is also an issue with ReplacedBasePackages.

Anyway, re-opening, though not super high priority.

jlebon commented 2 years ago

@Mershl Would you like to pick up https://github.com/coreos/rpm-ostree/pull/2097 and brush it off?

Mershl commented 2 years ago

I'd really love to but I have troubles setting up a working debug environment for rpm-ostree. What debugger and build option do you recommend? Tried adapting c and cxx flags to -O0 -g and then running it with gdb or lldb. Both debuggers do not show or show very few locals while inside print_one_deployment. Seems like all g_autoptrs are missing.

jlebon commented 2 years ago

Check out https://coreos.github.io/rpm-ostree/HACKING/#using-gdb-with-the-rpm-ostree-daemon for how to use gdb on rpm-ostree.