diff options
author | Robert Bradford <rob@openedhand.com> | 2007-02-01 14:57:56 +0000 |
---|---|---|
committer | Robert Bradford <rob@openedhand.com> | 2007-02-01 14:57:56 +0000 |
commit | ef3d4d744d5f27d235c11ca8727ee7ac3c521788 (patch) | |
tree | c253c5c3e14760f5740cf455a72acd311bb83208 /meta/packages/oprofile | |
parent | 13f8e413f6c76b35628670790349d3949092855d (diff) | |
download | poky-ef3d4d744d5f27d235c11ca8727ee7ac3c521788.tar.gz |
Add patch that adds a "--list-files/-l" to oparchive that just lists what
would be copied rather than copying them.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1247 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/oprofile')
-rw-r--r-- | meta/packages/oprofile/oprofile/oparchive-list-files.patch | 60 | ||||
-rw-r--r-- | meta/packages/oprofile/oprofile_cvs.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/packages/oprofile/oprofile/oparchive-list-files.patch b/meta/packages/oprofile/oprofile/oparchive-list-files.patch new file mode 100644 index 0000000000..fc8a6271b3 --- /dev/null +++ b/meta/packages/oprofile/oprofile/oparchive-list-files.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Index: oprofile/pp/oparchive.cpp | ||
2 | =================================================================== | ||
3 | --- oprofile.orig/pp/oparchive.cpp 2007-01-22 12:23:51.000000000 +0000 | ||
4 | +++ oprofile/pp/oparchive.cpp 2007-01-22 12:23:56.000000000 +0000 | ||
5 | @@ -35,6 +35,11 @@ | ||
6 | |||
7 | void copy_one_file(image_error err, string const & source, string const & dest) | ||
8 | { | ||
9 | + if (options::list_files) { | ||
10 | + cout << source << endl; | ||
11 | + return; | ||
12 | + } | ||
13 | + | ||
14 | if (!copy_file(source, dest) && err == image_ok) { | ||
15 | cerr << "can't copy from " << source << " to " << dest | ||
16 | << " cause: " << strerror(errno) << endl; | ||
17 | Index: oprofile/pp/oparchive_options.cpp | ||
18 | =================================================================== | ||
19 | --- oprofile.orig/pp/oparchive_options.cpp 2007-01-22 12:22:44.000000000 +0000 | ||
20 | +++ oprofile/pp/oparchive_options.cpp 2007-01-22 12:23:03.000000000 +0000 | ||
21 | @@ -36,6 +36,7 @@ | ||
22 | bool exclude_dependent; | ||
23 | merge_option merge_by; | ||
24 | string outdirectory; | ||
25 | + bool list_files; | ||
26 | } | ||
27 | |||
28 | |||
29 | @@ -47,7 +48,9 @@ | ||
30 | popt::option(options::outdirectory, "output-directory", 'o', | ||
31 | "output to the given directory", "directory"), | ||
32 | popt::option(options::exclude_dependent, "exclude-dependent", 'x', | ||
33 | - "exclude libs, kernel, and module samples for applications") | ||
34 | + "exclude libs, kernel, and module samples for applications"), | ||
35 | + popt::option(options::list_files, "list-files", 'l', | ||
36 | + "just list the files necessary, don't produce the archive") | ||
37 | }; | ||
38 | |||
39 | |||
40 | @@ -60,7 +63,7 @@ | ||
41 | using namespace options; | ||
42 | |||
43 | /* output directory is required */ | ||
44 | - if (outdirectory.size() == 0) { | ||
45 | + if (outdirectory.size() == 0 && !list_files) { | ||
46 | cerr << "Requires --output-directory option." << endl; | ||
47 | exit(EXIT_FAILURE); | ||
48 | } | ||
49 | Index: oprofile/pp/oparchive_options.h | ||
50 | =================================================================== | ||
51 | --- oprofile.orig/pp/oparchive_options.h 2007-01-22 12:23:14.000000000 +0000 | ||
52 | +++ oprofile/pp/oparchive_options.h 2007-01-22 12:23:30.000000000 +0000 | ||
53 | @@ -22,6 +22,7 @@ | ||
54 | extern bool exclude_dependent; | ||
55 | extern merge_option merge_by; | ||
56 | extern std::string outdirectory; | ||
57 | + extern bool list_files; | ||
58 | } | ||
59 | |||
60 | /// All the chosen sample files. | ||
diff --git a/meta/packages/oprofile/oprofile_cvs.bb b/meta/packages/oprofile/oprofile_cvs.bb index 71cf31ae22..008b2a7ff5 100644 --- a/meta/packages/oprofile/oprofile_cvs.bb +++ b/meta/packages/oprofile/oprofile_cvs.bb | |||
@@ -9,6 +9,7 @@ DEPENDS = "popt binutils" | |||
9 | SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \ | 9 | SRC_URI = "cvs://anonymous@oprofile.cvs.sourceforge.net/cvsroot/oprofile;module=oprofile \ |
10 | file://oprofile_eabi.patch;patch=1 \ | 10 | file://oprofile_eabi.patch;patch=1 \ |
11 | file://oparchive-debug-dir.patch;patch=1 \ | 11 | file://oparchive-debug-dir.patch;patch=1 \ |
12 | file://oparchive-list-files.patch;patch=1 \ | ||
12 | file://acinclude.m4" | 13 | file://acinclude.m4" |
13 | S = "${WORKDIR}/oprofile" | 14 | S = "${WORKDIR}/oprofile" |
14 | 15 | ||