summaryrefslogtreecommitdiff
path: root/yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch
diff options
context:
space:
mode:
Diffstat (limited to 'yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch')
-rw-r--r--yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch b/yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch
new file mode 100644
index 0000000..968b171
--- /dev/null
+++ b/yt-dlp/debian/patches/0002-Disable-upstream-s-autoupdate-mechanism.patch
@@ -0,0 +1,69 @@
+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 ---
+ yt_dlp/__init__.py | 11 ++++++-----
+ yt_dlp/options.py | 2 +-
+ 3 files changed, 7 insertions(+), 9 deletions(-)
+
+--- a/README.md 2021-12-01 15:12:20.651056853 -0500
++++ b/README.md 2021-12-01 15:12:20.631057057 -0500
+@@ -289,9 +289,6 @@
+ ## General 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 Ignore download and postprocessing errors.
+ The download will be considered successful
+ even if the postprocessing fails
+--- a/yt_dlp/__init__.py 2021-12-01 15:12:20.651056853 -0500
++++ b/yt_dlp/__init__.py 2021-12-01 15:12:20.631057057 -0500
+@@ -42,7 +42,6 @@
+ std_headers,
+ write_string,
+ )
+-from .update import run_update
+ from .downloader import (
+ FileDownloader,
+ )
+@@ -791,10 +790,12 @@
+ # Update version
+ if opts.update_self:
+ # If updater returns True, exit. Required for windows
+- if run_update(ydl):
+- if actual_use:
+- sys.exit('ERROR: The program must exit for the update to complete')
+- sys.exit()
++ parser.error(
++ "yt-dlp's self-update mechanism is disabled on Debian.\n"
++ "Please update yt-dlp using apt(8).\n"
++ "See https://packages.debian.org/sid/yt-dlp for the "
++ "latest packaged version.\n"
++ )
+
+ # Maybe do nothing
+ if not actual_use:
+--- a/yt_dlp/options.py 2021-12-01 15:12:20.651056853 -0500
++++ b/yt_dlp/options.py 2021-12-01 15:12:20.635057016 -0500
+@@ -205,7 +205,7 @@
+ 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',
bgstack15