<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Cody on Launchpad Blog</title>
    <link>https://blog.launchpad.net/authors/cody/</link>
    <description>News and updates from the Launchpad team</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 09 Feb 2009 14:21:41 +0000</lastBuildDate>
    <atom:link href="https://blog.launchpad.net/feed/authors/cody/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Simplifying dput.cf for multiple PPAs</title>
      <link>https://blog.launchpad.net/ppa/simplifying-dputcf-for-multiple-ppas/</link>
      <pubDate>Mon, 09 Feb 2009 14:21:41 +0000</pubDate>
      <dc:creator>Cody Somerville</dc:creator>
      <guid isPermaLink="false">https://blog.launchpad.net/?p=491</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve ever contributed to a Debian-based distribution or used the neat Launchpad PPA services then you&amp;rsquo;ve probably used dput before. We use dput to upload packages to a Debian repository such as the Debian Archive, Ubuntu Archive, or personal archives such as a Personal Package Archive on Launchpad. Getting the hard work you&amp;rsquo;ve done to the archive for the whole world to enjoy is an important part of a packager&amp;rsquo;s work flow and should be easy as possible. This is probably why dput is so popular - it does its job and stays out of the way.&lt;/p&gt;
&lt;p&gt;However, recently while adding support to dput for uploading packages via sftp, I realized that one&amp;rsquo;s dput configuration file can get rather lengthy and messy. Being the Lazy Engineer (TM) that I am, I decided to fix this problem. What I noticed was that you needed to configure an upload target (aka host) for each PPA you might want to upload to but all the configuration stanzas for PPAs were exactly the same except for a part of the path. In fact, it seemed like a number of the stanzas for other archives in my dput configuration file were the same except for the same spot. Wouldn&amp;rsquo;t it be nice if I could just have a single configuration stanzas for these cases and only need to supply an argument for dput to automagically do the right thing? I thought so which is why I&amp;rsquo;ve added a new feature to dput that allows you to have an upload target &amp;ldquo;template&amp;rdquo; where you can pass a single argument to the target specified that will be used to fill in the missing pieces.&lt;/p&gt;
&lt;p&gt;So, instead of having a .dput.cf file in your home directory that looks like the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;[my-ppa] fqdn            = upload.launchpad.net method            = ftp incoming        = ~cody-somerville/ppa/ubuntu login            = anonymous&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;[xubuntu-ppa]&lt;br&gt;
fqdn            = upload.launchpad.net&lt;br&gt;
method            = ftp&lt;br&gt;
incoming        = ~xubuntu-dev/ppa/ubuntu&lt;br&gt;
login            = anonymous&lt;/p&gt;
&lt;p&gt;&amp;hellip;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I can simply have the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;[ppa] fqdn            = upload.launchpad.net method            = ftp incoming        = ~%(ppa)s/ubuntu login            = anonymous&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To upload to my PPA now, I&amp;rsquo;d type: &lt;code&gt;dput ppa:cody-somerville/ppa &lt;em&gt;&amp;lt;changesfile&amp;gt;&lt;/em&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To upload to the Xubuntu Developers&amp;rsquo; ppa, I&amp;rsquo;d type: &lt;code&gt;dput ppa:xubuntu-dev/ppa &lt;em&gt;&amp;lt;changesfile&amp;gt;&lt;/em&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Once Launchpad supports multiple PPAs per user or team, simply replace &amp;ldquo;ppa&amp;rdquo; with&lt;br&gt;
the name of the PPA. If you&amp;rsquo;re lazy, you can modify your .dput.cf to have the&lt;br&gt;
ppa part automatically entered for you until then.&lt;/p&gt;
&lt;p&gt;Anyhow, I hope you enjoy. Cheers!&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
