Skip to content

[Bug]: podman preuninstall script needs to handle SCOOP_GLOBAL folder #6710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
hgkamath opened this issue Apr 12, 2025 · 0 comments
Open
3 tasks done

Comments

@hgkamath
Copy link

hgkamath commented Apr 12, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues/PRs to ensure it has not already been reported or fixed.
  • I have verified that I am using the latest version of Scoop and corresponding bucket.

Package Name

podman

Expected/Current Behaviour

Description

  • Error messages on updating podman package, see logs below
  • I think it has something to do with the scoop folder being elsewhere.
  • My SCOOP_GLOBAL and SCOOP folder have been set so that the scoop apps are installed in their own folders
  • I usually
    • Login as a unprivileged user of group USERS, AUTHENTICATED_USERS on Windows-11
    • Open a powershell-5.1 terminal as a admin user and run scoop update * and scoop update -g *. The process as a user with admin privileges
  • The following error happens even if I delete the entire folder trees of "C:\Users\admin\.config\containers" and "C:\Users\admin\.local\share\\containers" inclusive.

Logs

PS C:\WINDOWS\system32>  scoop update --force -g podman
podman: 5.4.2 -> 5.4.2 (global)
Updating one outdated app:
Updating 'podman' (5.4.2 -> 5.4.2)
Downloading new version
Loading podman-5.4.2-setup.exe from cache
Checking hash of podman-5.4.2-setup.exe ... ok.
Running pre_uninstall script...Move-Item : Access to the path 'C:\Users\admin\.config\containers\podman' is denied.
At line:8 char:5
+     Move-Item "$Env:UserProfile\.config\containers\*" "$dir\config"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\admin\.config\containers\podman:DirectoryInfo) [Move-Item], IOExce
   ption
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

Move-Item : Access to the path 'C:\Users\admin\.local\share\containers\podman\machine' is denied.
At line:13 char:9
+         Move-Item "$Env:UserProfile\.local\share\containers\$_\*" "$d ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\admin\...\podman\machine:DirectoryInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

ERROR Cannot move 'C:\Users\admin\.local\share\containers\podman\*' to 'C:\vol\scoop_01\scoopg\apps\podman\5.4.2\data\podman'
Move-Item : Access to the path 'C:\Users\admin\.local\share\containers\storage\containers' is denied.
At line:13 char:9
+         Move-Item "$Env:UserProfile\.local\share\containers\$_\*" "$d ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\admin\...rage\containers:DirectoryInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

ERROR Cannot move 'C:\Users\admin\.local\share\containers\storage\*' to 'C:\vol\scoop_01\scoopg\apps\podman\5.4.2\data\storage'
done.
Uninstalling 'podman' (5.4.2)
Removing shim 'podman.shim'.
Removing shim 'podman.exe'.
Unlinking C:\vol\scoop_01\scoopg\apps\podman\current
Installing 'podman' (5.4.2) [64bit] from 'main' bucket
Loading podman-5.4.2-setup.exe from cache
Running pre_install script...done.
Running installer script...done.
Linking C:\vol\scoop_01\scoopg\apps\podman\current => C:\vol\scoop_01\scoopg\apps\podman\5.4.2
Creating shim for 'podman'.
Persisting data
Persisting config
Persisting connections
Running post_install script...done.
'podman' (5.4.2) was installed successfully!
PS C:\WINDOWS\system32>


PS C:\WINDOWS\system32> echo $Env:SCOOP_GLOBAL $Env:SCOOP
C:\vol\scoop_01\scoopg
C:\vol\scoop_01\scoop

Steps to Reproduce

- 1) create an admin user (member of ```Administrators`` group) and regular user (member of ```Users`` & ```Authenticated_Users``` group)
- 2) as admin, create a new scoop roots, install podman as a global app
- 3) login as the regular user
- 4) open powershell-5.1 admin terminal
- 5) run  ```scoop update -g "podman"``` or ```scoop update -g --force "podman"``` 

Possible Solution

  • Said error messages are disconcerting, one wishes to see no error messages when installing.
  • List of alternatives
    • (1) If podman uses these folders, let them be, maybe user intentionally wants to leave things under the admin user
    • (2) let user make their own Junction/symlinks to where they want their configuration and storage to be.
    • (3) putting userdata under C:\vol\scoop_01\scoopg\apps\podman\5.4.2\ seems WRONG, Shouldn't they go under C:\vol\scoop_01\scoopg\persist\podman\ ie the persists directory, in which user-data persists between scoop updates
    • (4) perhaps podman should use podman global variables of its own that a user should set so that it the pre-uninstaller picks up and does the appropriate things. It may be that a user may decide to podman config, images and volumes in their own Drive/Volume.

Scoop and Buckets Version

PS C:\WINDOWS\system32>  scoop --version
Current Scoop version:
859d1db5 (HEAD -> master, tag: v0.5.2, origin/master, origin/HEAD) chore(release): Bump to version 0.5.2 (#6080)

'main' bucket:
510cef7be (HEAD -> master, origin/master, origin/HEAD) suanpan: Update to version 3.7

'extras' bucket:
29d2a8e44c (HEAD -> master, origin/master, origin/HEAD) cursor: Update to version 0.48.8 (#15252)

'versions' bucket:
c6dc197a5 (HEAD -> master, origin/master, origin/HEAD) qbittorrent-nightly: Update to version 14418525774

'java' bucket:
dfe69e26 (HEAD -> master, origin/master, origin/HEAD) openjdk-ea: Update to version 25-18-ea

Scoop Config

PS C:\WINDOWS\system32> scoop config | Format-List


last_update  : 2025-04-12T20:26:39.7757160+05:30
scoop_branch : master
scoop_repo   : https://github.com/ScoopInstaller/Scoop

PowerShell Version

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.4391
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.4391
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Additional Softwares

No response

@hgkamath hgkamath added the bug Something isn't working label Apr 12, 2025
@HUMORCE HUMORCE added package improvement and removed bug Something isn't working labels Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants