LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-13-2023, 01:33 PM   #1
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Rep: Reputation: 7
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?
 
Old 10-13-2023, 01:37 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,319

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
Have you a version of python3 in 14.2?

Try updating it with
Code:
sudo yt-dlp -U
What happens?
 
Old 10-13-2023, 01:41 PM   #3
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by business_kid View Post
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
 
Old 10-13-2023, 03:37 PM   #4
bigbadaboum
Member
 
Registered: Apr 2023
Posts: 143

Rep: Reputation: 55
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
 
1 members found this post helpful.
Old 10-14-2023, 02:57 AM   #5
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by bigbadaboum View Post
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?
 
Old 10-14-2023, 03:02 AM   #6
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
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.
 
Old 10-14-2023, 03:08 AM   #7
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 641

Rep: Reputation: 488Reputation: 488Reputation: 488Reputation: 488Reputation: 488
Maybe this Appimage is working on 14.2?
https://github.com/jely2002/youtube-dl-gui/releases
 
Old 10-14-2023, 05:37 AM   #8
Ian M
Member
 
Registered: Oct 2017
Location: UK
Distribution: Slackware 15
Posts: 39

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 10-14-2023, 05:46 AM   #9
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Tonus View Post
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?

Last edited by glupa4e; 10-14-2023 at 05:56 AM.
 
Old 10-14-2023, 05:51 AM   #10
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by Ian M View Post
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)
 
Old 10-14-2023, 06:07 AM   #11
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by rizitis View Post
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
 
Old 10-14-2023, 06:25 AM   #12
bigbadaboum
Member
 
Registered: Apr 2023
Posts: 143

Rep: Reputation: 55
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.
 
2 members found this post helpful.
Old 10-14-2023, 11:07 AM   #13
glupa4e
Member
 
Registered: Jan 2011
Posts: 321

Original Poster
Rep: Reputation: 7
Quote:
Originally Posted by bigbadaboum View Post
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?
 
Old 10-14-2023, 11:46 AM   #14
bigbadaboum
Member
 
Registered: Apr 2023
Posts: 143

Rep: Reputation: 55
Talking

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
 
1 members found this post helpful.
Old 10-14-2023, 05:27 PM   #15
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
[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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
LXer: Configure An Email Gateway With Scrollout F1 Anti-Spam & DLP LXer Syndicated Linux News 0 07-23-2012 02:11 PM
LXer: TI ships Linux-ready DLP eval module for pico projectors LXer Syndicated Linux News 0 01-26-2012 04:10 PM
46" Samsung DLP Screen displays as 50" - Can't see the whole screen! magnet-o Linux - Newbie 2 02-08-2011 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration