Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 862615 - sys-process/runit: duplicate pkg_preinst definition
Summary: sys-process/runit: duplicate pkg_preinst definition
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 610764
  Show dependency tree
 
Reported: 2022-08-01 02:32 UTC by Sam James
Modified: 2024-01-12 16:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-01 02:32:59 UTC Comment hidden (obsolete)
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-01 02:35:24 UTC
(Recommenting as first comment had wrong paste of second definition.)

runit-2.1.2-r1.ebuild has two definitions of pkg_preinst:

1) This one comes first (so is NOT used):
```
pkg_preinst() {
        if has_version 'sys-process/runit' &&
                has_version '<sys-process/runit-2.1.2' &&
                [ -d "${EROOT}"etc/runit/runsvdir/all ]; then
                if [ -e "${EROOT}"etc/sv ]; then
                        mv -f "${EROOT}"etc/sv "${EROOT}"etc/sv.bak || die
                        ewarn "${EROOT}etc/sv was moved to ${EROOT}etc/sv.bak"
                fi
                mv "${EROOT}"etc/runit/runsvdir/all "${EROOT}"etc/sv|| die
                ln -sf "${EROOT}"etc/sv "${EROOT}"etc/runit/runsvdir/all || die
                cp -a "${EROOT}"etc/runit/runsvdir "${T}" || die
                touch "${T}"/make_var_service || die
        fi
}
```

2) This one comes last (so is the one used):
```
pkg_preinst() {
        if  has_version '<sys-process/runit-2.1.2'; then
                pre_212=yes
        fi
}
```
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-11 22:19:38 UTC
ping
Comment 3 Larry the Git Cow gentoo-dev 2024-01-12 16:31:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2551d80560ef06307944b0c04ae9677db9ff1d32

commit 2551d80560ef06307944b0c04ae9677db9ff1d32
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2024-01-12 16:31:09 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2024-01-12 16:31:48 +0000

    sys-process/runit: remove duplicate pkg_preinst definition
    
    Closes: https://bugs.gentoo.org/862615
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-process/runit/runit-2.1.2-r1.ebuild |  17 +----
 sys-process/runit/z                     | 124 ++++++++++++++++++++++++++++++++
 2 files changed, 125 insertions(+), 16 deletions(-)