Jump to content
Ketarin forum
  • Announcements

g00p3k

Update & Install Doesn't Recognize "Check for Updates Only" was run without actual download

Recommended Posts

If I run "check for updates only" without downloading to review the number of changes, and then proceed with update and install on entries that show update available, it doesn't actually download the entry and then install. It seems this "check for updates only" is updating the version or other status flag so the update isn't recognized as still needing to be downloaded. 

Share this post


Link to post
Share on other sites

I have a similar problem with the portable version of Ketarin and it is reproducible.

'Check all for updates only, do not download' on computer A and download new version manually. Connect your thumb drive / external HD to computer B and re-run 'Check all for updates only, do not download'. It shows all the previous downloaded applications as Update available'. Trying to download them again manually ends in status 'No update'. If I re-run 'Check all for updates only, do not download' again right after the first run and there is a new update for another application, the same happens to me as you described above. Trying to download the found update ends in status 'No update' but it shows the new version number.

 

Oh and at the first run of Ketarin on the next computer, Ketarin does not delete the previously downloaded files. It keeps the last version. If I re-run the update/download a second time on the same computer the 'Always delete previously downloaded file' option works fine.

 

Another weird behavior is the missing/disabled 'Open folder' context menu for random application entry. After each update check a different application is affected.

context-menu14adq.jpg

Share this post


Link to post
Share on other sites

@g00p3k: This is commonly because the version tracking information has changed (advanced, "use this variable as indicator for changes") but the actual download URL is either the same file, invalid or otherwise broken. This happens in some situations I've seen where the URL pattern is suddenly different, or the URL itself wasn't changed on the release page, even though they updated the version information.

 

@Necrox: Ketarin tracks the previous downloads based on it's **full path**, including drive letter, as well as other properties. If you are running Ketarin on a different device and want it to persist settings to be able to remove previous versions, it's important that the FULL PATH to your Ketarin installation and file cache be exactly the same. For this reason I personally use "K:\_Ketarin" as the root for all my Ketarin-related stuff, including the file cache. On alternate devices you can use diskpart or Disk Management to change the drive letter of your USB / removable drive, or map the shared drive using your preferred letter and name. Just make sure you're consistent above all else.

 

You can use a batch stub to load Ketarin and if the current path isn't correct, warn and/or exit. 

 

if /i not "%~dp0"=="k:\_ketarin" goto warning

Share this post


Link to post
Share on other sites

You can also get around the path issue by copying the entire library, find/replace the root path of your old path to your current location, then purge your Ketarin database and paste back in the results. This is ugly, but it does work.

Share this post


Link to post
Share on other sites

My solution for the moment:

 

start.bat (creates a temp file on the system drive to start ketarin with the new, pre-defined drive letter)

@ECHO OFF
CLS
ECHO.


REM BatchGotAdmin by Evan / EneergE: https://sites.google.com/site/eneerge/scripts/batchgotadmin
:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
    pushd "%CD%"
    CD /D "%~dp0"
    ECHO Administrative rights granted.
:--------------------------------------

cd /d %~dp0

set driveletter=P
set ketarinstarter=%SYSTEMDRIVE%\ketarin.bat
set ketarinpath=%driveletter%:\KETARIN\ketarin_fulldb.bat

echo select volume %cd:~0,1% > selectdrive.txt
echo assign letter=%driveletter% noerr >> selectdrive.txt

echo PING -n 5 localhost > NUL > %ketarinstarter%
echo %ketarinpath% >> %ketarinstarter%

START "" %ketarinstarter%

chcp 850>nul

diskpart /s selectdrive.txt

chcp 1252>nul

ketarin_fulldb.bat (opens ketarin with the pre-defined drive letter)

@ECHO OFF

set ketarinstarter=%SYSTEMDRIVE%\ketarin.bat

cd /d %~dp0

SET CURHOUR=%CURHOUR: =0%
set year=%date:~6,4%
set yr=%date:~8,2%
set month=%date:~3,2%
set day=%date:~0,2%
set hour=%time:~0,2%
set hour=%hour: =0%
set min=%time:~3,2%
set sec=%time:~6,2%

ECHO .
ECHO STARTING KETARIN...
START ketarin.exe /database=all.db /export=Backup\all-%year%-%month%-%day%_%hour%%min%%sec%.xml
PING -n 5 localhost > NUL
START ketarin.exe /database=all.db /log=Logs\log-%year%-%month%-%day%_%hour%%min%%sec%.log
PING -n 5 localhost > NUL
REN all.db_*.bak all.db_%year%-%month%-%day%_%hour%%min%%sec%.bak
MOVE /Y all.db_*.bak Backup

del /s selectdrive.txt
del /s %ketarinstarter%

START "" ".\Downloads"

EXIT

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×