Opened 7 years ago

Closed 7 years ago

#54671 closed defect (fixed)

youtube-dl @2017.08.23_0: cp: illegal option -- a

Reported by: udbraumann Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger leopard Cc:
Port: youtube-dl

Description

While upgrading youtube-dl from 2017.08.18_0 to 2017.08.23_0 building has stopped here:

...
While upgrading :info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_youtube-dl/youtube-dl/work/youtube-dl'
:info:build mkdir -p zip
:info:build for d in youtube_dl youtube_dl/downloader youtube_dl/extractor youtube_dl/postprocessor ; do \
:info:build       mkdir -p zip/$d ;\
:info:build       cp -a $d/*.py zip/$d/ ;\
:info:build     done
:info:build cp: illegal option -- a
:info:build usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
:info:build        cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
:info:build cp: illegal option -- a
:info:build usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
:info:build        cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
:info:build cp: illegal option -- a
:info:build usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
:info:build        cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
:info:build cp: illegal option -- a
:info:build usage: cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file target_file
:info:build        cp [-R [-H | -L | -P]] [-fi | -n] [-pvX] source_file ... target_directory
:info:build make: *** [youtube-dl] Error 64
...

Obviously, the -a switch has not been implemented in the 2005 BSD variant of cp (not sure if implemented at all for BSD so far). As far as I can see, -a can be mimicked using -dR --preserve=all, whereas -d is a brief variant of -P --preserve=links. Also, -p is more or less the same as --preserve=all. -R seems to have not changed since the 2005 BSD cp. So I propose to use -pPR instead of -a on systems where -a (or --archive) is missing, or just to replace the -a for all systems with -pPR.

Attachments (1)

main.log.gz (3.1 KB) - added by udbraumann 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by udbraumann

Attachment: main.log.gz added

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Keywords: tiger leopard added; BSD cp removed
Owner: set to ryandesign
Status: newaccepted
Summary: youtube-dl @2017.08.23_0 fails building on 10.5.8youtube-dl @2017.08.23_0: cp: illegal option -- a

Yes, from man cp on modern macOS:

     -a    Same as -pPR options. Preserves structure and attributes of files but not directory structure.

I'll get it fixed and report it to the developers.

comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 9957fc31a91067f8ed242f0ac6e95d9e4f3e8c33/macports-ports:

youtube-dl: Avoid using cp's modern -a flag

Old versions of cp (e.g. on Mac OS X 10.5 and earlier) don't understand
this flag. Use equivalent -pPR flags.

Closes: #54671

Note: See TracTickets for help on using tickets.