/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.442 Revision 1.443
1# Copyright 1999-2015 Gentoo Foundation 1# Copyright 1999-2015 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.442 2015/01/14 22:50:02 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.443 2015/03/20 18:22:05 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
521 fi 521 fi
522 else 522 else
523 einfo " ${patchname} ..." 523 einfo " ${patchname} ..."
524 fi 524 fi
525 525
526 # Handle aliased patch command #404447 #461568
527 local patch="patch"
528 eval $(alias patch 2>/dev/null | sed 's:^alias ::')
529
526 # most of the time, there will only be one run per unique name, 530 # most of the time, there will only be one run per unique name,
527 # but if there are more, make sure we get unique log filenames 531 # but if there are more, make sure we get unique log filenames
528 local STDERR_TARGET="${T}/${patchname}.out" 532 local STDERR_TARGET="${T}/${patchname}.out"
529 if [[ -e ${STDERR_TARGET} ]] ; then 533 if [[ -e ${STDERR_TARGET} ]] ; then
530 STDERR_TARGET="${T}/${patchname}-$$.out" 534 STDERR_TARGET="${T}/${patchname}-$$.out"
531 fi 535 fi
532 536
533 printf "***** %s *****\nPWD: %s\n\n" "${patchname}" "${PWD}" > "${STDERR_TARGET}" 537 printf "***** %s *****\nPWD: %s\nPATCH TOOL: %s -> %s\nVERSION INFO:\n%s\n\n" \
538 "${patchname}" \
539 "${PWD}" \
540 "${patch}" \
541 "$(type -P "${patch}")" \
542 "$(${patch} --version)" \
543 > "${STDERR_TARGET}"
534 544
535 # Decompress the patch if need be 545 # Decompress the patch if need be
536 local count=0 546 local count=0
537 local PATCH_TARGET 547 local PATCH_TARGET
538 if [[ -n ${PIPE_CMD} ]] ; then 548 if [[ -n ${PIPE_CMD} ]] ; then
572 die "you need to fix the relative paths in patch" 582 die "you need to fix the relative paths in patch"
573 fi 583 fi
574 584
575 # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/ 585 # Dynamically detect the correct -p# ... i'm lazy, so shoot me :/
576 local patch_cmd 586 local patch_cmd
577 # Handle aliased patch command #404447 #461568
578 local patch="patch"
579 eval $(alias patch 2>/dev/null | sed 's:^alias ::')
580 while [[ ${count} -lt 5 ]] ; do 587 while [[ ${count} -lt 5 ]] ; do
581 patch_cmd="${patch} -p${count} ${EPATCH_OPTS}" 588 patch_cmd="${patch} -p${count} ${EPATCH_OPTS}"
582 589
583 # Generate some useful debug info ... 590 # Generate some useful debug info ...
584 ( 591 (

Legend:
Removed from v.1.442  
changed lines
  Added in v.1.443

  ViewVC Help
Powered by ViewVC 1.1.20