Reply
Thread Tools
Posts: 176 | Thanked: 122 times | Joined on Apr 2010
#1
Hi hall, I think this is a question for TMO, so I try asking here.
I'd like to know if there's a way to list installed packages, grouped by their (eventual) own repository.
I installed a lot of things on my jolla, mainly via WareHouse but also by myself, and a lot of dependencies were installed as well.
Now I'd like to tidy things a bit, leaving only what is really needed.
So the question: can I understand what channel a package belongs to?
Thanks.
 

The Following User Says Thank You to magullo For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#2
afaik you can't get "from" repo package was installed. you only can get "what" repo provide package
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Posts: 176 | Thanked: 122 times | Joined on Apr 2010
#3
Originally Posted by coderus View Post
afaik you can't get "from" repo package was installed. you only can get "what" repo provide package
I looked in pkcon documentation, but could not find how. Which option does give "what"? Is it "what-provides"? It doesn't work...
 

The Following User Says Thank You to magullo For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#4
Originally Posted by magullo View Post
I looked in pkcon documentation, but could not find how. Which option does give "what"? Is it "what-provides"? It doesn't work...
Code:
zypper what-provides <package_name>
or to see only name of repo:
Code:
zypper what-provides <package_name>|tail -1|awk '{print $11}'

Last edited by Schturman; 2014-06-25 at 17:18.
 

The Following 2 Users Say Thank You to Schturman For This Useful Post:
ilpianista's Avatar
Posts: 22 | Thanked: 13 times | Joined on Sep 2010
#5
I made this script to list "foreign" packages (packages that are not in any repository).

Code:
#!/bin/sh

installed=($(pkcon get-packages --filter installed | tail -n +6 | awk '{print $2}'))

for pkg in ${installed[@]}; do
  # <pkgname-version-relversion.arch>
  pkgname=${pkg%-*-*.*}

  echo -n "Looking for ${pkgname}..."
  count=$(pkcon search name ${pkgname} | wc -l)
  if [[ ${count} = 7 ]]; then
    echo " NOT FOUND"
    missing="${missing} ${pkgname}"
  else
    echo " OK"
  fi
done

[[ -n ${missing} ]] && echo "pkcon cannot find these packages: ${missing}"
__________________
SailfishOS app developer
 

The Following 5 Users Say Thank You to ilpianista For This Useful Post:
Reply

Tags
pkcon rpm

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:05.