4

I have downloaded a Debian package lxde, together with all its dependencies:

apt-get install --no-install-recommends lxde --download-only

So now, I have all packages in my /var/cache/apt/archives. I have made modifications to one package lxde_4+nmu1_all.deb (removed galculator from dependencies) and now I would like to install lxde from my modified package (i.e. with the modified dependencies). dpkg -i lxde_4+nmu1_all.deb does not work, because of unmet dependencies.

How can I tell apt-get to install my modified package /var/cache/apt/archives/lxde_4+nmu1_all.deb ?

4
  • 2
    Create a repo of your own, give it a higher version number (and/or a higher pin) and verify with apt-cache policy lxde that your version is now preferred.
    – tripleee
    Commented May 30, 2013 at 14:59
  • that would be an elegant solution. How would I create my own repo, by the way? Is it just the path to the files, i.e. /var/cache/apt/archives ? Commented May 30, 2013 at 16:43
  • No, it's somewhat more complex than that. You will need at least a Packages file (see dpkg-scanpackages) and these days probably a signing key.
    – tripleee
    Commented May 30, 2013 at 17:00
  • Why not just go ahead and install the dependencies first? they are listed in apt-cache show for example. Commented May 30, 2013 at 17:46

2 Answers 2

1

You can make your own repository with reprepro (tutorials 1 2 …).

If all you want to do is avoid installing galculator, an easier method is to make a fake galculator package with equivs. Then you can install lxde normally.

1

After installing the package via dpkg --force-depends, you can install the dependencies and complete installation with apt-get install -f. This will only work in the case of "Depends". If a package is a "Pre-Depend", it must be installed prior to using dpkg -i.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .