LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ytp-dlp.SlackBuild fails to upgrade package (https://www.linuxquestions.org/questions/slackware-14/ytp-dlp-slackbuild-fails-to-upgrade-package-4175729842/)

glupa4e 10-13-2023 01:33 PM

ytp-dlp.SlackBuild fails to upgrade package
 
Hello,

i am still using Slackware 14.2. I have an older version of software
yt-dlp

I wanted to update because it is not working for me. I have adapted everything in the package folder (yt-dlp.info and yt-dlp.SlackBuild)

When i try to execute the install script i get

Code:

yt-dlp/test/test_downloader_external.py
patching file yt_dlp/plugins.py
Hunk #1 FAILED at 88.
1 out of 1 hunk FAILED -- saving rejects to file yt_dlp/plugins.py.rej

can please somebody figure out what should i do next? perhpas i have to update some dependency?

business_kid 10-13-2023 01:37 PM

Have you a version of python3 in 14.2?

Try updating it with
Code:

sudo yt-dlp -U
What happens?

glupa4e 10-13-2023 01:41 PM

Quote:

Originally Posted by business_kid (Post 6458576)
Have you a version of python3 in 14.2?

Try updating it with
Code:

sudo yt-dlp -U
What happens?

Code:

Latest version: 2023.10.07, Current version: 2023.02.17
ERROR: You installed yt-dlp with a package manager or setup.py; Use that to update

i have python3 package

bigbadaboum 10-13-2023 03:37 PM

Hello glupa4e,

if you use python3 3.7.2
http://slackbuilds.org/repository/14.2/python/python3/

you need upgrade with python-3.9.18
https://mirror.slackbuilds.org/slack...ource/python3/

yt-dlp 2023.09.24
important changes
The minimum recommended Python version has been raised to 3.8
Since Python 3.7 has reached end-of-life
https://github.com/yt-dlp/yt-dlp/issues/7803

glupa4e 10-14-2023 02:57 AM

Quote:

Originally Posted by bigbadaboum (Post 6458594)
Hello glupa4e,

if you use python3 3.7.2
http://slackbuilds.org/repository/14.2/python/python3/

you need upgrade with python-3.9.18
https://mirror.slackbuilds.org/slack...ource/python3/

yt-dlp 2023.09.24
important changes
The minimum recommended Python version has been raised to 3.8
Since Python 3.7 has reached end-of-life
https://github.com/yt-dlp/yt-dlp/issues/7803

Hello bigbadaboum,
i did whatever you advised me to, unfortunately i am still getting the same error.
I downloaded python-3.9.28 from Slackware15 repo (although i am still using Slackware14.2) then package compiled and i installed it.

perhaps i should declare somewhere that default verrsion for python should be 3.9.18 as i have also older ones, but what will happen with other applicataions requiring those libraries, will they stop working?

or i just somehow can pass to ytp-dl script which python version to use?

Tonus 10-14-2023 03:02 AM

I believe you have to give full path.

Otherwise you could use virtualenv to get something working. It would isolate the software with the specific python version.

rizitis 10-14-2023 03:08 AM

Maybe this Appimage is working on 14.2?
https://github.com/jely2002/youtube-dl-gui/releases

Ian M 10-14-2023 05:37 AM

I don't think the error is python related. Something is trying to apply a patch and it's failing, are there any lines in the slackbuild with the patch command in? If there are then they are probably not needed for the version you are trying to install, try removing or commenting them out.

glupa4e 10-14-2023 05:46 AM

Quote:

Originally Posted by Tonus (Post 6458681)
I believe you have to give full path.

Otherwise you could use virtualenv to get something working. It would isolate the software with the specific python version.

Tonus, how to pass full path to install script?

There is a line in the SlackBuild

Code:

# if anyone's wondering, there's no python2 support.
python3 setup.py install --root=$PKG

should i replace $PKG with the full path to python3-9.18?

glupa4e 10-14-2023 05:51 AM

Quote:

Originally Posted by Ian M (Post 6458713)
I don't think the error is python related. Something is trying to apply a patch and it's failing, are there any lines in the slackbuild with the patch command in? If there are then they are probably not needed for the version you are trying to install, try removing or commenting them out.

Hello Ian M,

the only line i saw in .SlackBuild related to patch was

Code:

patch -p1 < $CWD/plugin_loading.diff
when i commented that out i got other errors

Code:

copying yt_dlp/compat/_deprecated.py -> build/lib/yt_dlp/compat
running build_scripts
creating build/scripts-3.9
Traceback (most recent call last):
  File "/usr/lib64/python3.9/tokenize.py", line 330, in find_cookie
    line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaf in position 14: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/SBo/yt-dlp/setup.py", line 176, in <module>
    main()
  File "/tmp/SBo/yt-dlp/setup.py", line 137, in main
    setup(
  File "/usr/lib64/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.9/distutils/command/install.py", line 546, in run
    self.run_command('build')
  File "/usr/lib64/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.9/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python3.9/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.9/distutils/command/build_scripts.py", line 50, in run
    self.copy_scripts()
  File "/usr/lib64/python3.9/distutils/command/build_scripts.py", line 82, in copy_scripts
    encoding, lines = tokenize.detect_encoding(f.readline)
  File "/usr/lib64/python3.9/tokenize.py", line 381, in detect_encoding
    encoding = find_cookie(second)
  File "/usr/lib64/python3.9/tokenize.py", line 335, in find_cookie
    raise SyntaxError(msg)


glupa4e 10-14-2023 06:07 AM

Quote:

Originally Posted by rizitis (Post 6458683)
Maybe this Appimage is working on 14.2?
https://github.com/jely2002/youtube-dl-gui/releases


hello, i tried SlackBuild from https://slackbuilds.org/repository/1...outube-dl-gui/
where i replaced the .tar.gz file with the one provided by you and then got error

Code:

youtube-dl-gui-2.4.0/ytdlgui_demo.gif
python: can't open file 'setup.py': [Errno 2] No such file or directory

there is a line in the install script

Code:

python setup.py install --root=$PKG

bigbadaboum 10-14-2023 06:25 AM

Hello glupa4e,

just to be sure, are you using this slackbuild from B.Watson http://slackbuilds.org/repository/15...?search=yt-dlp with this source https://github.com/yt-dlp/yt-dlp/arc...3.10.13.tar.gz

today I updated yt-dlp-2023.07.06 to yt-dlp-2023.10.07, norhing to report.

glupa4e 10-14-2023 11:07 AM

Quote:

Originally Posted by bigbadaboum (Post 6458722)
Hello glupa4e,

just to be sure, are you using this slackbuild from B.Watson http://slackbuilds.org/repository/15...?search=yt-dlp with this source https://github.com/yt-dlp/yt-dlp/arc...3.10.13.tar.gz

today I updated yt-dlp-2023.07.06 to yt-dlp-2023.10.07, norhing to report.

hello bigbadaboum,
please forgive my stupidity. I copied SlackBuild file unzipped it and inside i put the source you've pointed out.
When i run ./yt-dlp.Slackbuild i get error
Code:

yt-dlp-2023.10.13/.github/banner.svg
yt-dlp-2023.10.13/pyinst.py
yt-dlp-2023.10.13/Makefile
yt-dlp-2023.10.13/requirements.txt
./yt-dlp.SlackBuild: line 57: cd: yt-dlp: No such file or directory

i see that in .SlackBuild on line 57 there is command
Code:

#57 cd $PRGNAM
i was able to understand that when starting the script, following 2 folders are created in
Code:

/tmp/SBo
package-yt-dlp
yt-dlp-2023.10.13

in the versioned folder , there is a subfolder
Code:

yt-dlp-2023.10.13/yt-dlp
and i think that the error that i am getting is because that subfolder does not exist under the generic package folder
Code:

package-yt-dlp - > it is empty
even if i copy it manually and create package-yt-dlp/yt-dlp , on the next run, everything gets overriden.

can you please let me know how to get out of this crazy situation?

bigbadaboum 10-14-2023 11:46 AM

yt-dlp.SlackBuild

line 25:
VERSION=${VERSION:-2023.10.13}

line 55 56 57:
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$VERSION.tar.gz
cd $PRGNAM-$VERSION

line 98:
# gzip -9 $PKG/usr/man/man1/*

yt-dlp.info

line 2 3 4 5:
VERSION="2023.10.13"
HOMEPAGE="https://github.com/yt-dlp/yt-dlp"
DOWNLOAD="https://github.com/yt-dlp/yt-dlp/archive/refs/tags/2023.10.13.tar.gz"
MD5SUM="4138a090a8fb0ad71c8b4a2af3a1b5fd"

have fun

Tonus 10-14-2023 05:27 PM

[QUOTE=glupa4e;6458719]hello, i tried SlackBuild from https://slackbuilds.org/repository/1...outube-dl-gui/
/QUOTE]
That the gui (graphic user interface), not the core software just a frontend.

I suggest you try to change what bigbadaboum advised.

A simple tool that makes things easier is sbopkg : https://sbopkg.org


All times are GMT -5. The time now is 03:06 PM.