Skip to main content
Topic: Substitute packages installed from arch repositories with artix ones. (Read 1142 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Substitute packages installed from arch repositories with artix ones.

Hello, I have a problem, sometimes package broke, as some of my packages were installed from Arch Linux repo.

There is a way to find from where an installed package come from?

or better there is way to list packages installed from a specific repo? In this case arch linux ones.


EDIT: found:

Code: [Select]
paclist world
paclist extra
paclist community

will do the job, now the problem is how to substitute packages installed from these repo or better find what package will make artix linux load them from arch linux repo

Regards

Carlo D.

 

Re: Check what package are installed from arch linux repositories

Reply #1
Hello,

I think this is not possible with pacman alone.

But where is the will, there is a way.
You can list the packages from the remote repositories (e,g. arch/extra) and check which packages are installed.
Than check the package info (pacman -Qi <my-package>) and check for "Packager" field e.g.
Packager        : Artix Build Bot <jenkins < aa tt > artixlinux.org>

This can work because Artix packages are built on a server and Arch ones are on the machines of packagers (I guess here). Anyway Arch packages have wide variety of "Packager"s.

When you combine it in some script (or you can try to oneline it somehow...) you should be able to get the results you seek.

PS: there might be a better interface to pacman database (libalpm). You may try to check some GUI like Octopi, Pamac or the console tools in "pacutils" or "pacman-contrib" or  "expac" package

Re: Substitute packages installed from arch repositories with artix ones.

Reply #2


Thanks partially solved.

I've modified title of my first post, to better reflect the problem:


How to substitue packages installed from arch linu repo with those supplied by artix.

This implies to find if there are some packages that block the update.

As example I have found that zathura is supplied by artix, but it seems that zathura-pdf-poppler is not.


Regards

Carlo D.



Re: Substitute packages installed from arch repositories with artix ones.

Reply #4
In the migration guide, we went with brute force approach and made it reinstall everything.
https://wiki.artixlinux.org/Main/Migration#ReInstall_packages_from_Artix_repositories


Under: ReInstall packages from Artix repositories

Code: [Select]
 pacman -Sl system | grep installed | cut -d" " -f2 | pacman -S -
 pacman -Sl world | grep installed | cut -d" " -f2 | pacman -S -
 pacman -Sl galaxy | grep installed | cut -d" " -f2 | pacman -S -

but these lines seems to be not correct.

world is an artixlinux package, and even galaxy, according to:

https://wiki.artixlinux.org/Main/Repositories

so probably:

Code: [Select]
pacman -Sl extra | grep installed | cut -d" " -f2 | pacman -S -

seems a more correct solution

Regards

Carlo D.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #5
The wiki is correct since we can only reinstall packages for which we have a replacement in Artix repositories.
It is useless to reinstall packages FROM Arch repos by packages FROM Arch repos again.

You might need to combine it in some script.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #6
Ok I have found  a way to grep what is installed in extra:

Code: [Select]
pacman -Sl extra | grep installed  | cut -d" " -f2   >> installed-extra.txt


this is giving  me a list:


Code: [Select]
a52dec
aalib
abseil-cpp
....

and then process this list to find out what could be supplied by world and what not:

I have this file, do you have some hints, to find out what is supplied and what is not present in world?

Regards

Carlo D.


Re: Substitute packages installed from arch repositories with artix ones.

Reply #7
like compare 2 lists and select the matching lines?
Maybe by using uniq tool ?

Re: Substitute packages installed from arch repositories with artix ones.

Reply #8
how to obtain the list of packages supplied by "world" regardless if they are installed or not?


Re: Substitute packages installed from arch repositories with artix ones.

Reply #9
pacman -Sl world

Re: Substitute packages installed from arch repositories with artix ones.

Reply #10


Update:


I have made this script that probably is doing what I want.

Code: [Select]
#!/bin/bash


sudo LC_ALL=C | pacman -Sl extra | grep installed | cut -d" " -f2 >> installed-extra.txt

#sudo LC_ALL=C | pacman -Sl world | grep installed | cut -d" " -f2 >> installed-world.txt

sudo LC_ALL=C | pacman -Sl world | cut -d" " -f2 >> world-allpkgs.txt

awk 'NR==FNR{arr[$0];next} $0 in arr' installed-extra.txt world-allpkgs.txt  >> tobe-installed.txt

awk '{print "world/" $0}' tobe-installed.txt >> pacman-list.txt


It will produce "pacman-list"  with packages installed in extra that are present in world, prefixed with "world/" as follow:


Code: [Select]
world/a52dec
world/aalib
world/abseil-cpp


I have to feed to to pacman this list to be installed, but I have to specify that they have to be reinstalled


I have found this command on Arch Linux Wiki:

Code: [Select]
pacman -S --needed - < pkglist.txt

Will it perform the desired action? Ie it will install packages from world reinstalling them on top of  the extra one?

or I have to add some other options?

TIA and Regards


Carlo D.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #11
Code: [Select]
pacman -S --needed - < pkglist.txt
Will it perform the desired action? Ie it will install packages from world reinstalling them on top of  the extra one?
The '--needed' option won't re-install already installed packages, no matter which repo they were taken from. You need to omit it. Also, that command will explicitly re-install the packages listed, which is not what you want; most are installed as dependencies.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #12
The '--needed' option won't re-install already installed packages, no matter which repo they were taken from. You need to omit it. Also, that command will explicitly re-install the packages listed, which is not what you want; most are installed as dependencies.

Thanks for answering.

I have to delete the --needed and what else?

My goal is to get rid of things installed from Arch Linux extra (and other repository" and to find what packages are lacking from my current installation of Artix.

In the time I have installed some development libraries so it is difficult to track what is needed and what is not.

My fault, but if I could amend my current installation using packages from Artix, I will try to see what is left from Arch Linux and search in a more restricted list of packages.

Regards

Carlo D.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #13
Let's say you want to install pkg1: pacman -S pkg1
This may pull 3 dependencies of pkg1: dep1, dep2, dep3. The latter will be marked as dependencies ("Install Reason" in pacman -Qi), while the former as "explicitly installed". This may seem trivial, but when try to uninstall pkg1, you can instruct pacman to also uninstall its dependencies to save space. If you re-install all packages listed in pkglist without --asdeps, this information will be lost and you won't be able to uninstall unneeded packages in one go, i.e. you'll have to find the deps yourself which is very time-consuming.
So, you must split your package list into 2: pkglist-explicit and pkglist-deps and install the second with --asdeps.

Re: Substitute packages installed from arch repositories with artix ones.

Reply #14

So there is not a viable way to substitute packages pulled from "Arch extra" with packages pulled from "Artix world"?


You speak about of creating two lists, there is an automated way to do so?

TIA and Regards

Carlo D.