Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2019 08:37:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 239293] fetch-list: broken handling of DISTFILES when it has entries with subdirectories
Message-ID:  <bug-239293-7788-uTM2C2t8UP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239293-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-239293-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239293

--- Comment #6 from Ruslan Garipov <brigadir15@gmail.com> ---
Created attachment 206151
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D206151&action=
=3Dedit
Add `mkdir` to Tobias Kortkamp's v0 patch

(In reply to Tobias Kortkamp from comment #4)
Oh, sorry, I hastened to say ``the patch looks good''.

Unfortunately, it doesn't fix the problem completely: it prevents
mkdir(1) on fetch-list, but the result script itself ends up with
issues:

$ cd /usr/ports/lang/rush
$ make fetch-list
{elided}
mkdir -p /usr/ports/distfiles/rust && cd /usr/ports/distfiles/rust && { env
/usr/bin/fetch -Fpr -S 73812596 -o
2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz
https://static.rust-lang.org/dist/2019-05-23/rustc-1.35.0-x86_64-unknown-fr=
eebsd.tar.gz
...{elided}
mkdir -p /usr/ports/distfiles/rust && cd /usr/ports/distfiles/rust && { env
/usr/bin/fetch -Fpr -S 83588135 -o
2019-05-23/rust-std-1.35.0-x86_64-unknown-freebsd.tar.gz
https://static.rust-lang.org/dist/2019-05-23/rust-std-1.35.0-x86_64-unknown=
-freebsd.tar.gz
... {elided}
{elided}

As one can see, the script generated by fetch-list creates
/usr/ports/distfiles/rust directory, but fetch(1) writes its output to
/usr/ports/distfiles/rust/2019-05-23 directory, which doesn't exist.
Therefore, fetch(1) fails with errors like the following ones:

fetch: 2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz: open(): No su=
ch
file or directory
fetch: 2019-05-23/rust-std-1.35.0-x86_64-unknown-freebsd.tar.gz: open(): No
such file or directory

Tobias, I've modified your patch slightly, and tested on lang/rust,
shells/bash, www/firefox and x11/xorg (meta)port.  For the former the
new patch gives the following script:

$ cd /usr/ports/lang/rust
$ make fetch-list
{the first row is elided}
mkdir -p "/usr/ports/distfiles/rust/2019-05-23" && cd /usr/ports/distfiles/=
rust
&& { env /usr/bin/fetch -Fpr -S 73812596 -o
2019-05-23/rustc-1.35.0-x86_64-unknown-freebsd.tar.gz
https://static.rust-lang.org... {elided}
{elided}

which works fine on a machine having the Internet access.

Are there any mandatory tests I should run against the updated
do-fetch.sh script?

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239293-7788-uTM2C2t8UP>