LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mtPaint slackbuild for Slackware 14.2: source file name gets changed when downloading with firefox (https://www.linuxquestions.org/questions/slackware-14/mtpaint-slackbuild-for-slackware-14-2-source-file-name-gets-changed-when-downloading-with-firefox-4175693406/)

keithpeter 04-09-2021 11:44 AM

mtPaint slackbuild for Slackware 14.2: source file name gets changed when downloading with firefox
 
mtPaint is a small fast image editor (good for indexed image files) with no additional dependencies.

The mtPaint slackbuild has a link to the source .tar.gz file as usual. The link URL is

Code:

https://github.com/wjaguar/mtPaint/archive/ff0a801/mtpaint-ff0a801413e612f74fe4c5d251e4bf36c6628013.tar.gz
For some reason, using Firefox this file downloads as...

Code:

root@foo:/home/keith/Downloads/slackbuilds/mtpaint# ls -1
README
doinst.sh
mtPaint-ff0a801413e612f74fe4c5d251e4bf36c6628013.tar.gz*
mtpaint.SlackBuild*
mtpaint.info
slack-desc

...which caused me some head scratching until I spotted what was happening because the slackbuild quits straight away with a 'file not found' error.

Downloading with wget results in the correct lowercase file name for the tar.gz file.

Any ideas why the name of the source code .tar.gz file get changed when saving with Firefox (both click the link and right click save as...? I've never been aware of any case changes when saving from Firefox previously.

PS: mtPaint 3.50 is out on sourceforge.

MDKDIO 04-09-2021 02:17 PM

The problem lies at line 75 in the mtpaint.SlackBuild file
tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz

IF you change that to:
tar xvf $CWD/$DIRVER-$COMMIT.tar.gz

it'll work (just tested here)

Please report the issue to Petar Petrov

__________________________

If you want to build the 3.50 version:

Line 26-29:
PRGNAM=mtpaint
VERSION=${VERSION:-3.50}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

Line 75:
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2

Line 76:
cd $PRGNAM-$VERSION

Just tested, builds fine

keithpeter 04-09-2021 03:23 PM

Quote:

Originally Posted by MDKDIO (Post 6239192)
The problem lies at line 75 in the mtpaint.SlackBuild file
tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz

IF you change that to:
tar xvf $CWD/$DIRVER-$COMMIT.tar.gz

it'll work (just tested here)

Thanks for your very prompt reply and for taking the trouble to do a test compile. The version 3.5 source code archive downloaded from sourceforge has the same name when saved from Firefox or using

Code:

wget -c https://downloads.sourceforge.net/project/mtpaint/mtpaint/3.50/mtpaint-3.50.tar.bz2
and I shall email Petar Petrov to say so along with your changes to the slackbuild.

What worried me was Firefox apparently changing the name of the downloaded file in the 3.49.29 version from github so that the name of the source archive depended on the method the user used to download it. That is history now with the new version so I'm marking this solved.

solarfields 04-09-2021 03:29 PM

thanks guys, I will fix it

-petar

keithpeter 04-09-2021 03:56 PM

Quote:

Originally Posted by solarfields (Post 6239221)
thanks guys, I will fix it

-petar

Well then you can ignore the email I just sent you :)

Thanks.


All times are GMT -5. The time now is 02:33 PM.