OneCDOnly / sherpa

A mini-package-manager for QNAP NAS
GNU General Public License v3.0
115 stars 13 forks source link

bug: don't install IPKs when starting not-installed QPKG #244

Closed OneCDOnly closed 1 year ago

OneCDOnly commented 1 year ago

Example:

dbug: (<<) QPKGs.States.Build|0|734ms 
dbug: (II) ---------------------------------------------------------------------------------------------------- 
dbug: (II)      QPKG:        IsBackedUp: (11) Deluge-server,Deluge-web,Headphones,LazyLibrarian,OMedusa,Mylar3,NZBGet,nzbToMedia,SABnzbd,OSickGear,OTransmission 
dbug: (WW)      QPKG:      IsNtBackedUp: (1) SortMyQPKGs 
dbug: (II)      QPKG:         IsEnabled: (6) Entware,HideThatBanner,Par2,QDK,sherpa,SortMyQPKGs 
dbug: (II)      QPKG:       IsNtEnabled: (1) Headphones 
dbug: (II)      QPKG:         IsStarted: (6) Entware,HideThatBanner,Par2,QDK,sherpa,SortMyQPKGs 
dbug: (II)      QPKG:       IsNtStarted: (1) Headphones 
dbug: (II)      QPKG:              IsOk: (4) Headphones,HideThatBanner,sherpa,SortMyQPKGs 
dbug: (II)      QPKG:         IsUnknown: (3) Entware,Par2,QDK 
dbug: (II) ---------------------------------------------------------------------------------------------------- 
[/share/Public] # ./sherpa.manager.sh stop dependents stop sab hp start sab
sherpa 221228-beta • a mini-package-manager for QNAP NAS

note: ignoring request to stop 'SABnzbd' as it's not installed 
note: ignoring request to stop 'Headphones' as it's already stopped 
proc: downloading & installing 22 IPKs ... 7% (3MB/53MB) ^C^C^C

SABnzbd wasn't installed, won't be installed and can't be started, so there's no-need to install IPKs to support it.

IPK installer checks:

if QPKGs.AcToInstall.Exist "${QPKG_NAME[$index]}" || QPKGs.IsInstalled.Exist "${QPKG_NAME[$index]}" || QPKGs.AcToReinstall.Exist "${QPKG_NAME[$index]}" || QPKGs.AcToStart.Exist "${QPKG_NAME[$index]}"; then

The check for AcToStart should not be an OR with checks for AcToInstall/AcToReinstall/IsInstalled.

OneCDOnly commented 1 year ago

Fixed here: https://github.com/OneCDOnly/sherpa/commit/952d57713cd22d1b2e460f78207cbee5263aef5a