Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#35737 - paccache fails to remove packages

Attached to Project: Pacman
Opened by Earnestly (Earnest) - Sunday, 09 June 2013, 19:35 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 09 June 2013, 23:54 GMT
Task Type Bug Report
Category Scripts & Tools
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

```
paccache -r
xargs: Cannot open input file `/dev/fd/63': No such file or directory
```

This is caused by the `runcmd()` function using sudo which will close all file descriptors except for stdin, stdout and stderr.

# Steps to reproduce
1. paccache -r
2. Failure

# Expected results
paccache correctly passing the candidates to `rm`

# Workaround
Remove `runcmd` from lines 523 and 525 and fail if not run with appropriate privileges. This would make it more consistent with the other tools which require root, e.g. `pacman -S` returns `error: you cannot perform this operation unless you are root` instead of prompting for a password.
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 09 June 2013, 23:54 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#35173 
Comment by Earnestly (Earnest) - Sunday, 09 June 2013, 19:48 GMT
Simple patch for `runcmd()` to simply fail with `die` if user is not root or UID 0.
Edit: Second patch has been tested and is working. (0.5KiB)
   patch (0.4 KiB)
   patch (0.5 KiB)
Comment by Karol Błażewicz (karol) - Sunday, 09 June 2013, 21:55 GMT
Run 'sudo paccache -r'.

Edit: .. which is what you're suggesting.
Please ignore my comment.

Loading...