Skip to contentSkip to conversation

dtv-scan-tables: rename file to have only ASCII characters

PATCH Superseded Thomas Petazzoni 2 participants 3 messages Nov 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dtv-scan-tables: rename file to have only ASCII characters

Since the bump of dtv-scan-tables to version ceb11833b35f05813b1f0397a60e0f3b99430aab in commit b1c8794d8ac0eb3895d13ae91d8e912ec469a105, one file contains non-ASCII characters, which causes encoding issues tvheadend. Since no other file in the dtv-scan-tables code base contains files with non-ASCII characters (despite having files named after cities in various countries that definitely do have non-ASCII characters), we rename this file so that it is named with only ASCII characters.

This fixes the build of tvheadend, which was failing when the host Python interpreter was python3, due to a file name encoding issue.

Fixes:

http://autobuild.buildroot.net/results/1ae8bee297edb089535a2fb6ec724ebf7976888d/
(tvheadend)

---
Changes since v1:
- use a post-patch hook instead of doing the rename at the end of the installation step

---
 package/dtv-scan-tables/dtv-scan-tables.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/dtv-scan-tables/dtv-scan-tables.mk +9 -0
index 8ef42b9..8a782cb 100644
@@ -17,6 +17,15 @@ DTV_SCAN_TABLES_SITE_METHOD = git
 DTV_SCAN_TABLES_LICENSE = GPLv2, LGPLv2.1
 DTV_SCAN_TABLES_LICENSE_FILES = COPYING COPYING.LGPL
 
+# In order to avoid issues with file name encodings, we rename the
+# only dtv-scan-tables file that has non-ASCII characters to have a
+# name using only ASCII characters (pl-Krosno_Sucha_Gora)
+define DTV_SCAN_TABLES_FIX_NONASCII_FILENAMES
+	mv $(@D)/dvb-t/pl-Krosno_Sucha* $(@D)/dvb-t/pl-Krosno_Sucha_Gora
+endef
+
+DTV_SCAN_TABLES_POST_PATCH_HOOKS += DTV_SCAN_TABLES_FIX_NONASCII_FILENAMES
+
 define DTV_SCAN_TABLES_INSTALL_TARGET_CMDS
 	for f in atsc dvb-c dvb-s dvb-t; do \
 		$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/dvb/$$f; \
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 dtv-scan-tables: rename file to have only ASCII characters

Thomas, All,

On 2016-11-14 22:20 +0100, Thomas Petazzoni spake thusly:

Quoted 12 lines

Since the bump of dtv-scan-tables to version ceb11833b35f05813b1f0397a60e0f3b99430aab in commit b1c8794d8ac0eb3895d13ae91d8e912ec469a105, one file contains non-ASCII characters, which causes encoding issues tvheadend. Since no other file in the dtv-scan-tables code base contains files with non-ASCII characters (despite having files named after cities in various countries that definitely do have non-ASCII characters), we rename this file so that it is named with only ASCII characters.

This fixes the build of tvheadend, which was failing when the host Python interpreter was python3, due to a file name encoding issue.

Quoted 6 lines

Fixes:

http://autobuild.buildroot.net/results/1ae8bee297edb089535a2fb6ec724ebf7976888d/
(tvheadend)

Regards,
Yann E. MORIN.

Quoted 31 lines

---
Changes since v1:
- use a post-patch hook instead of doing the rename at the end of the installation step

---
 package/dtv-scan-tables/dtv-scan-tables.mk | 9 +++++++++
 1 file changed, 9 insertions(+)
package/dtv-scan-tables/dtv-scan-tables.mk +9 -0
index 8ef42b9..8a782cb 100644
@@ -17,6 +17,15 @@ DTV_SCAN_TABLES_SITE_METHOD = git
 DTV_SCAN_TABLES_LICENSE = GPLv2, LGPLv2.1
 DTV_SCAN_TABLES_LICENSE_FILES = COPYING COPYING.LGPL
 
+# In order to avoid issues with file name encodings, we rename the
+# only dtv-scan-tables file that has non-ASCII characters to have a
+# name using only ASCII characters (pl-Krosno_Sucha_Gora)
+define DTV_SCAN_TABLES_FIX_NONASCII_FILENAMES
+	mv $(@D)/dvb-t/pl-Krosno_Sucha* $(@D)/dvb-t/pl-Krosno_Sucha_Gora
+endef
+
+DTV_SCAN_TABLES_POST_PATCH_HOOKS += DTV_SCAN_TABLES_FIX_NONASCII_FILENAMES
+
 define DTV_SCAN_TABLES_INSTALL_TARGET_CMDS
 	for f in atsc dvb-c dvb-s dvb-t; do \
 		$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/dvb/$$f; \
Signature · 1 line
2.7.4
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
author Applied
#2 lore raw

PATCH v2 1/1 dtv-scan-tables: rename file to have only ASCII characters

In reply to Thomas Petazzoni

Hello,

Quoted 17 lines · Thomas Petazzoni

Since the bump of dtv-scan-tables to version ceb11833b35f05813b1f0397a60e0f3b99430aab in commit b1c8794d8ac0eb3895d13ae91d8e912ec469a105, one file contains non-ASCII characters, which causes encoding issues tvheadend. Since no other file in the dtv-scan-tables code base contains files with non-ASCII characters (despite having files named after cities in various countries that definitely do have non-ASCII characters), we rename this file so that it is named with only ASCII characters.

This fixes the build of tvheadend, which was failing when the host Python interpreter was python3, due to a file name encoding issue.

Fixes:

http://autobuild.buildroot.net/results/1ae8bee297edb089535a2fb6ec724ebf7976888d/
(tvheadend)

Quoted 8 lines

---
Changes since v1:
- use a post-patch hook instead of doing the rename at the end of the installation step

---
 package/dtv-scan-tables/dtv-scan-tables.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

Applied to master, thanks. Thanks Yann for reviewing the patch!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com