Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#16817 closed defect (fixed)

BUG: 'port cat' appends blank line to svn version of Portfile

Reported by: dbevans (David B. Evans) Owned by: raimue (Rainer Müller)
Priority: High Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: Cc:
Port:

Description

When using the command 'port cat port_name' to obtain a copy of a given port's Portfile, the text returned has a blank line appended relative to the svn repository version.

This can be verified as follows:

cp `port dir port_name` Portfile.repo  // get repo copy
port cat port_name > Portfile.cat      // get port cat copy
diff -u Portfile.repo Portfile.cat     // compare them

Using libgweather as an example the result is

--- Portfile.repo       2008-10-10 15:05:03.000000000 -0700
+++ Portfile.cat        2008-10-10 15:05:32.000000000 -0700
@@ -26,3 +26,4 @@
 post-activate {
        system "${prefix}/bin/scrollkeeper-update"
 }
+

This is a problem because if you use 'port cat' to get a presumed copy of a port's Portfile, edit it and then make a patch file for upload to Trac, the patch file will fail when applied to svn if the effect of the patch is to append additional script lines to the end of the original Portfile. If you're not appending to the end, the patch works fine. And, of course, the patch always appears to work fine locally.

This apparently random on again, off again failure mode can cause you to question your sanity (as I was) if you don't recognize the pattern!

I'm using MacPorts built from latest trunk. Haven't tried this with 1.6.0.

Change History (6)

comment:1 Changed 16 years ago by raimue (Rainer Müller)

Owner: changed from macports-tickets@… to raimue@…
Status: newassigned

comment:2 Changed 16 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

Fixed in r40693.

Thanks for the catch, there was also a problem with files larger than 4096 bytes.

comment:3 Changed 16 years ago by jmroot (Joshua Root)

Component: portsbase

comment:4 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:5 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.7.0

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Port: MacPorts removed
Note: See TracTickets for help on using tickets.