#26406: .packlist files contain each line twice -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.1 Keywords: | Port: perl5 portgroup -------------------------------------+-------------------------------------- Take for example p5-variable-magic: {{{ $ cat /opt/local/lib/perl5/vendor_perl//5.8.9/darwin- 2level/auto/Variable/Magic/.packlist /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Variable/Magic.pm /opt/local/lib/perl5/vendor_perl/5.8.9/darwin- 2level/auto/Variable/Magic/Magic.bs /opt/local/lib/perl5/vendor_perl/5.8.9/darwin- 2level/auto/Variable/Magic/Magic.bundle /opt/local/share/man/man3/Variable::Magic.3pm /opt/local/lib/perl5/vendor_perl/5.8.9/darwin-2level/Variable/Magic.pm /opt/local/lib/perl5/vendor_perl/5.8.9/darwin- 2level/auto/Variable/Magic/Magic.bs /opt/local/lib/perl5/vendor_perl/5.8.9/darwin- 2level/auto/Variable/Magic/Magic.bundle /opt/local/share/man/man3/Variable::Magic.3pm }}} But this affects all ports that install a .packlist, which is probably most or all ports in the perl5 portgroup, and some more. The problem only occurs if the port is already installed and active and is then rebuilt, for example for an upgrade. During the initial install, all is well and only the paths to the items in the destroot get added to the .packlist. The perl5 portgroup's post- destroot reinplace removes the path to the destroot from each line and that's what gets installed. On an upgrade install, I think all the lines from the existing .packlist are copied into the new .packlist, then new lines are appended for the paths in the destroot, then when the perl5 portgroup removes the path to the destroot from those lines, they become the same as the first set of lines, making them duplicates. I think we need some line de-duplication code there, or a way to tell it not to look at an existing .packlist. A nice shortcut might be to first delete all lines in the new .packlist that do not contain the destroot path. Then remove the destroot path from the remaining lines. This should be an easy two-statement one-liner with sed; I'm not sure if reinplace alone can handle it. It might be nice if MacPorts base would take care of this for all ports automatically, rather than having to copy a block of code into each port that has a .packlist. -- Ticket URL: <http://trac.macports.org/ticket/26406> MacPorts <http://www.macports.org/> Ports system for Mac OS