ports/110978: [maintainer update][patch]Update port: www/youtube_dl to 2007.03.27 []

Pankov Pavel pankov_p at mail.ru
Wed Mar 28 18:40:08 UTC 2007


>Number:         110978
>Category:       ports
>Synopsis:       [maintainer update][patch]Update port: www/youtube_dl to 2007.03.27 []
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 28 18:40:07 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Pankov Pavel
>Release:        6.1-RELEASE
>Organization:
MPEI
>Environment:
FreeBSD fb.home 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Wed May 10 18:19:01 MSD 2006     pankovpv at fb.home:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
- Update port www/youtube_dl to new version from 2007.03.27.
>How-To-Repeat:

>Fix:
Apply the following patch:

Patch attached with submission follows:

Index: ports/www/youtube_dl/Makefile
===================================================================
RCS file: /home/ncvs/ports/www/youtube_dl/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- ports/www/youtube_dl/Makefile	20 Feb 2007 00:58:13 -0000	1.9
+++ ports/www/youtube_dl/Makefile	28 Mar 2007 18:27:18 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	youtube_dl
-PORTVERSION=	2007.02.18
+PORTVERSION=	2007.03.27
 CATEGORIES=	www
 MASTER_SITES=	http://www.arrakis.es/~rggi3/youtube-dl/
 DISTNAME=	youtube-dl-${PORTVERSION}
Index: ports/www/youtube_dl/distinfo
===================================================================
RCS file: /home/ncvs/ports/www/youtube_dl/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- ports/www/youtube_dl/distinfo	20 Feb 2007 00:58:13 -0000	1.9
+++ ports/www/youtube_dl/distinfo	28 Mar 2007 18:27:18 -0000
@@ -1,3 +1,3 @@
-MD5 (youtube-dl-2007.02.18) = 8229aaf2fe20625d66344bd06620ed30
-SHA256 (youtube-dl-2007.02.18) = cb1afbb7faed168ee173ae3d758e19a826518188850379c1007b9197630bf4ae
-SIZE (youtube-dl-2007.02.18) = 12363
+MD5 (youtube-dl-2007.03.27) = 6ea9f13e47d2893c384e5ceb7accffc7
+SHA256 (youtube-dl-2007.03.27) = 9d46699ae77ff685175b13d6bfcfb745bdd0372f025f71a17fd165c98c236fac
+SIZE (youtube-dl-2007.03.27) = 14851
Index: ports/www/youtube_dl/files/ffmpeg.patch
===================================================================
RCS file: /home/ncvs/ports/www/youtube_dl/files/ffmpeg.patch,v
retrieving revision 1.1
diff -u -r1.1 ffmpeg.patch
--- ports/www/youtube_dl/files/ffmpeg.patch	23 Jan 2007 08:12:49 -0000	1.1
+++ ports/www/youtube_dl/files/ffmpeg.patch	28 Mar 2007 18:27:18 -0000
@@ -1,14 +1,14 @@
---- youtube-dl.orig	Sat Jan 20 02:44:25 2007
-+++ youtube-dl	Sat Jan 20 23:53:11 2007
-@@ -167,6 +167,7 @@
- cmdl_parser.add_option('-s', '--simulate', action='store_true', dest='simulate', help='do not download video')
+--- youtube-dl.orig	Wed Mar 28 22:12:49 2007
++++ youtube-dl	Wed Mar 28 22:11:38 2007
+@@ -203,6 +203,7 @@
  cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
+ cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name')
  cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data')
 +cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='output file in avi format')
+ cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only')
  (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
  
- # Get video URL
-@@ -232,19 +233,30 @@
+@@ -275,13 +276,21 @@
  
  # Get output file name 
  if cmdl_opts.outfile is None:
@@ -16,7 +16,7 @@
 +	if cmdl_opts.use_avi:
 +		ext = 'avi'
 +	else:
-+		ext='flv'
++		ext = 'flv'
 +	video_filename = '%s.%s' % (video_url_id,ext)
  else:
  	video_filename = cmdl_opts.outfile
@@ -32,28 +32,29 @@
 +		sys.stderr.write('Warning: video file name does not end in .flv\n')
  
  # Test writable file
- if not cmdl_opts.simulate:
- 	try:
--		disk_test = open(video_filename, 'wb')
--		disk_test.close()
-+		if cmdl_opts.use_avi:
-+			video_file = os.popen('ffmpeg -y -i - "%s" > %s 2> %s' % (video_filename, os.path.devnull, os.path.devnull), 'wb')
-+		else:
-+			disk_test = open(video_filename, 'wb')
-+			disk_test.close()
+ if not (cmdl_opts.simulate or cmdl_opts.get_url):
+@@ -328,7 +337,10 @@
+ 	if cmdl_opts.simulate or cmdl_opts.get_url:
+ 		sys.exit()
  
- 	except (OSError, IOError):
- 		sys.exit('Error: unable to open %s for writing.' % video_filename)
-@@ -317,7 +329,11 @@
- # Rename video file if needed
- if cmdl_opts.use_title:
+-	video_file = open(video_filename, 'wb')
++	if cmdl_opts.use_avi:
++		video_file = os.popen('ffmpeg -y -i - "%s" > %s 2> %s' % (video_filename, os.path.devnull, os.path.devnull), 'wb')
++	else:
++		video_file = open(video_filename, 'wb')
  	try:
--		final_filename = '%s-%s.flv' % (title_string_norm(video_title), video_url_id)
+ 		video_len = long(video_data.info()['Content-length'])
+ 		video_len_str = format_bytes(video_len)
+@@ -382,7 +394,11 @@
+ 			prefix = title_string_norm(video_title)
+ 		else:
+ 			prefix = title_string_touch(video_title)
+-		final_filename = '%s-%s.flv' % (prefix, video_url_id)
 +		if cmdl_opts.use_avi:
 +			ext = 'avi'
 +		else:
 +			ext = 'flv'
-+		final_filename = '%s-%s.%s' % (title_string_norm(video_title), video_url_id, ext)
++		final_filename = '%s-%s.%s' % (prefix, video_url_id, ext)		
  		os.rename(video_filename, final_filename)
  		cond_print('Video file renamed to %s\n' % final_filename)
  	

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list