Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56402 - patch does not play well with perforce (p4)
Summary: patch does not play well with perforce (p4)
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-07 19:16 UTC by Scott Smith
Modified: 2019-04-18 13:05 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 Scott Smith 2004-07-07 19:16:40 UTC
Patch 2.5.9 tries to be "smart" and determine whether a file it is about to patch is under perforce revision control.  However its heuristics are oversimplified and  break when used with emerge/portage.  The solution is to either change emerge to unset P4PORT, P4USER and P4CONFIG; or to modify patch to actually ask p4 whether the file in question is under control or not.  The relevant section is in util.c but I'm not sure which approach to take.

(I ran into this when trying to emerge openoffice-ximian after emerging perforce and having P4CONFIG=".p4config" set in my environment)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2005-08-31 22:56:23 UTC
epatch now unsets the P4* env vars
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-17 20:23:48 UTC
As a note: it seems that diffutils-3.3 doesn't have perforce-related code any longer.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-17 21:11:00 UTC
(In reply to Michał Górny from comment #2)
> As a note: it seems that diffutils-3.3 doesn't have perforce-related code
> any longer.

I'm sorry but I was wrong here. For some stupid reason, I assumed that patch was part of diffutils.
Comment 4 Ulrich Müller gentoo-dev 2018-05-03 08:39:41 UTC
patch-2.7.6 still checks for these variables. Should we include them in the ENV_UNSET list for EAPI 7?
Comment 5 Ulrich Müller gentoo-dev 2019-04-18 13:05:19 UTC
(In reply to Ulrich Müller from comment #4)
> patch-2.7.6 still checks for these variables. Should we include them in the
> ENV_UNSET list for EAPI 7?

I don't see any negative impact on patching when I set P4CONFIG in the environment. Closing again.