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

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

Reply #15
Of course there is. First read this, then the pacman manpage on the -Q (query) operation. Finally, 'pacman -Qh' will show you how to list explicitly installed / as dependencies packages separately.

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

Reply #16
...
 Finally, 'pacman -Qh' will show you how to list explicitly installed / as dependencies packages separately.


ok misunderstood the command it is "pacman -Qd "

Regards

Carlo D.

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

Reply #17
Hello, after some studying I'm returning on this topic.

I've created this script, that will try to create  a tbi-ad-list.txt hopefully ready to be installed substituing packages in extra with those in world.


I have made some intermediate lists, to check better the workflow.


Code: [Select]
#!/bin/bash

sudo LC_ALL=C | pacman -Qd | cut -d" " -f1 >> asdeps-list.txt

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

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

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

awk 'NR==FNR{arr[$0];next} $0 in arr' asdeps-list.txt extra-inst.txt >> tobe-inst-asdeps.txt

awk '{print "world/" $0}' tobe-inst-asdeps.txt >> tbi-ad-list.txt


Now the problem is how to make things happens.

First of all is this correct?

or first I have to create and install a list of the other packages (those non installed as deps) or doing what?


TIA and Regards.

Carlo D.



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

Reply #18
Use 'export LC_ALL=C' once; use -Qq to suppress version info and drop cut(1); pacman query operations don't need sudo(1).

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

Reply #19
Use 'export LC_ALL=C' once; use -Qq to suppress version info and drop cut(1); pacman query operations don't need sudo(1).

Some modifications done to the script according to your post.

Code: [Select]
#!/bin/bash

export LC_ALL=C

mkdir ./workfiles

pacman -Qq >> ./workfiles/asdeps-list.txt

pacman -Sl extra | grep installed | cut -d" " -f2 >> ./workfiles/extra-inst.txt

pacman -Sl world | grep installed | cut -d" " -f2 >> ./workfiles/world-inst.txt

pacman -Sl world | cut -d" " -f2 >> ./workfiles/world-allpkgs.txt

awk 'NR==FNR{arr[$0];next} $0 in arr' ./workfiles/asdeps-list.txt ./workfiles/extra-inst.txt >> ./workfiles/tobe-inst-asdeps.txt

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




Now the problem are:

- How to obtain the list of packages installed not "asdeps"
- How are the correct commands to use pacman-list.txt (that is created as list of world/xxxx ) to substitute packages installed from extra
- What is the correct order to avoid problems, fisrt the asdeps-list and then the other list or...

TIA and Regards

Carlo D.