<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to check for a package/binary in a disk-friendly way? PackageKit &#8212; but how?</title>
	<atom:link href="http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Tue, 15 Jun 2010 18:43:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: My computer allows the disk check utility to begin but then cancels the scan? &#124; How To fix Registry</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-600</link>
		<dc:creator>My computer allows the disk check utility to begin but then cancels the scan? &#124; How To fix Registry</dc:creator>
		<pubDate>Sun, 09 Aug 2009 11:15:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-600</guid>
		<description>[...] How to check for a package/binary in a disk-friendly way &#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] How to check for a package/binary in a disk-friendly way &#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tollef Fog Heen</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-599</link>
		<dc:creator>Tollef Fog Heen</dc:creator>
		<pubDate>Sun, 09 Aug 2009 08:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-599</guid>
		<description>It sounds suboptimal to check this using packagekit.  A user might well have compiled mc locally, or it might be in /usr/local for whatever reason.</description>
		<content:encoded><![CDATA[<p>It sounds suboptimal to check this using packagekit.  A user might well have compiled mc locally, or it might be in /usr/local for whatever reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Calvin Walton</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-598</link>
		<dc:creator>Calvin Walton</dc:creator>
		<pubDate>Fri, 07 Aug 2009 21:47:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-598</guid>
		<description>One thing to note is that your shell has had in-memory caching of executables which are installed and where they are located for ages.
The first time you run “mc” in a shell, it’ll do the full synchronous PATH lookup, but every following time it will just immediately run the executable from the cached location.
There’s problems with the shell implementation – if you delete or move a program, you have to run “hash -r” (in bash) to reset the cache.
But still, it wouldn’t be that hard to make a simple shared path-lookup cache. Make it add monitors on the executables it finds, and it can invalidate itself.</description>
		<content:encoded><![CDATA[<p>One thing to note is that your shell has had in-memory caching of executables which are installed and where they are located for ages.<br />
The first time you run “mc” in a shell, it’ll do the full synchronous PATH lookup, but every following time it will just immediately run the executable from the cached location.<br />
There’s problems with the shell implementation – if you delete or move a program, you have to run “hash -r” (in bash) to reset the cache.<br />
But still, it wouldn’t be that hard to make a simple shared path-lookup cache. Make it add monitors on the executables it finds, and it can invalidate itself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to check for a package/binary in a disk-friendly way &#8230; &#124; paydayloan</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-597</link>
		<dc:creator>How to check for a package/binary in a disk-friendly way &#8230; &#124; paydayloan</dc:creator>
		<pubDate>Fri, 07 Aug 2009 19:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-597</guid>
		<description>[...] here to see the original: How to check for a package/binary in a disk-friendly way &#8230;     Leave a [...]</description>
		<content:encoded><![CDATA[<p>[...] here to see the original: How to check for a package/binary in a disk-friendly way &#8230;     Leave a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Stone</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-596</link>
		<dc:creator>Josh Stone</dc:creator>
		<pubDate>Fri, 07 Aug 2009 15:56:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-596</guid>
		<description>&gt; On the other hand, the $PATHs are not cached and monitored.

The kernel&#039;s page cache will almost surely have the PATH contents in memory.  Are you sure that g_find_program_in_path is your culprit?  I would try hard-coding just that line to the mc on your system, to see if the spin-up delays go away.</description>
		<content:encoded><![CDATA[<p>&gt; On the other hand, the $PATHs are not cached and monitored.</p>
<p>The kernel&#8217;s page cache will almost surely have the PATH contents in memory.  Are you sure that g_find_program_in_path is your culprit?  I would try hard-coding just that line to the mc on your system, to see if the spin-up delays go away.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: djcb</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-595</link>
		<dc:creator>djcb</dc:creator>
		<pubDate>Fri, 07 Aug 2009 15:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-595</guid>
		<description>it might also be side to have the program still in the menu (maybe greyed-out), and upon selection offer to install it.

but, the easiest solution may be to simply trigger a spin-up when you&#039;re returning from suspend; at least easy enough to use before implementing something really smart. anything but checking for the binary in path is rather fragile, as are caches.</description>
		<content:encoded><![CDATA[<p>it might also be side to have the program still in the menu (maybe greyed-out), and upon selection offer to install it.</p>
<p>but, the easiest solution may be to simply trigger a spin-up when you&#8217;re returning from suspend; at least easy enough to use before implementing something really smart. anything but checking for the binary in path is rather fragile, as are caches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-594</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Fri, 07 Aug 2009 13:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-594</guid>
		<description>Obviously caching the return is a good idea, you should also listen for inotify and or PackageKit removal events in case mc gets uninstalled/reinstalled etc so that the UI is consistent with the filesystem state.</description>
		<content:encoded><![CDATA[<p>Obviously caching the return is a good idea, you should also listen for inotify and or PackageKit removal events in case mc gets uninstalled/reinstalled etc so that the UI is consistent with the filesystem state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-593</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Fri, 07 Aug 2009 13:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-593</guid>
		<description>Package names are not standardised, but there is an effort to map between distros (see the Gentoo PackageMap Google Summer of Code project).

Anyway, just run the above method in a thread and add the mc menu item when the thread returns instead of blocking the UI. You can have mc installed, but not in your path in strange situations. Or have mc in your path but not installed (built from source) What matters is whether or not mc is in the path, not that an mc package is installed.</description>
		<content:encoded><![CDATA[<p>Package names are not standardised, but there is an effort to map between distros (see the Gentoo PackageMap Google Summer of Code project).</p>
<p>Anyway, just run the above method in a thread and add the mc menu item when the thread returns instead of blocking the UI. You can have mc installed, but not in your path in strange situations. Or have mc in your path but not installed (built from source) What matters is whether or not mc is in the path, not that an mc package is installed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M Welinder</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-592</link>
		<dc:creator>M Welinder</dc:creator>
		<pubDate>Fri, 07 Aug 2009 13:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-592</guid>
		<description>I don&#039;t get it.   Nautilus wants to know if it can execute the &quot;mc&quot; command.
(And, perhaps, if that &quot;mc&quot; is really midnight commander.)  That is not a
question that packagekit can answer.  If I install mc from a tarball then
packagekit won&#039;t even know it.

g_find_program_in_path, on the other hand, can answer the question.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t get it.   Nautilus wants to know if it can execute the &#8220;mc&#8221; command.<br />
(And, perhaps, if that &#8220;mc&#8221; is really midnight commander.)  That is not a<br />
question that packagekit can answer.  If I install mc from a tarball then<br />
packagekit won&#8217;t even know it.</p>
<p>g_find_program_in_path, on the other hand, can answer the question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hron84</title>
		<link>http://blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/comment-page-1/#comment-590</link>
		<dc:creator>hron84</dc:creator>
		<pubDate>Fri, 07 Aug 2009 12:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/cneumair/?p=78#comment-590</guid>
		<description>@oliver:
mc is a console-based app, and i don&#039;t think it has a desktop entry. But this is totally unrelated. The main question IMHO how can you find any binary in system.</description>
		<content:encoded><![CDATA[<p>@oliver:<br />
mc is a console-based app, and i don&#8217;t think it has a desktop entry. But this is totally unrelated. The main question IMHO how can you find any binary in system.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/cneumair/2009/08/07/how-to-check-for-a-packagebinary-in-a-disk-friendly-way-packagekit-but-how/feed/ ) in 0.15690 seconds, on Feb 12th, 2012 at 7:20 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 12th, 2012 at 8:20 am UTC -->
