[Pkg-javascript-devel] ***SPAM*** Re: About nodejs Breaks list

Jonas Smedegaard dr at jones.dk
Fri Aug 3 10:44:12 UTC 2012


On 12-08-01 at 02:17pm, Marcelo Jorge Vieira wrote:
> On Wed, 2012-08-01 at 11:53 -0300, Marcelo Jorge Vieira wrote:
> > On Wed, 2012-08-01 at 09:48 +0200, Jonas Smedegaard wrote:
> > > So thanks for pointing out node-colors and node-skin-test - I'll 
> > > correct those.  You are quite welcome to help run through the 
> > > remaining ones too - and also to cross-check via different methods 
> > > than (build-)depends if I've missed some.
> > 
> > These packages do not reference /usr/bin/node or /usr/bin/env node:
> > 
> > * buddycloud-server
> > * node-abbrev
> > * node-ain2
> > * node-async
> > * node-connect
> > * node-lru-cache
> 
> Sorry for this insane script:
> 
> PKGS=$(dpkg-query -W -f='${Breaks}\n' nodejs | sed 's#,#\n#g' | sed s#\(.*\)##g);
> for p in $PKGS; do
>     VCS=$(apt-cache showsrc $p | grep Vcs-Git | cut -d " " -f 2);
>     git clone $VCS;
> done
> rgrep -e "^#\!/usr/bin/env node\|^#\!/usr/bin/node" -I --exclude-dir=.git --exclude-dir=debian  * | cut -d "/" -f 1 | uniq

Here's an alternate script inspired from above, with the following 
functional changes:

 * Resolve suspects from APT (not hardcoded list from nodejs)
 * inspect sources of released sources (not VCS sources)
 * Also check debian subdir
 * Catches also e.g. "exec env  node" (no #! or path, two spaces)

DEPS=$(apt-cache rdepends nodejs | grep '^  ')
RDEPS=$((build-rdeps nodejs; build-rdeps nodejs-dev) | grep '^[a-z0-9]')
PKGS=$(echo $DEPS $RDEPS | perl -pe 's/(?<!\S)nodejs(-dev)?(?!\S)//' | sort -u)
for p in $PKGS; do apt-get source $p; done
rgrep -Pe '^#!.*(env *)?node' -I * | perl -pe 's/-[^-]+\/.*//' | uniq



> Using this insane script we can reduce the nodejs Breaks list
> to only 20 packages:
> 
> coffeescript
> less.js
> node-bones
> node-carto
> node-cli
> node-express
> node-get
> node-jake
> node-mapnik
> node-mbtiles
> node-nopt
> node-optimist
> node-semver
> node-tilelive
> node-traverse
> node-which
> node-zipfile
> npm
> uglifyjs
> vows

My script has these differences compared to above:

 + buddycloud-server
 - nodejs (I explicitly avoid it)
 + sax.js


Thanks for the help.  I'll adjust the Breaks: accordingly (and 
double-check that nodejs itself does not ship broken scripts).


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-javascript-devel/attachments/20120803/35297fe7/attachment.pgp>


More information about the Pkg-javascript-devel mailing list