PDA

View Full Version : Installed-Size option in the debian packages



Paretje
July 9th, 2008, 03:42 PM
Look, this is the control file of the firefox-package in Ubuntu:

Package: firefox
Source: firefox-3.0
Version: 3.0~b5+nobinonly-0ubuntu3
Architecture: all
Maintainer: Alexander Sack <asac@ubuntu.com>
Installed-Size: 120
Depends: firefox-3.0
Section: web
Priority: optional
Description: meta package for the popular mozilla web browser
Firefox 3 is the next major release of the standalone Mozilla browser; it is
written in the XUL language and designed to be lightweight and cross-platform.
.
This browser was previously known as Firefox 2, Firebird and Phoenix.
.
This is a meta package that will point to the latest firefox package in ubuntu.
Don't remove this if you want to receive automatic major version upgrades for
this package in future.

Everything is clear, except one thing: Installed-Size. What do I have to fill in there exactly AND how can I get that.

Paretje
July 24th, 2008, 05:51 PM
Nobody?

bobbocanfly
July 24th, 2008, 05:58 PM
You will want to ask the Maintainer Alexander Sack on IRC about it probably, he will be able to tell you.

He idles in #ubuntu-mozilla-team (or something similar) and has the nickname 'asac'.

Paretje
July 24th, 2008, 06:01 PM
Well, in fact this is only an example of a package. I want to make a package, but I don't know what I have to enter for that.

maybeway36
August 18th, 2008, 08:44 PM
Installed-Size is the total size in kilobytes of all the files in the package.
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Installed-Size

Paretje
August 18th, 2008, 10:18 PM
Is there a commad to get that information?

maybeway36
August 19th, 2008, 05:27 PM
To be honest, I'm not sure. I usually just open Konqueror, right-click, and look at the properties. That might not be totally accurate, though.

Paretje
August 19th, 2008, 05:30 PM
With Konquerror you get that information? Under nautilus, it's the shortest notation, which means for example 9,4MB

spikyjt
August 21st, 2008, 04:52 PM
On the command line:

du -sx --exclude DEBIAN package-dirname
(where package-dirname is the name of the folder your package files are in)

I am currently writing a script to easily automate the process of creating deb packages as it seems to be a bit of an art form! Of course if anyone knows of a suitable tool that's already about I'd be most interested. I could only find stuff for building source packages. If you're interested in my script, I can post it when I have completed it. I will also release a package of it, when I have written the GUI.

Paretje
August 21st, 2008, 08:59 PM
Yes, that's it.

When I unpack the simutrans-pak64 package and use that commando, I get this:


kevin@kevin-desktop:~$ du -sx --exclude DEBIAN /home/kevin/Desktop/Documenten/Simutrans/100.0/simutrans-pak64_100.0-1_all
11844 /home/kevin/Desktop/Documenten/Simutrans/100.0/simutrans-pak64_100.0-1_all


When I look to the value said in the package, it's 11836. A diffrence of 8. I think that acceptable.

Or have you a comment that explains why I have a difrrence?

Anyway: Thanks ;)

dribeas
August 21st, 2008, 11:02 PM
Or have you a comment that explains why I have a difrrence?

du outputs the used size in the disk, not the sum of the sizes of the files. It includes the directory where you ask it to compute the size, which will not be part of the tar...



$ mkdir test
$ du -sx test
4 test


Note that directories take 4K in my system but may be different in your case, you can test it with:



$ ls -ld test
drwxr-xr-x 2 dibeas dibeas 4096 2008-08-21 23:58 test


In my case du will always sum 4K extra.

Paretje
August 21st, 2008, 11:55 PM
I have indeed in the first one 2 and with the second one 4.

You mean the installed size is without the directories then? Or is it just because they counted not from the root, but from it realy starts (more then just one directory, but two.

It's because when I start from /usr/share, where you have doc and games (two, not just one). I have 11836, just like said in the file.

Is that the real method to do? Not counting the directories which just contains just one follow directory? Or it doesn't matter?