Sunday, June 5, 2022
HomeOperating SystemFind out how to set up a bunch of debs

Find out how to set up a bunch of debs


Not too long ago, I wanted to test if a regression in Ubuntu 22.04 Beta was triggered by the mesa improve. Okay, sounds easy, let me simply set up the older mesa model.

Let’s have a look.

Oh, wow, there are about 24 binary packages (excluding the packages for debug symbols) included in mesa!

As a result of it’s not printed in Ubuntu 22.04, we will’t use our regular apt method to set up these packages. And downloading these one after the other after which putting in them seems like an excessive amount of work.

Step Zero: Stipulations

In case you are an Ubuntu (or Debian!) developer, you would possibly have already got ubuntu-dev-tools put in. If not, it has some actually helpful instruments!

$ sudo apt set up ubuntu-dev-tools

Step One: Create a Non permanent Working Listing

Let’s create a brief listing to carry our deb packages. We don’t need to get them combined up with different issues.

$ mkdir mesa-downgrade; cd mesa-downgrade

Step Two: Obtain All of the Issues

One of many helpful instruments is pull-lp-debs. The primary argument is the supply bundle identify. On this case, I subsequent have to specify what model I need; in any other case it would give me the most recent model which isn’t useful. I may specify a sequence codename like jammy or impish however that received’t give me what I need this time.

$ pull-lp-debs mesa 21.3.5-1ubuntu2

By the best way, there are a number of different variations on pull-lp-debs:

  • pull-lp-source – downloads supply bundle from Launchpad.
  • pull-lp-debs – downloads debs bundle(s) from Launchpad.
  • pull-lp-ddebs – downloads dbgsym/ddebs bundle(s) from Launchpad.
  • pull-lp-udebs – downloads udebs bundle(s) from Launchpad.
  • pull-debian-* – similar as pull-lp-* however for Debian packages.

I take advantage of the LP and Debian supply variations steadily once I simply need to test one thing in a bundle however don’t want the total git repo.

Step Three: Set up Solely What We Want

This command permits us to put in simply what we want.

$ sudo apt set up --only-upgrade --mark-auto ./*.deb

--only-upgrade tells apt to solely set up packages which might be already put in. I don’t really want all 24 packages put in; I simply need to change the variations for the stuff I have already got.

--mark-auto tells apt to maintain these packages marked in dpkg as robotically put in. This permits any of those packages to be instructed for elimination as soon as there isn’t anything relying on them. That’s helpful in case you don’t need to have previous libraries put in in your system in case you do handbook set up like this steadily.

Lastly, the apt set up syntax has a quirk: It wants a path to a file as a result of it needs a straightforward method to distinguish from a bundle identify. So including ./ earlier than filenames works.

I suppose this can be a bug. apt ought to be taught that libegl-mesa0_21.3.5-1ubuntu2_amd64.deb is a file identify not a bundle identify.

Step 4: Cleanup

Let’s assume that you simply put in previous variations. To get again to the present bundle variations, you may simply improve like regular.

When you do need to keep on this unsupported model a bit longer, you may specify which packages to carry:

And you need to use apt-mark checklist and apt-mark unhold to see what packages you will have held and launch the holds. Keep in mind you received’t get safety updates or different bug fixes for held packages!

And while you’re performed with the debs we obtain, you may take away all of the recordsdata:

$ cd .. ; rm -ri mesa-downgrade

Bonus: Downgrading again to supported

What in case you did the alternative and put in newer stuff than is accessible in your present launch? Maybe you put in from jammy-proposed and also you need to get again to jammy ? Right here’s the syntax for libegl-mesa0

Be aware the /jammy suffix on the bundle identify.

$ sudo apt set up libegl-mesa0/jammy

However how do you discover these packages? Use apt checklist

Right here’s one instructed method to discover them:

$ apt checklist --installed --all-versions| grep native] --after-context 1

Lastly, I ought to point out that apt is designed to improve packages not downgrade them. You may break issues by downgrading. As an example, a database may improve its format to a brand new model however I wouldn’t anticipate it to have the ability to reverse that simply since you try to put in an older model.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments