git: e034480085e7 - main - www/yt-dlp: Customize the message recommeding to update yt-dlp
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 Jul 2022 17:54:28 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e034480085e7a5ba65d0762c5929b7ed41883c08
commit e034480085e7a5ba65d0762c5929b7ed41883c08
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-28 17:49:39 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-28 17:54:25 +0000
www/yt-dlp: Customize the message recommeding to update yt-dlp
... for FreeBSD.
---
www/yt-dlp/Makefile | 1 +
www/yt-dlp/files/patch-yt__dlp_update.py | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/www/yt-dlp/Makefile b/www/yt-dlp/Makefile
index c0e696fb4d86..80d0a1dd34a3 100644
--- a/www/yt-dlp/Makefile
+++ b/www/yt-dlp/Makefile
@@ -1,5 +1,6 @@
PORTNAME= yt-dlp
DISTVERSION= 2022.07.18
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= yuri@FreeBSD.org
diff --git a/www/yt-dlp/files/patch-yt__dlp_update.py b/www/yt-dlp/files/patch-yt__dlp_update.py
index 605de73d672c..964f4d186e10 100644
--- a/www/yt-dlp/files/patch-yt__dlp_update.py
+++ b/www/yt-dlp/files/patch-yt__dlp_update.py
@@ -1,8 +1,8 @@
- this patch prevents -U from updating yt-dlp - it makes it "unrecognized"
---- yt_dlp/update.py.orig 2022-06-22 01:54:04 UTC
+--- yt_dlp/update.py.orig 2022-07-18 00:03:50 UTC
+++ yt_dlp/update.py
-@@ -29,7 +29,7 @@ def _get_variant_and_executable_path():
+@@ -39,7 +39,7 @@ def _get_variant_and_executable_path():
path = os.path.dirname(__file__)
if isinstance(__loader__, zipimporter):
@@ -11,3 +11,12 @@
elif (os.path.basename(sys.argv[0]) in ('__main__.py', '-m')
and os.path.exists(os.path.join(path, '../.git/HEAD'))):
return 'source', path
+@@ -64,7 +64,7 @@ _NON_UPDATEABLE_REASONS = {
+ **{variant: f'Auto-update is not supported for unpackaged {name} executable; Re-download the latest release'
+ for variant, name in {'win32_dir': 'Windows', 'darwin_dir': 'MacOS', 'linux_dir': 'Linux'}.items()},
+ 'source': 'You cannot update when running from source code; Use git to pull the latest changes',
+- 'unknown': 'It looks like you installed yt-dlp with a package manager, pip or setup.py; Use that to update',
++ 'unknown': 'Please use the command \'pkg upgrade yt-dlp\' to upgrade.',
+ 'other': 'It looks like you are using an unofficial build of yt-dlp; Build the executable again',
+ }
+