Package: youtube-dl / 2021.06.06-1

0002-Disable-upstream-s-autoupdate-mechanism.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
Date: Fri, 16 Mar 2018 14:17:40 -0300
Subject: Disable upstream's autoupdate mechanism
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Description: Remove autoupdate mechanism
Bug-Debian: https://bugs.debian.org/890119
Forwarded: not-needed
Author: Nicolas Braud-Santoni <nicolas@braud-santoni.eu>
Reviewed-by: Rogério Theodoro de Brito <rbrito@gmail.com>
Last-Update: 2021-02-13
---
 README.md              | 3 ---
 youtube_dl/__init__.py | 8 ++++++--
 youtube_dl/options.py  | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 94c34d8..50b0e4a 100644
--- a/README.md
+++ b/README.md
@@ -54,9 +54,6 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
 # OPTIONS
     -h, --help                           Print this help text and exit
     --version                            Print program version and exit
-    -U, --update                         Update this program to latest version.
-                                         Make sure that you have sufficient
-                                         permissions (run with sudo if needed)
     -i, --ignore-errors                  Continue on download errors, for
                                          example to skip unavailable videos in a
                                          playlist
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index e1bd679..28327b5 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -36,7 +36,6 @@ from .utils import (
     write_string,
     render_table,
 )
-from .update import update_self
 from .downloader import (
     FileDownloader,
 )
@@ -442,7 +441,12 @@ def _real_main(argv=None):
     with YoutubeDL(ydl_opts) as ydl:
         # Update version
         if opts.update_self:
-            update_self(ydl.to_screen, opts.verbose, ydl._opener)
+            parser.error(
+                "youtube-dl's self-update mechanism is disabled on Debian.\n"
+                "Please update youtube-dl using apt(8).\n"
+                "See https://packages.debian.org/sid/youtube-dl for the "
+                "latest packaged version.\n"
+            )
 
         # Remove cache dir
         if opts.rm_cachedir:
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 241cf11..b5f3a45 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -140,7 +140,7 @@ def parseOpts(overrideArguments=None):
     general.add_option(
         '-U', '--update',
         action='store_true', dest='update_self',
-        help='Update this program to latest version. Make sure that you have sufficient permissions (run with sudo if needed)')
+        help=optparse.SUPPRESS_HELP)
     general.add_option(
         '-i', '--ignore-errors',
         action='store_true', dest='ignoreerrors', default=False,