[Slackbuilds-users] Very simple way of finding dependency

Ythogtha yth at ythogtha.org
Thu Sep 14 08:08:32 UTC 2017


> If you have a git clone of the SBo repository, you could go there and use this
> kind of command line :
> 
> -> Get all SBo packages requiredby a specified package, here is wxGTK3 :
> grep -E "REQUIRE.*wxGTK3" */*/*.info | cut -d. -f1 | rev | cut -d / -f1 | rev
> 
> -> Get all the ones installed on your system :
> for pkg in $(grep -E "REQUIRE.*wxGTK3" */*/*.info | cut -d. -f1 | rev | \
> cut -d / -f1 | rev); \
> do ls /var/log/packages/$pkg-*SBo; done 2>/dev/null
> 
> /var/log/packages/audacity-2.1.3-x86_64-2SBo
> /var/log/packages/codelite-8.1-x86_64-1SBo
> /var/log/packages/filezilla-3.27.1-x86_64-1SBo
> 
> -> Get only the names by adding at the end of the previous one :
>  | rev | cut -d- -f4 | cut -d/ -f1 | rev
I wrote a bug here, it should be "-f4-" and not "-f4":
 | rev | cut -d- -f4- | cut -d/ -f1 | rev
Or else a package like "MySQL-python" would only show "python", which wouldn't
be good...

-- 
Yth <yth at ythogtha.org>


More information about the SlackBuilds-users mailing list