Control: tags -1 + patch upstream

Hello,

On Thu, Nov 19, 2020 at 10:56:51AM +0100, Lucas Nussbaum wrote:
> Source: xdg-utils
> Version: 1.1.3-2
> Severity: serious
> Justification: FTBFS on amd64
> Tags: bullseye sid ftbfs
> Usertags: ftbfs-20201119 ftbfs-bullseye
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> Relevant part (hopefully):
> > make[3]: Entering directory '/<<PKGBUILDDIR>>/autotests'
[...]
> > * Testing that xdg-open
> >   - opens a URL with gio open in recent GNOME 3, and Cinnamon
> > ASSERTION FAILED: expected command to be run: gio open 
> > http://www.freedesktop.org/
> > ASSERTION FAILED: expected command to be run: gio open 
> > http://www.freedesktop.org/
[...]

The problem is using the command "gio open" (containing space) and
a/ not properly handling its expansion b/ mocking it as an executable
including the space.

The attached patch fixes the problem, but I have no idea why this
problem appeared now....

Regards,
Andreas Henriksson
diff -uriNp xdg-utils-1.1.3.orig/autotests/t-xdg-open.sh xdg-utils-1.1.3/autotests/t-xdg-open.sh
--- xdg-utils-1.1.3.orig/autotests/t-xdg-open.sh	2021-01-04 21:59:11.000000000 +0000
+++ xdg-utils-1.1.3/autotests/t-xdg-open.sh	2021-01-04 22:00:09.919276956 +0000
@@ -7,7 +7,7 @@ test_open_url() {
     shift
     local cmd=$1
 
-    mock $cmd
+    mock "$cmd"
     run $de xdg-open http://www.freedesktop.org/
     assert_run "$@" http://www.freedesktop.org/
     unmock $cmd
diff -uriNp xdg-utils-1.1.3.orig/autotests/test-lib.sh xdg-utils-1.1.3/autotests/test-lib.sh
--- xdg-utils-1.1.3.orig/autotests/test-lib.sh	2018-05-10 15:02:31.000000000 +0000
+++ xdg-utils-1.1.3/autotests/test-lib.sh	2021-01-04 21:59:52.927289723 +0000
@@ -95,7 +95,7 @@ set_de_() {
 }
 
 mock() {
-    local command="$1" script="$2"
+    local command="$(echo $1 | cut -d' ' -f1)" script="$2"
     local executable="$BINDIR/$command"
 
     cat >"$executable" <<EOF

Reply via email to