Package: fpc Version: 3.0.2+dfsg-5 Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu artful ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following: * fix_texpfncase_test.patch: Cherrypick upstream fix to texpfncase test. After banging my head on a few walls, I couldn't quite sort out *why* this test passes on some of our infra and not others, but happily, the upstream commit above fixes it so it passes everywhere. Would be nice to have this included in the unstable version so we can sync back again, but if the plan is to move to the experimental version soon, which I assume includes the fix (didn't check), then that works too. ... Adam -- System Information: Debian Release: stretch/sid APT prefers artful APT policy: (500, 'artful') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.12.0-12-lowlatency (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -Nru fpc-3.0.2+dfsg/debian/patches/fix_texpfncase_test.patch fpc-3.0.2+dfsg/debian/patches/fix_texpfncase_test.patch --- fpc-3.0.2+dfsg/debian/patches/fix_texpfncase_test.patch 1969-12-31 17:00:00.000000000 -0700 +++ fpc-3.0.2+dfsg/debian/patches/fix_texpfncase_test.patch 2017-09-14 16:48:11.000000000 -0600 @@ -0,0 +1,26 @@ +From 2c185394f13c44992c7348b64b3514030781668b Mon Sep 17 00:00:00 2001 +From: pierre <pie...@freepascal.org> +Date: Mon, 2 Feb 2015 21:49:36 +0000 +Subject: [PATCH] Fix for failures on FileNameCaseSensitive systems + +git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@29609 3ad0048d-3df7-0310-abae-a5850022a9f2 +--- + tests/test/units/sysutils/texpfncase.pp | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tests/test/units/sysutils/texpfncase.pp b/tests/test/units/sysutils/texpfncase.pp +index 3a6e1cac73..a4adf805e7 100644 +--- a/fpcsrc/tests/test/units/sysutils/texpfncase.pp ++++ b/fpcsrc/tests/test/units/sysutils/texpfncase.pp +@@ -57,8 +57,9 @@ procedure TestExpFNC (const FN1, ExpReturn: string; ExpMatch: TFilenameCaseMatch + Match: TFilenameCaseMatch; + begin + FN2 := ExpandFileNameCase (FN1, Match); +- if ((ExpReturn <> '') and (FN2 <> ExpReturn) or (Match <> ExpMatch)) and +- not(FileNameCaseSensitive and (Match=mkAmbiguous) and (UpperCase(FN2)<>UpperCase(ExpReturn))) then ++ if (Match <> ExpMatch) or ((ExpReturn <> '') and (FN2 <> ExpReturn) and ++ ((Match <> mkAmbiguous) or not (FileNameCaseSensitive) or ++ (UpperCase (FN2) <> UpperCase (ExpReturn)))) then + begin + Inc (Failed); + WriteLn ('Error: Input = ', FN1, ', Output = ', FN2, ' (expected ', ExpReturn, '), MatchFound = ', diff -Nru fpc-3.0.2+dfsg/debian/patches/series fpc-3.0.2+dfsg/debian/patches/series --- fpc-3.0.2+dfsg/debian/patches/series 2017-08-07 11:00:17.000000000 -0600 +++ fpc-3.0.2+dfsg/debian/patches/series 2017-09-14 16:48:20.000000000 -0600 @@ -25,3 +25,4 @@ fix-spelling-errors-3.patch fix_tests_for_make_print_directory.patch fix_mips_mipsel_lazarus_FTBFS.patch +fix_texpfncase_test.patch