May 11, 2011

Project APT2: new cache format and small things

I did not write much code or merge much of my prototype code, but some things happened since the last blog post about APT2 specific things in August and I forgot to write about them. First of all, I dropped the GVariant-based cache. The format strings were simply getting ugly long and were not very understandable, performance was just much too slow (needing more than a few nanoseconds for a package lookup is obviously too slow for solving dependency problems); furthermore, building the cache was also slow and complicated because we needed all attributes of an object at once to pass them to GVariant, leading to ugly API. ... Read more 》

May 11, 2011

underscores and undefined behavior

As everyone should know, underscores in C are not cool, as they cause undefined behavior per 7.1.3: Yet, they are widely used everywhere. Here are some examples: * inclusion guards in GLib: ` __G_VARIANT_H__` * internal Python functions: `_PyUnicode_AsString` * various macros in APT: `__deprecated`, `__hot` All of this triggers undefined behavior and is thus uncool. Of course in APT, it’s most stupid, as we do not have any namespace and could thus end up redefining things we should not much more likely then the other two. ... Read more 》

April 30, 2011

last two weeks

The last two weeks, two new python-apt releases were made. 0.8.0~exp3 did not add much, but 0.8.0~exp4 added some new bindings for our friends at the mancoosi project. I also committed several fixes to the APT repository, but did not upload them yet. In #debian-devel, some people (including me and others on the Debian side; and sladen, sabdfl for the Ubuntu side) discussed the Ubuntu font license which is considered non-free by Debian, due to extreme naming restrictions in section 2 (unmodified versions must keep the name, slightly modified versions must keep the name and add something). ... Read more 》

April 15, 2011

this week: apt 0.8.14 (regex pinning), stable updates, and bug triaging

python-apt 0.8.0~exp2 bug fix release On Tuesday, I uploaded python-apt 0.8.0~exp2 to experimental, fixing about 10 bugs reported in Ubuntu and Debian bug trackers. It should know even convert integers correctly on all architectures, previously we could have passed long via varargs where int was expected. Bugs Until Thursday, I went through the bug list in Launchpad and closed/fixed/reassigned/merged about 100 bugs in APT and python-apt. APT & python-apt updates for squeeze Today, I uploaded updates of apt and python-apt to stable. ... Read more 》

April 8, 2011

this week: dh-autoreconf 3, and APT-related things

Internship / APT stuff This week was a rather busy week. I’m currently doing a (unpaid) 1 month internship as part of my education. Thanks to Michael Vogt and his boss at Canonical Ltd, this internship takes place in IRC and is dedicated to Debian and Ubuntu stuff, primarily APT-related things. The first two days were spent on multi-arch support in python-apt: On Monday, I released python-apt 0.7.100.3, introducing initial minimal multi-arch support (just enough to not break anymore, but no really new multi-arch-specific API). ... Read more 》

December 10, 2010

sbuild on a tmpfs

As some already know, is that I use sbuild to build all my packages in clean chroot environments. For this, I use the ‘aufs’ “mode” of schroot, that allows you to setup a chroot with one read-only base directory and one writeable overlay where changes are written to. One thing I had problems with was the time required to install build dependencies due to disk I/O. Given that I have 4G RAM in my computer, I decided to use a tmpfs as the writable overlay. ... Read more 》

October 26, 2010

simple code - clang creates 1600x faster executable than gcc

The following program, compiled with clang 1.1, runs 500 times faster than the gcc4.5-compiled code (in both cases with -O2): <span style="color:#008200;">#include <stdio.h></span> <span style="color:#008200;">#define len 1000000000L</span> <span style="color:#830000;">unsigned long</span> <span style="color:#010181;">f</span><span style="color:#000000;">(</span><span style="color:#830000;">unsigned long</span> a<span style="color:#000000;">,</span> <span style="color:#830000;">unsigned long</span> b<span style="color:#000000;">)</span> <span style="color:#010181;">__attribute__</span><span style="color:#000000;">((</span>noinline<span style="color:#000000;">));</span> <span style="color:#830000;">int</span> <span style="color:#010181;">main</span><span style="color:#000000;">()</span> <span style="color:#000000;">{</span> <span style="color:#010181;">printf</span><span style="color:#000000;">(</span><span style="color:#ff0000;">"%lu</span><span style="color:#ff00ff;">\n</span><span style="color:#ff0000;">"</span><span style="color:#000000;">,</span> <span style="color:#010181;">f</span><span style="color:#000000;">(</span><span style="color:#2928ff;">0</span><span style="color:#000000;">,</span> <span style="color:#2928ff;">2</span><span style="color:#000000;">*</span>len<span style="color:#000000;">));</span> <span style="color:#000000;font-weight:bold;">return</span> <span style="color:#2928ff;">0</span><span style="color:#000000;">;</span> <span style="color:#000000;">}</span> <span style="color:#830000;">unsigned long</span> <span style="color:#010181;">f</span><span style="color:#000000;">(</span><span style="color:#830000;">unsigned long</span> a<span style="color:#000000;">,</span> <span style="color:#830000;">unsigned long</span> b<span style="color:#000000;">)</span> <span style="color:#000000;">{</span> <span style="color:#830000;">unsigned long</span> sum <span style="color:#000000;">=</span> <span style="color:#2928ff;">0</span><span style="color:#000000;">;</span> <span style="color:#000000;font-weight:bold;">for</span> <span style="color:#000000;">(;</span> a <span style="color:#000000;"><</span> b<span style="color:#000000;">;</span> a<span style="color:#000000;">++)</span> sum <span style="color:#000000;">+=</span> a<span style="color:#000000;">;</span> <span style="color:#000000;font-weight:bold;">return</span> sum<span style="color:#000000;">;</span> <span style="color:#000000;">}</span> Now, I would be interested to see what’s happening here. ... Read more 》

October 22, 2010

FAIL: Arch Linux switch python executable to Python 3

Today, I got an email from an user of one of my Python scripts asking why the script t does not work on Arch Linux anymore. As it turns out, the Arch Linux team decided to switch /usr/bin/python to Python 3.0 and use python2 for Python 2.X versions. By doing this, they decided to make their distribution incompatible to almost any Python script in the world. Arch Linux’s decision to diverge from the rest of the world that uses python for Python 2. ... Read more 》

October 20, 2010

The Three Levels of Package Management

In today’s Linux distributions, there are usually two to three levels of package management. In this blog post, I will explain the three levels of package management. 1. Local (dpkg, rpm) The first level of package management is the ’local’ level. This level consists of package management tools that install and/or remove packages via package archives such as .deb or .rpm files and a database of the local’s system state. ... Read more 》

Copyright © 2018-2020 Julian Andres Klode, articles licensed under CC BY-SA 4.0.
Comments are provided by Mastodon and copyright of their authors.

This website does not store any personally identifiable information. As part of standard web server access_log logging, it stores requests and the user agents and shortened IP addresses used to make them. It does, however, load some avatars from mastodon.

Powered by Hugo, and the Ernest theme.