Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564976 - eutils.eclass: Show warning regarding user supplied patches only when we really have applied a user patch
Summary: eutils.eclass: Show warning regarding user supplied patches only when we real...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-11-05 23:25 UTC by Thomas Deutschmann (RETIRED)
Modified: 2022-07-27 07:45 UTC (History)
0 users

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


Attachments
Show death notice about user applied patches only when we really have applied a user supplied patch (show-death-notice-only-when-user-patches-were-really-applied.patch,1.62 KB, patch)
2015-11-05 23:25 UTC, Thomas Deutschmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2015-11-05 23:25:19 UTC
Created attachment 416136 [details, diff]
Show death notice about user applied patches only when we really have applied a user supplied patch

Given is the ebuild "app-misc/testpkg".

In EPATCH_USER_SOURCE (default /etc/portage/patches) the empty folders "app-misc/testpkg" exist.

When you you emerge app-misc/testpkg but encounter an error for some reason, you will get the following output:

>>>> Unpacking source...
>>>> Source unpacked in /var/tmp/portage/app-misc/testpkg-0.0.1/work
>>>> Preparing source in /var/tmp/portage/app-misc/testpkg-0.0.1/work/testpkg-0.0.1 ...
>  * Applying user patches from /etc/portage/patches//app-misc/testpkg ...
>  * Done with patching
>>>> Source prepared.
>>>> Configuring source in /var/tmp/portage/app-misc/testpkg-0.0.1/work/testpkg-0.0.1 ...
>>>> Source configured.
>>>> Compiling source in /var/tmp/portage/app-misc/testpkg-0.0.1/work/testpkg-0.0.1 ...
>  * ERROR: app-misc/testpkg-0.0.1 failed (compile phase):
>  *   Dummy failure
>  *
>  * Call stack:
>  *     ebuild.sh, line  90:  Called src_compile
>  *   environment, line 1914:  Called die
>  * The specific snippet of code:
>  *       die "Dummy failure"
>  *
>  * If you need support, post the output of `emerge --info '=app-misc/testpkg-0.0.1'`,
>  * the complete build log and the output of `emerge -pqv '=app-misc/testpkg-0.0.1'`.
>  * !!! User patches were applied to this build!
>  * The complete build log is located at '/var/log/portage/app-misc:testpkg-0.0.1:20151105-230223.log'.
>  * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-misc/testpkg-0.0.1/temp/build.log'.
>  * The ebuild environment file is located at '/var/tmp/portage/app-misc/testpkg-0.0.1/temp/environment'.
>  * Working directory: '/var/tmp/portage/app-misc/testpkg-0.0.1/work/testpkg-0.0.1'
>  * S: '/var/tmp/portage/app-misc/testpkg-0.0.1/work/testpkg-0.0.1'

Because "/etc/portage/patches/app-misc/testpkg" was empty, the warning ("!!! User patches were applied to this build!") is invalid.

My patch will introduce a new counter variable "EPATCH_N_APPLIED_PATCHES" which will be used to check if we really have applied a user patch so that we can show the warning only when applicable.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-27 07:45:42 UTC
Long obsolete and fixed in Portage.