<?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>tip on Launchpad Blog</title>
    <link>https://blog.launchpad.net/tags/tip/</link>
    <description>News and updates from the Launchpad team</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 18 Mar 2011 06:52:10 +0000</lastBuildDate>
    <atom:link href="https://blog.launchpad.net/feed/tags/tip/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>pad.lv: short Launchpad URLs</title>
      <link>https://blog.launchpad.net/cool-new-stuff/pad-lv/</link>
      <pubDate>Fri, 18 Mar 2011 06:52:10 +0000</pubDate>
      <dc:creator>Martin Pool</dc:creator>
      <guid isPermaLink="false">https://blog.launchpad.net/?p=2019</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short story:  &lt;a href=&#34;http://pad.lv/12345&#34;&gt;&lt;code&gt;http://pad.lv/12345&lt;/code&gt;&lt;/a&gt; takes you to bug 12345, and &lt;a href=&#34;http://pad.lv/&#34;&gt;pad.lv&lt;/a&gt; describes more abbreviations.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://blog.launchpad.net/images/posts/2011/03/padlv.jpg&#34; alt=&#34;padlv&#34;&gt;&lt;/p&gt;
&lt;p&gt;Sometimes you&amp;rsquo;d like to point people to an interesting bug in a project that uses Launchpad, like &lt;a href=&#34;https://bugs.launchpad.net/ubuntu-font-family/+bug/685380&#34;&gt;bug 685380&lt;/a&gt; (that &amp;lsquo;1&amp;rsquo; and &amp;rsquo;l&amp;rsquo; may need to be more distinct in the new &lt;a href=&#34;http://font.ubuntu.com&#34;&gt;Ubuntu Font&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Typing out &lt;code&gt;https://launchpad.net/bugs/685380&lt;/code&gt; is a bit tedious, and it uses up a fair bit of space in a microblog entry.  You can use any of innumerable URL-shortening services, but then the URL&amp;rsquo;s opaque; which is a shame since it really just wants to represent a 6-digit number.&lt;/p&gt;
&lt;p&gt;Therefore: &lt;strong&gt;&lt;a href=&#34;http://pad.lv/&#34;&gt;pad.lv&lt;/a&gt; (pad love), transparent short URLs for bugs, and other things including projects, people, bug-filing forms, packages, and more&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Maybe someone would like to make bookmarklets that generate these links, or &lt;a href=&#34;https://dev.launchpad.net/&#34;&gt;add them into the Launchpad UI&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href=&#34;http://en.wikipedia.org/wiki/Latvia&#34;&gt;Latvia&lt;/a&gt; for letting us use a fraction of their domain name space!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>&#34;Failed to fetch&#34; errors for PPAs ...</title>
      <link>https://blog.launchpad.net/ppa/failed-to-fetch-errors-for-ppas/</link>
      <pubDate>Fri, 18 Feb 2011 04:55:19 +0000</pubDate>
      <dc:creator>Martin Pool</dc:creator>
      <guid isPermaLink="false">https://blog.launchpad.net/?p=1972</guid>
      <description>&lt;p&gt;You may start getting &amp;ldquo;Failed to fetch&amp;rdquo; error messages when updating your software sources (e.g. through &amp;ldquo;&lt;code&gt;apt-get update&lt;/code&gt;&amp;rdquo; or &amp;ldquo;&lt;em&gt;Reload package information&lt;/em&gt;&amp;rdquo; in Synaptic), which may be due to a bug we&amp;rsquo;ve just cleaned up in Launchpad&amp;rsquo;s PPAs.&lt;/p&gt;
