[package] kernel: flag as "hold", this is inherited by all kmods as well and will...
[openwrt/svn-archive/archive.git] / package / opkg / patches / 012-strip-trailing-conffiles-whitespace.patch
1 --- a/libopkg/opkg_install.c
2 +++ b/libopkg/opkg_install.c
3 @@ -271,6 +271,7 @@ unpack_pkg_control_files(pkg_t *pkg)
4 while (1) {
5 char *cf_name;
6 char *cf_name_in_dest;
7 + int i;
8
9 cf_name = file_read_line_alloc(conffiles_file);
10 if (cf_name == NULL) {
11 @@ -279,6 +280,12 @@ unpack_pkg_control_files(pkg_t *pkg)
12 if (cf_name[0] == '\0') {
13 continue;
14 }
15 + for (i = strlen(cf_name) - 1;
16 + (i >= 0) && (cf_name[i] == ' ' || cf_name[i] == '\t');
17 + i--
18 + ) {
19 + cf_name[i] = '\0';
20 + }
21
22 /* Prepend dest->root_dir to conffile name.
23 Take pains to avoid multiple slashes. */