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

Diff of /eclass/eutils.eclass

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

Revision 1.287 Revision 1.288
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.287 2007/07/26 05:43:12 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.288 2007/08/30 22:45:17 ulm 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
1066# information out of the binary executable myself. Basically you pass in 1066# information out of the binary executable myself. Basically you pass in
1067# the size of the off_t type (in bytes) on the machine that built the pdv 1067# the size of the off_t type (in bytes) on the machine that built the pdv
1068# archive. 1068# archive.
1069# 1069#
1070# One way to determine this is by running the following commands: 1070# One way to determine this is by running the following commands:
1071#
1072# @CODE
1071# strings <pdv archive> | grep lseek 1073# strings <pdv archive> | grep lseek
1072# strace -elseek <pdv archive> 1074# strace -elseek <pdv archive>
1075# @CODE
1076#
1073# Basically look for the first lseek command (we do the strings/grep because 1077# Basically look for the first lseek command (we do the strings/grep because
1074# sometimes the function call is _llseek or something) and steal the 2nd 1078# sometimes the function call is _llseek or something) and steal the 2nd
1075# parameter. Here is an example: 1079# parameter. Here is an example:
1080#
1081# @CODE
1076# vapier@vapier 0 pdv_unpack # strings hldsupdatetool.bin | grep lseek 1082# vapier@vapier 0 pdv_unpack # strings hldsupdatetool.bin | grep lseek
1077# lseek 1083# lseek
1078# vapier@vapier 0 pdv_unpack # strace -elseek ./hldsupdatetool.bin 1084# vapier@vapier 0 pdv_unpack # strace -elseek ./hldsupdatetool.bin
1079# lseek(3, -4, SEEK_END) = 2981250 1085# lseek(3, -4, SEEK_END) = 2981250
1086# @CODE
1087#
1080# Thus we would pass in the value of '4' as the second parameter. 1088# Thus we would pass in the value of '4' as the second parameter.
1081unpack_pdv() { 1089unpack_pdv() {
1082 local src=$(find_unpackable_file "$1") 1090 local src=$(find_unpackable_file "$1")
1083 local sizeoff_t=$2 1091 local sizeoff_t=$2
1084 1092

Legend:
Removed from v.1.287  
changed lines
  Added in v.1.288

  ViewVC Help
Powered by ViewVC 1.1.20