Ticket #1055 (new defect)

Opened 7 years ago

Last modified 7 years ago

export_exlib_phases bites

Reported by: pipping Owned by:
Priority: Sometime Milestone:
Component: clients/cave Version: scm
Keywords: Cc:
Blocked By: Blocking:
Distribution: Exherbo

Description

export_exlib_phases foo defines foo() in terms of <exlib>_foo. The check if such a phase is actually define is done when foo() is run.

While it can be annoying to find that a package has taken 10h for src_compile and another 2h for src_test, only to die with

exported phase function <exlib>_src_install does not exist

the situation gets a lot worse if the affected phase is one of pkg_*rm.

Prior to  http://git.exherbo.org/?p=arbor.git;a=commitdiff;h=08f9d53d6d0a4b011c5a1d5853709a33d183dd53 docbook-xml-dtd.exlib would call export pkg_prerm as an exlib phase which it did not define (what it did do was require another exlib that defined such a phase). As a result, uninstallation of e.g. docbook-xml-dtd:4.4 would fail in pkg_prerm(), which is most annoying.

PS: no idea what the proper component for this is

Attachments

0001-debugging.patch Download (2.0 KB) - added by pipping 7 years ago.
Example of a currently legal combination of exlibs that we probably shouldn't allow.

Change History

comment:1 Changed 7 years ago by pipping

pipping@bogus ~/Documents/Code/checkouts/pipping/packages $ cat dev-lang/pkg/pkg.exlib
export_exlib_phases src_prepare

pipping@bogus ~/Documents/Code/checkouts/pipping/packages $ cat dev-lang/pkg/pkg-1.exheres-0 
require pkg

SUMMARY=""
DOWNLOADS=""

LICENCES=""
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS=""

DEPENDENCIES=""

src_unpack() {
    mkdir "${WORK}"
}

pipping@bogus ~/Documents/Code/checkouts/pipping/packages $ 
=== Done builtin_loadenv

Error:
  * In program cave perform install --hooks --managed-output --output-exclusivity with-others =dev-lang/pkg-1:0::pipping --destination installed --x-of-y 1 of 1:
  * When installing 'dev-lang/pkg-1:0::pipping':
  * When running an ebuild command on 'dev-lang/pkg-1:0::pipping':
  * Install failed for 'dev-lang/pkg-1:0::pipping' (paludis::ActionFailedError)

=== Starting src_prepare

!!! ERROR in dev-lang/pkg-1::pipping:
!!! In src_prepare at line 2001
!!! exported phase function pkg_src_prepare does not exist

!!! Call stack:
!!!    * src_prepare (/var/tmp/paludis/build/dev-lang-pkg-1/temp/loadsaveenv:2001)
!!!    * exheres_internal_prepare (/usr/libexec/paludis/exheres-0/src_prepare.bash:46)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:647)
!!!    * main (/usr/libexec/paludis/ebuild.bash:675)

diefunc: making ebuild PID 13095 exit with error
die trap: exiting with error.
** (sydbox:13070@1291340770) Message: eldest child 13095 exited with return code 250

Failed install to / for dev-lang/pkg-1:0::pipping

comment:2 Changed 7 years ago by ciaranm

Getting this right is a nuisance since export_exlib_phases is nearly always called before the functions are defined.

Changed 7 years ago by pipping

Example of a currently legal combination of exlibs that we probably shouldn't allow.

Note: See TracTickets for help on using tickets.