pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

A stupid bash function to check missing dependencies



[was:  Re: How to check which dependencies are missing?}

On Fri, 20 Sep 2019 at 20:51, Ottavio Caruso
<ottavio2006-usenet2012%yahoo.com@localhost> wrote:

> I guess a rudimentary starting point could be this:
>
> check-depends ()
> {
>     for DEP in $(bmake show-depends|cut -f1 -d">");
>     do
>         pkg_info -E $DEP || echo "$DEP:  <NOT INSTALLED>";
>     done
> }
>
>
> $ cd pkgsrc/current/pkgsrc/www/liferea
> $ check-depends
> sqlite3-3.28.0
> glib2-2.60.2nb1
> libpeas:  <NOT INSTALLED>
> gobject-introspection-1.60.1nb1
> gtk3+:  <NOT INSTALLED>
> hicolor-icon-theme-0.17
> desktop-file-utils-0.23nb1
> libnotify:  <NOT INSTALLED>
> gsettings-desktop-schemas:  <NOT INSTALLED>
> libxml2-2.9.9
> libxslt-1.1.33
> webkit-gtk:  <NOT INSTALLED>
> libSM-1.2.3
> json-glib:  <NOT INSTALLED>
>


A slightly better version. This one takes account of package versions:

check-depends() {
        for DEP in  $(bmake show-depends|cut -f1 -d":");
        do
                pkg_info -qE   $DEP && echo $DEP found: $(pkg_info -E   $DEP)\
                        ||  echo "$DEP: not installed";
        done

}

$ cd pkgsrc/current/pkgsrc/www/liferea/
$ check-depends
sqlite3>=3.27.2nb1 found: sqlite3-3.28.0
glib2>=2.34.0 found: glib2-2.60.2nb1
libpeas>=1.20.0nb7: not installed
gobject-introspection>=1.34.0: not installed
gtk3+>=3.24.8nb2: not installed
hicolor-icon-theme>=0.9nb1 found: hicolor-icon-theme-0.17
desktop-file-utils>=0.10nb1 found: desktop-file-utils-0.23nb1
libnotify>=0.7.7nb6: not installed
gsettings-desktop-schemas>=3.4.2: not installed
libxml2>=2.8.0nb2 found: libxml2-2.9.9
libxslt>=1.1.28nb2 found: libxslt-1.1.33
webkit-gtk>=2.26.0: not installed
libSM>=0.99.2 found: libSM-1.2.3
json-glib>=0.14.2nb3: not installed


I'm trying to make it work in sh/dash but it won't.


-- 
Ottavio Caruso


Home | Main Index | Thread Index | Old Index