Sorry, I just saw that your original message didn't make it to the list. I had 
to reject it because it was too large; we don't want to send huge logs to all 
subscribers of the list. If you need to distribute a large logfile, please 
upload it elsewhere and just send a link to it.

From that log, I see that the name of the file that failed to activate does 
indeed begin with "._":

> :error:activate Failed to activate metview: Image error: Source file 
> /opt/local/var/macports/software/metview/mpextractGCwo5BhG/opt/local/lib/metview/share/metview/app-defaults/UserDir/._mv_iconlist_
>  does not appear to exist (cannot lstat it).  Unable to activate port 
> metview.We don't handle these well in MacPorts.


I see that you added code to the metview port to deal with this by distributing 
a tar.gz file of the affected directory and instructing the user to extract it 
later:

https://github.com/macports/macports-ports/commit/246946d853e8c630c29438da49aad9df17409796

I'm not sure if there's another way to deal with this, because here's the 
situation:

Archiving utilities included with macOS like tar and the zip features of 
Archive Utility (but not the zip/unzip command line programs) are programmed to 
recognize AppleDouble files.

https://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats

That is, when archiving a macOS file that has multiple forks or extended 
attributes, that additional data is placed in a file whose name is "._" plus 
the original filename. When unarchiving that archive to a macOS volume that 
supports multiple forks or extended attributes, the data from the "._" file is 
put back into the resource fork or extended attributes of the regular file.

The "._" name prefix was presumably chosen because it was thought to be 
unlikely that anyone else would name files like that. Unfortunately, the 
developers of MetView appear to have done just that, using filenames 
"._mv_viewinfo_" and "._mv_iconlist_" to store some data. These files 
apparently get lost if the directory is archived by an AppleDouble-aware 
archiving utility, since these MetView ._ files are not valid AppleDouble data. 
And if this happens in the context of activating a MacPorts port, it fails 
because MacPorts wants the list of files in the destroot and the list of files 
that ultimately get extracted upon activation to be the same.

It would probably be a good idea to report this to the developers of MetView as 
a bug ask them to name their mv_iconlist and mv_viewinfo files differently so 
as to avoid the "._" prefix.



On Aug 20, 2020, at 02:29, Ryan Schmidt wrote:

> Do you mean files starting with "._"? If so, see:
> 
> https://trac.macports.org/ticket/60749
> 
>> On Aug 19, 2020, at 00:55, Takeshi Enomoto wrote:
>> 
>> I noticed that bsd tar ignores all the files starting with .
>> but gnutar includes them except for . and ..
>> 
>> 2020年8月19日(水) 12:47 Takeshi Enomoto:
>>> 
>>> Dear all,
>>> 
>>> I am updating metview.
>>> I get errors at activate because of image error.
>>> The files causing error start with . (dot).
>>> Are hidden files not allowed or is it a port bug?

Reply via email to