Summary: | savedconfig.eclass - restore_config fails when /etc/portage/savedconfig does not exist | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Eclasses | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | sam, zerochaos |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tar.bz2 net-wireless:hostapd-2.9-r6:20210926-114525.log |
Description
Toralf Förster
2021-09-26 13:43:35 UTC
Created attachment 741453 [details]
emerge-info.txt
Created attachment 741456 [details]
emerge-history.txt
Created attachment 741459 [details]
environment
Created attachment 741462 [details]
etc.portage.tar.bz2
Created attachment 741465 [details]
net-wireless:hostapd-2.9-r6:20210926-114525.log
*** Bug 815019 has been marked as a duplicate of this bug. *** The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3c88c805320021786d2bb925918e9ba2d15c79d commit c3c88c805320021786d2bb925918e9ba2d15c79d Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-09-26 23:47:13 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-09-29 19:32:44 +0000 savedconfig.eclass: drop faulty permissions check This check was meant to test if the user has accidentally restricted access to the /etc/portage/savedconfig directory. There are a few problems: 1. We don't actually need read access on the directory. We really need the execute bit set so that we can access files within the directory. 2. There may be permissions issues on subdirectories, and we would fail to detect them. 3. There is no easy way to distingish between EACCES and ENOENT using shell commands. We get an exit status of 1 from [[ -r ${path} ]] if there is a permissions problem or if some component of the path does not exist. This makes resolving problem 2 difficult without using a more robust language with direct access to errno. Instead of trying to detect a permissions problem, just output a warning telling the user to check permissions if we cannot find a config file. Bug: https://bugs.gentoo.org/289168 Bug: https://bugs.gentoo.org/814995 Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/savedconfig.eclass | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) |