HowTo InstallAptGet

WARNING: You should only do this if you are very comfortable hacking on your 770: screwing this up will disable the application installer at the very least.

The following must be done as root:

ln -s /var/lib/install/var/lib/dpkg /var/lib/dpkg

Now, go into /var/lib/dpkg/status using your favorite text editor and add the following hack:

This assumes that you're using the latest Nokia image, with packages corresponding to the 770 column of http://repository.maemo.org/stable/1.1/package_reference.html; if not, change the version numbers as appropriate.

Package: libc6
Status: install ok installed
Priority: extra
Section: libs
Installed-Size: 0
Maintainer: Unknown
Architecture: arm
Source: libc6
Version: 2.3.2.ds1-12.osso4+str
Depends: maemo
Description: None

Package: libstdc++5
Status: install ok installed
Priority: extra
Section: libs
Installed-Size: 0
Maintainer: Unknown
Architecture: arm
Source: libstdc++5
Version: 1:3.3.3-5
Depends: maemo
Description: None

Package: libgcc1
Status: install ok installed
Priority: extra
Section: libs
Installed-Size: 0
Maintainer: Unknown
Architecture: arm
Source: libgcc1
Version: 1:3.3.3-5
Depends: maemo
Description: None

There are more elegant ways to do this, however, this works: warnings will be thrown but dpkg -i will now function.

Now download http://repository.maemo.org/pool/maemo1.1/free/a/apt/apt_0.5.24osso1_arm.deb to your 770 and run

dpkg -i apt_0.5.24osso1_arm.deb

Finally, edit /etc/apt/sources.list to be:

deb      maemo1.1 free non-free 
deb-src  maemo1.1 free non-free

apt-get is now installed and may be tinkered with, although with dpkg/status crippled, it is of somewhat limited utility.

I am exploring options as far as automatically fixing this and will update with new information as it is available.

UPDATE: After judicious use of apt-get -f install and many many calls to dpkg --ignore-depends=... -i and some other stuff too, I was able to successfully apt-get install bzip2. I will attempt to refine the process later.

UPDATE: Something that apt-get autoinstalled completely broke my system. Whee. It seems that the packages are not equivalent.


Comments

1 . I was thinking of trying something along these lines. It should be possible to produce a more comprehensive status automatically using a Perl script over http://repository.maemo.org/stable/1.1/package_reference.csv -- AndrewFlegg, 08-Feb-06 1 . RE:1 - On one hand yes (and I did try something similar), on the other hand there's quite a bit of package metadata besides the version, such as the file list of each package, that gets stored outside of status and will throw a number of warnings/errors if it's not properly available. I did effectively reinstall most of my system, but all of the package status files are now necessarily accurate :). What I plan to do when I have time is a clean reflash of my system, and then apt-getting to reinstall only packages already installed --- at that point I should be able to release my package status files as a base, and perhaps even a new root flash for the daring. -- AlexanderLash, 09-Feb-06 1 . I have been using a similar trick for some time already to install development tools (sbrshd and gdb) on a normal Nokia 770 image. The only difference is that I copied /var/lib/install/var/lib/dpkg to /var/lib/dpkg/ instead of making a link. This way we get application installer working (installing packages into /var/lib/install/ 'sandbox') and also can use apt-get to install different tools from maemo repository directly to the system. I don't remember well, but I also had to install perl as it looked like apt-get used perl scripts for some packages configuration. I still got some complains about 'apt-utils' not being available, but everything seems to work and I don't care :) -- SergeSemashko