On 9/21/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote: > On Fri, 21 Sep 2007 20:30:15 +0200, Hisham Muhammad <[EMAIL PROTECTED]> wrote: > > > On 9/21/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote: > >> 2007/9/21, Hisham Muhammad <[EMAIL PROTECTED]>: > >> > On 9/20/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote: > >> > > I have written a small script (see below) to find what applications > >> > > are dependant on a given application. Before I commit it I'd like some > >> > > feedback, if there are things I can change and make better (or > >> > > differently). > >> > > >> > Looks like --specific-version is not taking version operators into > >> > account. I didn't find much use for this option. > >> > > >> With --specific-version the script will be more specific when grepping > >> though the Dependencies and BuildInformation files. It narrows the > >> hits down, but may miss dependencies, since a later version of the > >> dependency may be added since those file were created. I don't know if > >> it is really usefull, it just felt like it when I wrote the script. > >> > >> > Cross-checking with ldd will cause hand-added dependencies to be > >> > missed. As a consequence, "CheckDependants python" missed Subversion, > >> > for example, while "CheckDependants --fast python" got it. > >> > > >> > On the other hand, when checking a non-Current version of GTK+, --fast > >> > got it wrong and the slow mode got it right. > >> > > >> > My suggestion is to make the "fast" mode the default when no version > >> > is given. When a version is given, the cross-check should skip the > >> > dependency only if the dependency is returned by ldd but it is not the > >> > requested version. May cause the odd false-positive, but it's better > >> > than missing hand-added dependencies. > >> > > >> Besides changing default to '--fast' when no version is given, what is > >> the difference from the original implementation? > >> Another option for not missing hand added dependencies would be to > >> make a diff between Dependencies and BuildInformation and not run the > >> cross-check for entries only in the Dependencies file. > >> > >> > Here's a version with the suggested changes: > >> > http://hisham.gobolinux.org/CheckDependants > >> > >> Why is the grep at the end of the pipe split? Unecessary imo. > > > > Because it implements the other feature I mentioned: "cross-check > > should skip the dependency only if the dependency is returned by ldd > > but it is not the requested version." > > > That's how it was done before as well.
No. You missed the difference both in the implementation and the description. In full (not fast) mode, the old dependency missed Subversion from the Python dependants, the new one doesn't. > > This improves the full scan. The new version no longer misses > > Subversion when checking dependants of Python, and it is still able to > > correctly identify that my old version of GTK+ is not really used. > > > But that's due to not using the cross-check, not because you split the > grep expression. It's because I split the grep expression. I was talking about the full scan with cross-check (ie, running "CheckDependants Python 2.5" and "CheckDependants GTK+ 2.10.10"). > >> And with > >> the last regex for grepping for the version, one miss the feature of > >> just checking for major version or major + minor version, and skipping > >> bugfix releases and below. > > > > It was not a feature, it was a bug. For example, I checked dependants > > of "GTK+ 2.10.1" to see if I could delete it and keep only the newer > > GTK+ 2.10.14, it returned a lot of false hits. > > > For me it was a feature. It produced incorrect results. > How about checking if the version specified > exists and if so, add '$' to the end of the grep expression, otherwice > just leave it? Personally, I would find that behavior inconsistent from a user perspective. -- Hisham _______________________________________________ gobolinux-devel mailing list gobolinux-devel@lists.gobolinux.org http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel