Opened 17 years ago

Closed 15 years ago

#12914 closed defect (fixed)

"cd" TCL procedure should not be used in Portfiles anymore

Reported by: nox@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: kballard (Lily Ballard), gwright@…, mww@…, waqar@…
Port:

Description

"cd" will be hidden from the subinterpreter in MacPorts 1.6, so we should not use it anymore. I've attached a small report about which ports still use it.

% find . -mindepth 3 -maxdepth 3 -name Portfile | xargs egrep '^[[:space:]]*cd\>' | tee ~/cd.grep | cut -f 2,3 -d / | uniq | tee ~/cd.ports

Attachments (3)

cd.grep (21.3 KB) - added by nox@… 17 years ago.
cd.ports (4.4 KB) - added by nox@… 17 years ago.
ports_using_cd.php (2.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 16 years ago.

Download all attachments as: .zip

Change History (18)

Changed 17 years ago by nox@…

Attachment: cd.grep added

Changed 17 years ago by nox@…

Attachment: cd.ports added

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

Cc: ryandesign@… added
Owner: changed from macports-dev@… to ryandesign@…

I'm taking the initiative here to fix this problem in as many nomaintainer ports as I can (though I'd appreciate help). I also sent an email to the maintainers of the remaining ports.

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

I was using a convoluted shell pipeline to see whom to send the mail to:

port file all | \
xargs grep "[[:space:]]cd[[:space:]]" | \
grep -v "system[[:space:]]" | \
sed -E 's%^.*/(.*)/Portfile.*$%\1%' | \
uniq | \
xargs port info --maintainer | \
sed -e 's%^maintainer: %%' -e 's%,%%' | \
xargs -n 1 echo | \
sort | \
uniq

This was unwieldy and besides did not take into account commented out lines or instructions printed in e.g. ui_msgs. So I wrote a more robust php script to figure it out. My current count is that 275 portfiles still need to be fixed, of which 123 are nomaintainer and 29 are openmaintainer. Thankfully jmpp has granted us a reprieve and MacPorts 1.6 will still have the cd command. So we have some more time to fix this.

To use the new script to examine all portfiles, say:

port file all | php ports_using_cd.php

Or you can pipe in the paths of any subset of files you want examined. For example, to examine just the nomaintainer ports:

port file maintainer:nomaintainer | php ports_using_cd.php

I initially sent a mail to 17 maintainers. I'm not sure now how I arrived at that list; I currently count 69 maintainers who need to fix their ports. I'm not sending out a new mail just yet.

Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: ports_using_cd.php added

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

Cc: gwright@… mww@… waqar@… added; nox@… ryandesign@… removed

All nomaintainer and openmaintainer ports are now fixed. Ryan's script now shows 72 affected ports (two of which are false hits, incidentally). Adding the main offenders to cc.

comment:4 Changed 15 years ago by nox@…

Status from r41624:

  • aqua/aquaterm
  • aqua/Chmox
  • aqua/GPGAppKit
  • aqua/SleepTight
  • archivers/arc
  • audio/libsdl_sound-framework
  • devel/gpgme-objc
  • devel/haskell-chunks
  • devel/haskell-hinstaller
  • devel/haskell-parsedate
  • devel/hoard
  • devel/lua-lunit
  • devel/spin
  • devel/subversion-perlbindings
  • devel/xmlwrapp
  • editors/jove
  • editors/nxml-mode
  • emulators/qemu-usermode
  • graphics/blender
  • graphics/exiftags
  • graphics/lablgl
  • java/javancss
  • java/objectweb-asm
  • lang/eiffelstudio
  • lang/eiffelstudio-devel
  • lang/g95
  • lang/gcc33
  • lang/gcc40
  • lang/ghc-devel
  • lang/gprolog
  • lang/jikespg
  • lang/jlint
  • lang/openmcl
  • lang/strategoxt
  • mail/mutt
  • mail/sympa
  • mail/vm-pop3d
  • math/DoCon
  • math/lp_solve
  • net/argus-monitor
  • net/binkd
  • net/cacti
  • net/http-replicator
  • net/monarch
  • net/nagios
  • net/nedi
  • net/netmrg
  • net/network-weathermap
  • net/nrg
  • net/psi-otr
  • net/pwlib
  • net/rancid
  • net/sclj
  • net/smokeping
  • net/xprobe2
  • net/zabbix
  • perl/p5-filesys-diskspace
  • perl/p5-net-dict
  • science/afni
  • security/metasploit2
  • security/metasploit3
  • security/racoon
  • sysutils/boxbackup
  • sysutils/cdargs
  • sysutils/compare
  • sysutils/count
  • sysutils/ipcs
  • tex/gtamacfonts
  • textproc/highlight
  • textproc/rman
  • textproc/tkman
  • textproc/wbxml2
  • www/midgard-php4
  • www/php5-midgard
  • www/tiki
  • x11/efont-unicode

comment:5 Changed 15 years ago by markd@…

These ports are false positives because 'cd' is used within ui_msg statements:

net/monarch net/nagios net/nedi net/netmrg net/network-weathermap net/nrg net/rancid net/smokeping net/zabbix

comment:6 Changed 15 years ago by nox@…

libsdl_audio-framework taken care of in r41806

comment:7 Changed 15 years ago by nox@…

subversion-perlbindings is a false positive.

comment:8 Changed 15 years ago by nox@…

  • aquaterm taken care of in r42428.
  • Chmox taken care of in r42429.

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

Getting these fixed is fairly pressing now that 1.7.0 is out.

comment:10 Changed 15 years ago by tobypeterson

fixed gprolog in r44912 (user requested in irc)

comment:11 Changed 15 years ago by blb@…

rman fixed in r45391.

comment:12 Changed 15 years ago by blb@…

  • arc done in r42707 by toby
  • hoard done in r46455 by stechert
  • jove done in r48012 by blair
  • nxml-mode done in r48559 by blb
  • exiftags done in r45548 by jmr
  • lablgl done in r46350 by blb
  • eiffelstudio done in r43767 by jann
  • eiffelstudio-devel deleted in r48545 by jann
  • p5-net-dict done in r47809 by vinc17
  • metasploit2 done in r44590 by ricci
  • metasploit3 done in r44588 by ricci
  • racoon deleted in r45071 by jmr
  • highlight done in r48288 by raimue
  • midgard-php4 deleted in r45814 by jwa
  • php5-midgard done in r45542 by jwa
  • efont-unicode done in r43598 by jeremyhu
  • gpgme-objc, GPGAppKit, lua-lunit, spin, xmlwrapp, javancss, objectweb-asm, jikespg, jlint, DoCon, binkd, http-replicator, sclj done in r49645 by blb

New list:

  • aqua/SleepTight
  • devel/haskell-chunks
  • devel/haskell-hinstaller
  • devel/haskell-parsedate
  • emulators/qemu-usermode
  • lang/gcc33
  • lang/gcc40
  • lang/ghc-devel
  • lang/openmcl
  • net/xprobe2
  • science/afni
  • sysutils/compare
  • sysutils/count
  • sysutils/ipcs
  • tex/gtamacfonts
  • textproc/tkman
  • textproc/wbxml2
  • www/tiki

comment:13 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:14 Changed 15 years ago by tobypeterson

Priority: HighNormal

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

Resolution: fixed
Status: newclosed

Closing this now. Further tickets can be opened against individual ports if necessary.

Note: See TracTickets for help on using tickets.