<?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: Saving and restoring the list of packages installed on a Debian system using aptitude or deborphan</title> <atom:link href="https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Mon, 01 Jan 2024 17:12:20 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>By: Bogdan</title><link>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html#comment-388049</link> <dc:creator><![CDATA[Bogdan]]></dc:creator> <pubDate>Tue, 17 Nov 2015 11:55:20 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2011#comment-388049</guid> <description><![CDATA[Hi Tom,
first of all, &lt;code&gt;dpkg --set-selections&lt;/code&gt; seems to accept multiline input on stdin (as per dpkg man page) - this is why it does not need &lt;strong&gt;xargs&lt;/strong&gt;.
In the case of aptitude command, package names are added as command arguments; as there can be many packages, maximal command line length might be exceeded.
To avoid that, &lt;strong&gt;xargs&lt;/strong&gt; is used: it feeds arguments (lines) from &lt;strong&gt;package_list&lt;/strong&gt; to aptitude until the command line length limit is reached.
When that happens, another aptitude command will be constructed and run, until all lines from &lt;strong&gt;package_list&lt;/strong&gt; are processed.
Sudo can be added either before xargs, or before aptitude - there should be no visible difference with default sudo configuration. I&#039;d put sudo before xargs, though. I haven&#039;t tested this, so please reply if your experience contradicts my advice :)]]></description> <content:encoded><![CDATA[<p>Hi Tom,</p><p>first of all, <code>dpkg --set-selections</code> seems to accept multiline input on stdin (as per dpkg man page) &#8211; this is why it does not need <strong>xargs</strong>.<br
/> In the case of aptitude command, package names are added as command arguments; as there can be many packages, maximal command line length might be exceeded.<br
/> To avoid that, <strong>xargs</strong> is used: it feeds arguments (lines) from <strong>package_list</strong> to aptitude until the command line length limit is reached.<br
/> When that happens, another aptitude command will be constructed and run, until all lines from <strong>package_list</strong> are processed.</p><p>Sudo can be added either before xargs, or before aptitude &#8211; there should be no visible difference with default sudo configuration. I&#8217;d put sudo before xargs, though. I haven&#8217;t tested this, so please reply if your experience contradicts my advice <img
src="https://bogdan.org.ua/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p> ]]></content:encoded> </item> <item><title>By: Tom Roche</title><link>https://bogdan.org.ua/2013/10/18/saving-restoring-list-of-packages-installed-on-debian-using-aptitude-deborphan.html#comment-387986</link> <dc:creator><![CDATA[Tom Roche]]></dc:creator> <pubDate>Tue, 17 Nov 2015 06:16:26 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=2011#comment-387986</guid> <description><![CDATA[Thanks for posting. FWIW,
* I referenced this post @ http://unix.stackexchange.com/a/243510/38638
* I have a question about `sudo` and `xargs` in the package-restore commandline
&lt;code&gt;xargs aptitude --schedule-only install &lt; package_list; aptitude install&lt;/code&gt;
in &lt;a href=&quot;http://serverfault.com/questions/56848/install-the-same-debian-packages-on-another-system/61472#comment920243_61472&quot; rel=&quot;nofollow&quot;&gt;a comment on the serverfault answer you cite&lt;/a&gt;.]]></description> <content:encoded><![CDATA[<p>Thanks for posting. FWIW,</p><p>* I referenced this post @ <a
href="http://unix.stackexchange.com/a/243510/38638" rel="nofollow">http://unix.stackexchange.com/a/243510/38638</a></p><p>* I have a question about `sudo` and `xargs` in the package-restore commandline</p><p><code>xargs aptitude --schedule-only install &lt; package_list; aptitude install</code></p><p>in <a
href="http://serverfault.com/questions/56848/install-the-same-debian-packages-on-another-system/61472#comment920243_61472" rel="nofollow">a comment on the serverfault answer you cite</a>.</p> ]]></content:encoded> </item> </channel> </rss>