Kartik Mistry: Just finished




OK, been quiet for a few days, at least on the blog, but in accordance with typical behaviour (for me at least) a quiet blog means a lot of things going on elsewhere. The smallest was a fix for deb-gview - combining a fix for opening files in the current working directory with a fix for the imminent dpkg 1.14.17 which modified the .changes file format a bit. That was relatively easy and I've uploaded 0.2.1 to unstable. gvfs hasn't made testing yet so there's no point in waiting for deb-gview to migrate before 0.2.1.dpkg-buildpackage -a' is usable for nearly all packages once you have dpkg-dev >= 1.14.7. emdebuild >= 1.0.0 is only necessary IF:X-Build-Cross-Libtool: yes' which is my next main target. This is a package-specific problem and each incidence needs a package-specific solution via an appropriate patch. As such, the wrapper is likely to stay in place in emdebuild for some considerable time - at least until someone can rebuild the entire archive with a test that can identify which packages are still affected.
Ah, Erich, that IS so true. I never found a well written PHP application anyway, or it was only 10 lines long.
I guess that's primarily the language fault. It permits to do a lot of stuff and does not simplify, help nor force the simplest implementation methods like MVC which should be the base in Web developement.
Well, take as example what we would do with Python and GTK+ if they were like PHP and HTML (I do not have the API reference so it will be somewhat improvised):
#finally we do not need this module I wrote everything myself
#import somemodule
def main():
# Well we want to do some printing
window = GtkWindow()
# Connect to the database without any abstraction, that sucks
db = mysql.connect()
data = db.query("select RANDOMLYTYPEDDATA from MYONLYTABLE");
while data:
# Ah, we do not have include() so we cannot reuse code
# I'm a PHP developer, I do not know functions
import somestuff
window.print(somestuff.result)
# Obviously, forgot to close db connection, etc.
if form.data.field == "hello":
# The user asked for hello, print hello
window.print("hello")
# debug
print data[0]
if form.data.anotherfield[0] == "morning":
data = db.query("select anotherdata from MYONLYDATA")
else:
sys.exit(42)
label = GtkLabel()
# Yes know we construct the view!
window.add(label)
label.print(data)
That is typical PHP code: we just take randomly typed data from our DB eng... no wait, from MySQL (remember that's LAMP!!! Not LAPP or anything else, bitches!), then we print some HTML code with data, and we do tests on environment, forms, etc, and we get back data, reprint them, do not use functions but include() multiple times thousand of files and then do not close/free anything.
It's so easy to do bad code that lot of people coming from nowhere and who did not learn anything from other languages are doing it.
Another hypothesis coming from my experiment: PHP is a language which can be developed under any OS since it's server-side executed. A link between mostly brain dead "developers" from the Microsoft world and whose from the Free Software world. A clash.
I apologize to some of my coworkers doing better PHP all the day.
This post is both an attempt at replying to a bug against
telepathy-glib, but also an attempt at explaining what
Requires.private do (and don't).
I am using Evolution as my example here, not to pick on Evolution or its
authors in any way, but because it's a convenient example. Currently,
on Ubuntu Hardy, evolution links against 75 different libraries.
Amongst those, we find libz.so.1, libXinerama.so.1 and many more.
I'll go out on a limb here and claim that Evolution does not call any of
the functions in libXinerama directly. Let that be the assumption from
here on.
An obvious question then is, why does evolution link against
libXinerama.so.1 if it doesn't use it? To answer that question, we
need to go back in time to before we had dynamic linking. If you wanted
to build a binary like evolution you had to have 75 -l statements
when you linked and you ended up with the whole code for Xinerama
embedded in your email and calendar client. For various reasons, we
stopped doing that and switched to dynamic linking where the evolution
binary just contains a reference to libXinerama. At some point we
also grew the ability for libraries to contain those references to other
libraries, so you don't have to hunt down all the dependencies of
libfoo when you are linking with it. We also got tools such as
libtool which try to abstract away a lot of the problems of building
on older platforms which don't support inter-library dependencies.
Now, since evolution still doesn't use anything directly in
libXinerama.so.1 but just uses a library which in turn links against
libXinerama.so.1, it shouldn't be linking against it. Then why is it
linked with it? Again, we need to look back at history, and for this
part I am at least partially responsible.
pkg-config was originally written as a replacement for gnome-config
and various other -config utilities. Lots of libraries and
applications now ship .pc files and we have a standardised interface
for querying those files. One of the problems the original authors of
pkg-config faced was the problem of dependencies. They added
dependencies so the authors of gst-python-0.10 could say "We need
pygtk-2.0 too" and so the compilation flags needed for gst-python-0.10
would also include those for pygtk-2.0. Note that I'm using
"compilation flags" loosely here, I am not just talking about CFLAGS.
This did not fix the problem of inflated dependencies. Not at all. I
talked with some of the Debian Release Managers back in 2004/2005 and
we worked out a solution which should help us have correct, uninflated
dependencies since the then-current way of handling dependencies caused
big problems for migrations of packages between unstable and
testing.
The plan was to introduce a new field, Requires.private which would
not show up unless you passed --static to the pkg-config invocation
(since you need all libraries if you are linking statically). This
definition of Requires.private was mostly useless since GNOME and GTK+
have a habit of including each other's headers. To make a long story
short, I changed the semantics so the Cflags field from private
dependencies were included even when not linking statically.
A problem which pkg-config does nothing to guard against in this case
is if you have libfoo.so.2 linking against libbar.so.1 and
libfoo.so.2 exports some of libbar's types in its ABI (and not just as
pointers, but actual structs and such). If libbar's soname is then
bumped to libbar.so.2 and libfoo is rebuilt, libfoo's ABI has changed
without a soname bump. This is bad and will cause problems. If your
application is linked against both libfoo.so.2 and libbar.so.1,
you'll still get problems since libfoo.so.2 then suddenly pulls in
symbols from libbar.so.2. If you used symbol versioning, you would at
least not get symbol conflicts and your application would continue to
work, but you would have a spurious dependency and the package
containing libbar.so.1 would be kept around until your application was
recompiled.
With this background, you might ask the question why we still have
Requires since it is seemingly useless. For C, it is useless in all
but the most special cases, just use Requires.private instead (and its
sibling Libs.private). Other languages have different semantics.
Some people use .pc files for other purposes such as
gnome-screensaver having variables defining where themes and
screensavers go.
Hopefully this blog post has explained a bit about why we have
Requires.private and what the difference between this and their
regular counterpart is. If there's anything unclear, please do not
hesitate to contact me.






Growing up for the most part in the 1980’s, Saturday Night Live was the funniest regularly scheduled part of my week. It’s either gotten less funny over the years, or I’ve changed. Probably both.
One of the biggest problems SNL faces is that it must fill ninety minutes every week, although these days if you subtract out ads, music, and other filler/transitional material, I expect it’s only thirty to forty minutes of actual comedy. Either way, a lot of SNL skits go on longer than necessary to deliver their comic payload. I expect this was actually true in the 1980’s as well, but I didn’t notice it so much.
Enter The Onion and its video content. Freed from the confines of the television programming schedule, the Onion can make its online video clips just exactly as long as the writers want, and release them on their own schedule. In recent months, they’ve been batting in the high 800s. E.g., Diebold Accidentally Leaks Results of 2008 Election Early (on a serious note, see Ed Felten’s recent Sequoia discovery and followup); Army Holds Annual ‘Bring Your Daughter to War’ Day. Or any of them, really.

I was recently forced to face once more the limitations and quirks of rpm. This is more painful, when looking at a more capable system like .deb.Next.