&lt;p&gt;The error looks like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  W: Failed to fetch http://ppa.launchpad.net/chromium-daily/ppa/ubuntu/dists/maverick/Release
  Unable to find expected entry  restricted/binary-i386/Packages in Meta-index file (malformed Release file?)

  E: Some index files failed to download, they have been ignored, or old ones used instead.
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;fixing-the-cause-of-the-error&#34;&gt;Fixing the cause of the error&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s how to fix it. In your terminal, type:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; sudo gedit /etc/apt/sources.list
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the editor, look for PPA sources — these are URLs that feature the &lt;tt&gt;ppa.launchpad.net&lt;/tt&gt; domain.  In this example, someone has set up the &lt;tt&gt;~ubuntu-x-swat/x-updates&lt;/tt&gt; PPA incorrectly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick main
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick restricted
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick universe
 deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu maverick multiverse
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;All of these refer to different components within the same PPA. PPAs only have the first component, so you should delete lines for PPAs that don&amp;rsquo;t end in &amp;ldquo;main&amp;rdquo;. Watch out for lines that wrap, as with the &amp;ldquo;restricted&amp;rdquo;, &amp;ldquo;universe&amp;rdquo; and &amp;ldquo;multiverse&amp;rdquo; examples above.&lt;/p&gt;
&lt;p&gt;You may also need to check source lists under the &lt;tt&gt;/etc/apt/sources.list.d&lt;/tt&gt; directory.&lt;/p&gt;
&lt;p&gt;Note: you should leave your standard Ubuntu sources, and any non-PPA sources, just as they are.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re not sure how to do this, pop into &lt;tt&gt;#launchpad&lt;/tt&gt; on &lt;a href=&#34;https://help.ubuntu.com/community/InternetRelayChat&#34;&gt;freenode&lt;/a&gt; and one of the Launchpad community will help.&lt;/p&gt;
&lt;h3 id=&#34;why-this-has-happened&#34;&gt;Why this has happened&lt;/h3&gt;
&lt;p&gt;The Debian-style archives used by Ubuntu are often divided into different components. With Ubuntu, you&amp;rsquo;ve probably heard of at least &amp;ldquo;main&amp;rdquo; and &amp;ldquo;universe&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;PPAs don&amp;rsquo;t use these components. However, a bug in Launchpad meant that, until December, PPAs were published with a number of different components.  All of these components were empty and there was no way to publish anything to them.&lt;/p&gt;
&lt;p&gt;Today, we started to remove these empty components from PPAs. The only impact we anticipate is that anyone whose sources.list referenced these components in a PPA will now see an error when performing an &lt;tt&gt;apt-get update&lt;/tt&gt; or similar.&lt;/p&gt;
&lt;p&gt;No packages are being deleted and anyone with a correctly defined sources.list will be able to carry on just as before.&lt;/p&gt;
&lt;p&gt;(&lt;a href=&#34;https://lists.launchpad.net/launchpad-users/msg06219.html&#34;&gt;Originally from Julian&lt;/a&gt;.)&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Three tips for faster launchpadlib api clients</title>
      <link>https://blog.launchpad.net/api/three-tips-for-faster-launchpadlib-api-clients/</link>
      <pubDate>Wed, 14 Jul 2010 13:30:04 +0000</pubDate>
      <dc:creator>Martin Pool</dc:creator>
      <guid isPermaLink="false">https://blog.launchpad.net/?p=1626</guid>
      <description>&lt;p&gt;Three tips from &lt;a href=&#34;http://launchpad.net/~leonardr&#34;&gt;Leonard&amp;rsquo;s&lt;/a&gt; lightning talk in Prague about writing faster &lt;a href=&#34;https://help.launchpad.net/API/launchpadlib#preview&#34;&gt;Launchpadlib&lt;/a&gt; API clients:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Use the latest launchpadlib.&lt;/strong&gt; It gets faster from one release to the next.  (The versions in the current Ubuntu release should be fine; otherwise run from the &lt;a href=&#34;https://code.edge.launchpad.net/~lazr-developers/launchpadlib/trunk&#34;&gt;branch&lt;/a&gt; or the latest &lt;a href=&#34;https://launchpad.net/launchpadlib/+download&#34;&gt;tarball&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Profile:&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    import httplib2
    httplib2.debuglevel = 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;will show each http request and response, so that you can see what&amp;rsquo;s taking time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Fetch objects only once:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t do this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    if bug.person is not None:
        print bug.person.name
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;instead&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    p = bug.person
    if p is not None:
        print p.name
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the first case, the client may fetch the Person object twice.  (We may fix this in future.)&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>
