X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=psef4s UHRyJ9OuB69eK5116smk0c1aEkL6XCaz1D+Nii3JK8EH7/zzLLwiSerg7qAB93xV vR2/FEKtGGJ1Frz1y9+aortJsTKTZkqcwrvTcYxr52Vk7dJxUBn+cG3SSjBfjRT4 AMJ86T/+0349a+HrUEnnyxEpEEwOJN1tv7axs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=vnvUArED/1+N s6ZW9FlqMjL1qdM=; b=Bg1DJZYIB0P62xrs0Ctx3pkE60bz0oTPWCadWVFkxH64 ykjAh+bcxbYFHk35LfiL3DOwoYFRy1DUfBPUW5+fzfPJ6UJ80q5hTQy2s3sT0BQP djubeJ9PU2TN6jzpgTZ4DdUq7IAkXXxRcB0yKcwAHIPVSbe/0L4Q+pZgpY3Hbfk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out.ipsmtp1nec.opaltelecom.net X-SMTPAUTH: drstacey AT tiscali DOT co DOT uk X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAJyMa1JV0k8C/2dsb2JhbAANTIM/iUS1XoE0gxkBAQEEeBELGAkWDwkDAgECAUUTCAEBrR+TNY4LgVEWhBYDkC2BMJtb X-IPAS-Result: ApMBAJyMa1JV0k8C/2dsb2JhbAANTIM/iUS1XoE0gxkBAQEEeBELGAkWDwkDAgECAUUTCAEBrR+TNY4LgVEWhBYDkC2BMJtb Message-ID: <526B8DF9.5000004@tiscali.co.uk> Date: Sat, 26 Oct 2013 10:40:09 +0100 From: David Stacey User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: setup.ini dependency graph? References: <526A986D DOT 9040202 AT cwilson DOT fastmail DOT fm> In-Reply-To: <526A986D.9040202@cwilson.fastmail.fm> Content-Type: multipart/mixed; boundary="------------000602090706060604020808" X-IsSubscribed: yes --------------000602090706060604020808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 25/10/13 17:12, Charles Wilson wrote: > Does anybody have a script or a tool that can parse a setup.ini and > generate a dependency graph? I'm using pmcyg to create a > stripped-down standalone installation CD and it's too big, so I'm > trying to figure out where the culprit is that's pulling in so much > stuff... Oooo - this sounds like fun. I've knocked up some (very bad) perl that gives you what you need. It generates a graphviz file that you can pipe to 'dot' to generate the dependency graph in whatever format you require. Put the perl script and your 'setup.ini' file in the same directory and type: ./graph_setup_ini.pl | dot -Tpdf -osetup.pdf I did this in Fedora 19; if you want this to work in Cygwin then you'll need to install graphviz from CygwinPorts. Your problem here is Big Data: Cygwin has 3041 packages, and any dependency graph with this number of nodes is going to look a mess. It also takes a while to process the data. Oh, and some PDF viewers won't display the output file (LibreOffice Draw was the only tool I have that managed it). However, if your starting point is a stripped down Cygwin then you might be OK. Hope this helps, Dave. --------------000602090706060604020808 Content-Type: application/x-perl; name="graph_setup_ini.pl" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="graph_setup_ini.pl" #!/usr/bin/perl -w my $package_name = ''; print "digraph cygwin_setup_ini {\n"; print "\tnode [shape = ellipse, style=filled, fillcolor=cornsilk];\n"; $file = 'setup.ini'; open(INFO, $file); @lines = ; close(INFO); foreach my $line (@lines) { $line =~ s/\R//g; if ($line =~ /^@ /) { ($package_name = $line) =~ s/^@ //; } elsif ($line =~ /^requires: /) { (my $requires = $line) =~ s/^requires: //; my @rqts = split(/ /, $requires); foreach my $rqt (@rqts) { print "\t\"${package_name}\" -> \"${rqt}\";\n"; } } } print "}\n"; --------------000602090706060604020808 Content-Type: text/plain; charset=us-ascii -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple --------------000602090706060604020808--