Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24571 - When encountering read only files, patch tries to get a lock from a detected version control system, if present
Summary: When encountering read only files, patch tries to get a lock from a detected ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 30515 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-16 00:47 UTC by Arve Knudsen
Modified: 2003-10-06 15:53 UTC (History)
3 users (show)

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


Attachments
adds flag to ignore version control system. (eutils_ignoreVCS.patch,364 bytes, patch)
2003-09-05 19:37 UTC, James Harlow (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arve Knudsen 2003-07-16 00:47:23 UTC
If a target file is read only patch tries to determine the presence of a version control system, such 
as Perforce. If it detects one, it will ask if a lock on the file should be acquired. This doesn't work 
very well with automated builds, both OpenOffice and cdrtools failed for me because I have 
Perforce installed.

Reproducible: Always
Steps to Reproduce:
1. Install versioning system supported by patch, according to man patch: RCS, ClearCase, Perforce 
and SCCS 
2. Patch a read-only file
3.

Actual Results:  
Get file something.txt from Perforce with lock? [y] n

Expected Results:  
It might be a good idea to add the -g0 argument by default to patch, in portage. This should make 
patch ignore any detected versioning systems.
Comment 1 James Harlow (RETIRED) gentoo-dev 2003-09-05 19:37:25 UTC
Created attachment 17139 [details, diff]
adds flag to ignore version control system.

Here is a rather trivial patch that does just that.
Comment 2 solar (RETIRED) gentoo-dev 2003-09-05 21:41:27 UTC
----------------------------------------------
-EPATCH_OPTS=""
+EPATCH_OPTS="-g0"

This looks like a pretty safe change to add to the eutils.eclass
I'm testing here local to ensure no problems will be encounted.
----------------------------------------------
This is from the manpage for version patch-2.5.9

-g num  or  --get=num
         
          This  option  controls  patch's  actions when a file is under RCS or
          SCCS control, and does not exist or is  read-only  and  matches  the
          default  version, or when a file is under ClearCase or Perforce con-
          trol and does not exist.  If num is positive, patch gets (or  checks
          out)  the  file  from  the  revision  control system; if zero, patch
          ignores RCS, ClearCase, Perforce, and SCCS  and  does  not  get  the
          file;  and if negative, patch asks the user whether to get the file.
          The default value of this option  is  given  by  the  value  of  the
          PATCH_GET  environment  variable  if  it is set; if not, the default
          value is zero if patch is conforming to POSIX, negative otherwise.
Comment 3 James Harlow (RETIRED) gentoo-dev 2003-09-05 23:37:40 UTC
I've just compiled USE="-*" emerge system from a stage2 with no problems with this 
patch. 
Comment 4 solar (RETIRED) gentoo-dev 2003-09-21 03:03:30 UTC
committed change to eutils.eclass rev-1.55
Comment 5 SpanKY gentoo-dev 2003-09-21 09:10:54 UTC
sounds good
Comment 6 SpanKY gentoo-dev 2003-10-06 15:53:15 UTC
*** Bug 30515 has been marked as a duplicate of this bug. ***