A new method for calculating superseded updates

A new method for calculating superseded updates

Postby hbuhrmester » 30.11.2016, 10:09

A new method for calculating superseded updates

I like to suggest a new method for calculating superseded updates. It offers two improvements over the existing solution:
  • Superseded updates are downloaded again, if their superseding updates are excluded from download.
  • A list of excluded UpdateIds is generated from a list of excluded kb numbers.

Handling of superseding and superseded updates

With the existing method, superseding updates are always treated as "superseding", even if they are excluded from download. Superseded updates are never downloaded automatically, but must be added to the file ExcludeList-superseded-exclude.txt instead.

But superseding updates, which are excluded from download, can not possibly replace other downloads. Superseded updates should be recovered and downloaded again, if their superseding update is excluded from download.

This is actually an old problem for users, who still need updates for Windows XP: There are still new updates for the embedded Windows XP POSReady 2009. These updates can't be used for regular versions like Windows XP Professional. Still, the new updates supersede older updates, which are not downloaded anymore. Existing downloads may even get deleted, although they are still needed for Windows XP Home Edition or Windows XP Professional.

This problem becomes more evident with the update rollups for Windows 7. Here the monthly "quality update rollup" supersedes the "security-only update rollup", although both are released on the same day. The quality update can be excluded from download, but then the security-only update is still excluded as well, since it is still treated as a superseded update.

The new method addresses this problem like this:
  1. It starts with a initial black list, which is created from the files:
    Code: Select all
    ..\exclude\ExcludeListForce-all.txt
    ..\exclude\custom\ExcludeListForce-all.txt

    These files should contain kb numbers only.
  2. The excluded kb numbers are traced back to the FileIds.
  3. The excluded FileIds are traced back to the parent bundle RevisionIds.
  4. The excluded bundle RevisionIds are traced back to the corresponding UpdateIds. The excluded UpdateIds are exported to a file
    Code: Select all
    ..\client\exclude\ExcludedUpdateIds-unique.txt

  5. The excluded bundle RevisionIds are removed from the list of all existing bundle RevisionIds.
  6. The calculation of superseded updates then proceeds as depicted in viewtopic.php?f=5&t=5676 .

Handling of UpdateIds

The file
Code: Select all
..\client\exclude\ExcludedUpdateIds-unique.txt
might be used to automatically hide excluded Updates during installation, possibly with a script as suggested by Dalai in viewtopic.php?f=4&t=5138&start=70#p20852 .

If a superseding update is hidden, then the superseded updates will be requested for installation instead. For Windows 7 the security-only update rollups would be installed in place of the full quality update rollup.

Summary

With the current implementation, the full quality update rollups for Windows 7 are installed by default. It takes up to four steps to install the security-only update rollups instead, either on the server ( viewtopic.php?f=2&t=6072#p20850 ) or by local customization of the settings files ( viewtopic.php?f=2&t=6072&start=10#p21004 ).

The new implementation should make the handling of the Windows 7 update rollups somewhat easier:
  • The file
    Code: Select all
    ..\exclude\custom\ExcludeListForce-all.txt
    must still be maintained manually. It should contain the kb numbers of the full quality update rollups. This is actually the main problem, since we don't know these kb numbers in advance.
  • Superseded updates are automatically recovered, if superseding updates are excluded. It should not be necessary anymore to add these updates to the file ExcludeList-superseded-exclude.txt. For Windows 7, the security-only update rollups are downloaded in place of the full quality update rollup.
  • Excluded UpdateIds could be automatically hidden from installation (but this must be implemented first).
  • Superseded Updates are automatically installed if their superseding update is hidden. This is built-in to the Windows Update client and does not need any changes to the installation script.

Initial results

For testing, I added the kb numbers of the October and November Quality Update Rollups for Windows 7 to the file ..\exclude\custom\ExcludeListForce-all.txt:
Code: Select all
kb3185330
kb3197868


Then nine new updates were downloaded for w61-x86, including the security-only updates for October and November:
Code: Select all
28.11.2016 13:22:33,08 - Info: Determined superseded updates
28.11.2016 13:22:33,33 - Info: Determined static update urls for w61 glb
28.11.2016 13:23:43,93 - Info: Determined dynamic update urls for w61 glb
28.11.2016 13:23:49,75 - Info: Downloaded/validated 21 statically defined updates for w61 glb
2016-11-28 13:23:52 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2013/10/windows6.1-kb2868626-x86_dcac1e43ba19ba91f11cd942bc92b67176e280a2.cab [1201507/1201507] -> "../client/w61/glb/windows6.1-kb2868626-x86_dcac1e43ba19ba91f11cd942bc92b67176e280a2.cab" [1]
2016-11-28 13:24:26 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2016/02/windows6.1-kb3138962-x86_0388f60701e2570c67647bc972590cbe33c8ade4.cab [12201082/12201082] -> "../client/w61/glb/windows6.1-kb3138962-x86_0388f60701e2570c67647bc972590cbe33c8ade4.cab" [1]
2016-11-28 13:26:28 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2016/11/windows6.1-kb3197867-x86_af2d630018e9f8d8ec83855346ad4c1880de3614.cab [54992714/54992714] -> "../client/w61/glb/windows6.1-kb3197867-x86_af2d630018e9f8d8ec83855346ad4c1880de3614.cab" [1]
2016-11-28 13:26:31 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2014/10/windows6.1-kb3005607-x86_a4cc4f93b27ede3bfdbbe428cb3466ab1f652ce8.cab [867435/867435] -> "../client/w61/glb/windows6.1-kb3005607-x86_a4cc4f93b27ede3bfdbbe428cb3466ab1f652ce8.cab" [1]
2016-11-28 13:27:28 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2015/02/windows6.1-kb3033929-x86_9943ff29461e03a10af55ccd007f9803e0dd3d0e.cab [27555763/27555763] -> "../client/w61/glb/windows6.1-kb3033929-x86_9943ff29461e03a10af55ccd007f9803e0dd3d0e.cab" [1]
2016-11-28 13:27:29 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2015/07/windows6.1-kb3076949-x86_04780a3bd2d40a15a1a97b331c61f6017c49c8bf.cab [180211/180211] -> "../client/w61/glb/windows6.1-kb3076949-x86_04780a3bd2d40a15a1a97b331c61f6017c49c8bf.cab" [1]
2016-11-28 13:27:36 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/06/windows6.1-kb3168965-x86_4827033eef3d7657177ef99c0ebaaa3138893a51.cab [2271891/2271891] -> "../client/w61/glb/windows6.1-kb3168965-x86_4827033eef3d7657177ef99c0ebaaa3138893a51.cab" [1]
2016-11-28 13:28:54 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/10/windows6.1-kb3192391-x86_eb57ab91f0f988e87e34e06f2f5f4a92181daef9.cab [47098272/47098272] -> "../client/w61/glb/windows6.1-kb3192391-x86_eb57ab91f0f988e87e34e06f2f5f4a92181daef9.cab" [1]
2016-11-28 13:28:57 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/05/windows6.1-kb2544893-x86_fe24e7c2caae32c3a4b8dca345291fa3e5dbc492.cab [423175/423175] -> "../client/w61/glb/windows6.1-kb2544893-x86_fe24e7c2caae32c3a4b8dca345291fa3e5dbc492.cab" [1]
28.11.2016 13:29:00,25 - Info: Downloaded/validated 197 dynamically determined updates for w61 glb
28.11.2016 13:29:00,29 - Info: Deleted ..\client\w61\glb\windows6.1-kb3197868-x86_8ebbf64ca6b6ab58cc27be618e7b31168d5346ca.cab
28.11.2016 13:29:16,14 - Info: Cleaned up client directory for w61 glb


For w61-x64, there were 11 new updates:
Code: Select all
28.11.2016 14:04:40,64 - Info: Determined superseded updates
28.11.2016 14:04:40,87 - Info: Determined static update urls for w61-x64 glb
28.11.2016 14:05:53,60 - Info: Determined dynamic update urls for w61-x64 glb
28.11.2016 14:06:00,47 - Info: Downloaded/validated 22 statically defined updates for w61-x64 glb
2016-11-28 14:06:06 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2013/10/windows6.1-kb2868626-x64_3b34d4c8e2c29a394ad3c536549347c37adfa734.cab [2037431/2037431] -> "../client/w61-x64/glb/windows6.1-kb2868626-x64_3b34d4c8e2c29a394ad3c536549347c37adfa734.cab" [1]
2016-11-28 14:07:28 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2015/02/windows6.1-kb3033929-x64_5b2988b4619138769d347e12aec350c2cf4db4cd.cab [45796115/45796115] -> "../client/w61-x64/glb/windows6.1-kb3033929-x64_5b2988b4619138769d347e12aec350c2cf4db4cd.cab" [1]
2016-11-28 14:07:58 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2016/02/windows6.1-kb3138962-x64_ffeef5bfb9d8cef2870d3d6874ef5ffcd7416222.cab [16265332/16265332] -> "../client/w61-x64/glb/windows6.1-kb3138962-x64_ffeef5bfb9d8cef2870d3d6874ef5ffcd7416222.cab" [1]
2016-11-28 14:10:40 URL:http://download.windowsupdate.com/c/msdownload/update/software/secu/2016/11/windows6.1-kb3197867-x64_8979d5bdbbd52b9dc1ad5dd644442092975fbf41.cab [92295089/92295089] -> "../client/w61-x64/glb/windows6.1-kb3197867-x64_8979d5bdbbd52b9dc1ad5dd644442092975fbf41.cab" [1]
2016-11-28 14:10:45 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2014/10/windows6.1-kb3005607-x64_cd3779850521fa10a0a8b72890aad4840af70dd3.cab [1363923/1363923] -> "../client/w61-x64/glb/windows6.1-kb3005607-x64_cd3779850521fa10a0a8b72890aad4840af70dd3.cab" [1]
2016-11-28 14:10:47 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2015/07/windows6.1-kb3076949-x64_0a58cffb033470caf3115e3719344ec6eb90c62a.cab [373231/373231] -> "../client/w61-x64/glb/windows6.1-kb3076949-x64_0a58cffb033470caf3115e3719344ec6eb90c62a.cab" [1]
2016-11-28 14:10:54 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/06/windows6.1-kb3168965-x64_decc33513703e6ba86db76c095a16e774bad6abd.cab [2644101/2644101] -> "../client/w61-x64/glb/windows6.1-kb3168965-x64_decc33513703e6ba86db76c095a16e774bad6abd.cab" [1]
2016-11-28 14:13:30 URL:http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/10/windows6.1-kb3192391-x64_46ff895c96395a951e39305e226694d0702d6a76.cab [82989243/82989243] -> "../client/w61-x64/glb/windows6.1-kb3192391-x64_46ff895c96395a951e39305e226694d0702d6a76.cab" [1]
2016-11-28 14:13:34 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/05/windows6.1-kb2544893-x64_21bb7cf8af8571e12267e165c4687429dc966544.cab [850170/850170] -> "../client/w61-x64/glb/windows6.1-kb2544893-x64_21bb7cf8af8571e12267e165c4687429dc966544.cab" [1]
2016-11-28 14:13:41 URL:http://download.windowsupdate.com/msdownload/update/software/secu/2011/11/windows6.1-kb2631813-x64_626b002a3957fdf3e7512331efa1a8987519f6db.cab [1818135/1818135] -> "../client/w61-x64/glb/windows6.1-kb2631813-x64_626b002a3957fdf3e7512331efa1a8987519f6db.cab" [1]
28.11.2016 14:13:45,09 - Info: Downloaded/validated 211 dynamically determined updates for w61-x64 glb
28.11.2016 14:13:45,18 - Info: Deleted ..\client\w61-x64\glb\windows6.1-kb3197868-x64_86e84bd3e458a2e1c7c7d20e0732880af9d4e8c8.cab
28.11.2016 14:14:02,18 - Info: Cleaned up client directory for w61-x64 glb


This implies, that the full quality update rollup supersedes more updates than just the corresponding security-only updates.


Caveats

The correct handling of superseding and superseded updates is a general problem. Then it is a simplification, to start with the file ExcludeListForce-all.txt and only two kb numbers. But for development, it is easier to start with a limited test case. If it works well, then the other exclude lists for Windows, Office and .Net should be added to the initial black list.
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

A new method for calculating superseded updates

Postby hbuhrmester » 30.11.2016, 10:10

Implementation

There is a new XSLT file extract-all-bundle-revision-and-update-ids.xsl, which replaces the file extract-existing-bundle-revision-ids.xsl:

Code: Select all
<?xml version="1.0"?>
<!-- Author: H. Buhrmester, 2016 -->
<!-- Filename: extract-all-bundle-revision-and-update-ids.xsl -->
<!-- This file selects all bundle records, as identified by the attribute IsBundle='true' -->
<!-- It extracts the following attributes of the element Update: -->
<!-- Field 1: the attribute RevisionId -->
<!-- Field 2: the attribute UpdateId -->
<!-- Note: This is one of the simplest XSLT files and may serve as a template for other files. -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
  <xsl:output omit-xml-declaration="yes" indent="no" method="text" />
  <xsl:template match="/">
    <xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update[@IsBundle='true']">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="@RevisionId" />
      <xsl:text>#,</xsl:text>
      <xsl:value-of select="@UpdateId" />
      <xsl:text>&#10;</xsl:text>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>


Die new implementation for the calculation of superseded updates replaces lines 1027 - 1068 of the file DownloadUpdates.cmd; or everthing between the comments:
Code: Select all
rem *** Revised part for determination of superseded updates starts here ***
[...]
rem *** Apply ExcludeList-superseded-exclude.txt ***


It looks like:
Code: Select all
rem *** Revised part for determination of superseded updates starts here ***
rem
rem *** Start of Revision 28.11.2016 ***
rem
rem Extract four files in CSV format from the WSUS catalog file
rem package.xml using XSLT transformations
rem
rem File 1: Extract all existing bundle RevisionIds and their associated
rem UpdateIds
echo Extracting file 1...
%CSCRIPT_PATH% //Nologo //E:vbs ..\cmd\XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-all-bundle-revision-and-update-ids.xsl "%TEMP%\AllBundleRevisionAndUpdateIds.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\AllBundleRevisionAndUpdateIds.txt" >"%TEMP%\AllBundleRevisionAndUpdateIds-unique.txt"
del "%TEMP%\AllBundleRevisionAndUpdateIds.txt"

rem File 2: Extract all superseding bundle RevisionIds and the
rem corresponding superseded bundle RevisionIds
echo Extracting file 2...
%CSCRIPT_PATH% //Nologo //E:vbs ..\cmd\XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-superseding-and-superseded-revision-ids.xsl "%TEMP%\SupersedingAndSupersededRevisionIds.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\SupersedingAndSupersededRevisionIds.txt" >"%TEMP%\SupersedingAndSupersededRevisionIds-unique.txt"
del "%TEMP%\SupersedingAndSupersededRevisionIds.txt"

rem File 3: Extract three connected fields from the same Update records:
rem - the RevisionId of the parent bundle record
rem - the RevisionId of the Update record itself
rem - the FileId of the Payload File
echo Extracting file 3...
%CSCRIPT_PATH% //Nologo //E:vbs ..\cmd\XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-update-revision-and-file-ids.xsl "%TEMP%\BundledUpdateRevisionAndFileIds.txt"
rem We need two sorted versions of this file: one sorted by the first
rem field (or the whole line)
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\BundledUpdateRevisionAndFileIds.txt" >"%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt"
rem Another copy is sorted by the third field; this sort must not use
rem the option --unique (-u)
..\bin\gsort.exe -t "," -k "3" -T "%TEMP%" "%TEMP%\BundledUpdateRevisionAndFileIds.txt" >"%TEMP%\BundledUpdateRevisionAndFileIds-sorted3.txt"
del "%TEMP%\BundledUpdateRevisionAndFileIds.txt"

rem File 4: Extract all FileIds and their Locations
echo Extracting file 4...
%CSCRIPT_PATH% //Nologo //E:vbs ..\cmd\XSLT.vbs "%TEMP%\package.xml" ..\xslt\extract-update-cab-exe-ids-and-locations.xsl "%TEMP%\UpdateCabExeIdsAndLocations.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\UpdateCabExeIdsAndLocations.txt" >"%TEMP%\UpdateCabExeIdsAndLocations-unique.txt"
del "%TEMP%\UpdateCabExeIdsAndLocations.txt"

rem Create an initial block list of excluded kb numbers, trace back to
rem the excluded bundle RevisionIds and remove them from the list of
rem superseding updates. Also create a list of excluded UpdateIds for
rem a possible use in the installation part.
rem
rem The initial block list is created from the files:
rem
rem ..\exclude\ExcludeListForce-all.txt
rem ..\exclude\custom\ExcludeListForce-all.txt
rem
rem These files should only contain kb numbers or other specific search
rem patterns. Too general search patterns should be avoided.
rem
rem TODO: Using only the ExcludeListForce-all.txt is a simplification,
rem but for development, it is useful to start with a limited use case. If
rem the revised method works well, the initial block list should also
rem include the other exclude lists for .Net, Windows and Office.

rem Reset output file
if exist "%TEMP%\InitialBlockList.txt" del "%TEMP%\InitialBlockList.txt"
if exist ..\exclude\ExcludeListForce-all.txt copy /Y ..\exclude\ExcludeListForce-all.txt "%TEMP%\InitialBlockList.txt"
if exist ..\exclude\custom\ExcludeListForce-all.txt (
  type ..\exclude\custom\ExcludeListForce-all.txt >>"%TEMP%\InitialBlockList.txt"
)
rem Delete file if empty
for %%i in ("%TEMP%\InitialBlockList.txt") do if %%~zi==0 del %%i

if exist "%TEMP%\InitialBlockList.txt" (
  rem Remove duplicate entries, e.g. from the same kb numbers for x86
  rem and x64
  ..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\InitialBlockList.txt" >"%TEMP%\InitialBlockList-unique.txt"
  del "%TEMP%\InitialBlockList.txt"

  rem Trace back from the excluded kb numbers to the excluded FileIds
  echo Building a list of excluded FileIds...
  %SystemRoot%\System32\findstr.exe /L /I /G:"%TEMP%\InitialBlockList-unique.txt" "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt" >"%TEMP%\ExcludedFileIdsAndLocations.txt"
  del "%TEMP%\InitialBlockList-unique.txt"
  ..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ExcludedFileIdsAndLocations.txt" >"%TEMP%\ExcludedFileIdsAndLocations-unique.txt"
  del "%TEMP%\ExcludedFileIdsAndLocations.txt"

  rem Trace back from the FileIds to the parent bundle RevisionIds
  rem
  rem Input files:
  rem File 1: ExcludedFileIdsAndLocations-unique.txt
  rem - Field 1: excluded FileIds (sorted and joined field)
  rem - Field 2: excluded Locations
  rem File 2: BundledUpdateRevisionAndFileIds-sorted3.txt
  rem - Field 1: Bundle RevisionId (exported field)
  rem - Field 2: Update RevisionId
  rem - Field 3: FileId (sorted and joined field)
  rem
  rem Output file: excluded bundle RevisionIds
  echo Building a list of excluded bundle RevisionIds...
  ..\bin\join.exe -t "," -1 "1" -2 "3" -o "2.1" "%TEMP%\ExcludedFileIdsAndLocations-unique.txt" "%TEMP%\BundledUpdateRevisionAndFileIds-sorted3.txt" >"%TEMP%\ExcludedBundleRevisionIds.txt"
  del "%TEMP%\ExcludedFileIdsAndLocations-unique.txt"
  del "%TEMP%\BundledUpdateRevisionAndFileIds-sorted3.txt"
  ..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ExcludedBundleRevisionIds.txt" >"%TEMP%\ExcludedBundleRevisionIds-unique.txt"
  del "%TEMP%\ExcludedBundleRevisionIds.txt"

  rem Trace back from the excluded bundle RevisionIds to the excluded
  rem UpdateIds
  rem
  rem Input files:
  rem File 1: AllBundleRevisionAndUpdateIds-unique.txt
  rem - Field 1: RevisionIds of all bundle records
  rem - Field 2: UpdateId
  rem File 2: ExcludedBundleRevisionIds-unique.txt
  rem - Field 1: RevisionId
  rem
  rem Output file: excluded UpdateIds
  echo Building a list of excluded bundle UpdateIds...
  ..\bin\join.exe -t "," -o "1.2" "%TEMP%\AllBundleRevisionAndUpdateIds-unique.txt" "%TEMP%\ExcludedBundleRevisionIds-unique.txt" >..\client\exclude\ExcludedUpdateIds.txt
  ..\bin\gsort.exe -u -T "%TEMP%" ..\client\exclude\ExcludedUpdateIds.txt >..\client\exclude\ExcludedUpdateIds-unique.txt
  del ..\client\exclude\ExcludedUpdateIds.txt

  rem The excluded bundle RevisionIds are removed from the list of
  rem all existing bundle RevisionIds. Thus, they will not be treated
  rem as superseding anymore, when the list of superseded updates is
  rem calculated.
  rem
  rem The input files are the same as above, but a "left join" is used
  rem to subtract the right file from the left.
  echo Removing the excluded bundle RevisionIds from the list of existing bundle RevisionIds...
  ..\bin\join.exe -t "," -v1 "%TEMP%\AllBundleRevisionAndUpdateIds-unique.txt" "%TEMP%\ExcludedBundleRevisionIds-unique.txt" >"%TEMP%\ValidBundleRevisionAndUpdateIds.txt"
  del "%TEMP%\AllBundleRevisionAndUpdateIds-unique.txt"
  del "%TEMP%\ExcludedBundleRevisionIds-unique.txt"
  ..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ValidBundleRevisionAndUpdateIds.txt" >"%TEMP%\ValidBundleRevisionAndUpdateIds-unique.txt"
  del "%TEMP%\ValidBundleRevisionAndUpdateIds.txt"
) else (
  if exist ..\client\exclude\ExcludedUpdateIds-unique.txt del ..\client\exclude\ExcludedUpdateIds-unique.txt
  ren "%TEMP%\AllBundleRevisionAndUpdateIds-unique.txt" ValidBundleRevisionAndUpdateIds-unique.txt
)

rem After hiding excluded bundle RevisionIds, the list of superseded
rem files is created as before. There are three steps:

rem *** First step: Calculate superseded bundle RevisionIds ***
echo Building a list of superseded bundle RevisionIds...
..\bin\join.exe -t "," -o "2.2" "%TEMP%\ValidBundleRevisionAndUpdateIds-unique.txt" "%TEMP%\SupersedingAndSupersededRevisionIds-unique.txt" >"%TEMP%\ValidSupersededRevisionIds.txt"
del "%TEMP%\ValidBundleRevisionAndUpdateIds-unique.txt"
del "%TEMP%\SupersedingAndSupersededRevisionIds-unique.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ValidSupersededRevisionIds.txt" >"%TEMP%\ValidSupersededRevisionIds-unique.txt"
del "%TEMP%\ValidSupersededRevisionIds.txt"

rem *** Second step: Calculate superseded file ids ***
echo Building a list of superseded FileIds...
..\bin\join.exe -t "," -o "2.3" "%TEMP%\ValidSupersededRevisionIds-unique.txt" "%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt" >"%TEMP%\SupersededFileIds.txt"
del "%TEMP%\ValidSupersededRevisionIds-unique.txt"
del "%TEMP%\BundledUpdateRevisionAndFileIds-unique.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\SupersededFileIds.txt" >"%TEMP%\SupersededFileIds-unique.txt"
del "%TEMP%\SupersededFileIds.txt"

rem *** Third step: Calculate superseded file locations (URLs) ***
echo Building a list of superseded File Locations...
..\bin\join.exe -t "," -o "2.2" "%TEMP%\SupersededFileIds-unique.txt" "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt" >"%TEMP%\ExcludeListLocations-superseded-all.txt"
del "%TEMP%\SupersededFileIds-unique.txt"
del "%TEMP%\UpdateCabExeIdsAndLocations-unique.txt"
..\bin\gsort.exe -u -T "%TEMP%" "%TEMP%\ExcludeListLocations-superseded-all.txt" >"%TEMP%\ExcludeListLocations-superseded-all-unique.txt"
del "%TEMP%\ExcludeListLocations-superseded-all.txt"

rem *** End of Revision 28.11.2016 ***
rem
rem *** Apply ExcludeList-superseded-exclude.txt ***
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: A new method for calculating superseded updates

Postby wyoming » 30.11.2016, 10:16

Image
wyoming
 
Posts: 43
Joined: 14.10.2009, 19:40

Re: A new method for calculating superseded updates

Postby Dalai » 30.11.2016, 16:18

Nice work :!: How much (if at all) does this change influence the calculation time/speed of superseded updates?

Regards
Dalai
Dalai
 
Posts: 1041
Joined: 12.07.2016, 21:00

Re: A new method for calculating superseded updates

Postby aker » 30.11.2016, 16:48

Could we then also implement the installation exclusion using the WUA-commandline?

Ref.: viewtopic.php?f=2&t=6072&start=10#p20881
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: A new method for calculating superseded updates

Postby hbuhrmester » 30.11.2016, 19:52

Dalai wrote:Nice work :!: How much (if at all) does this change influence the calculation time/speed of superseded updates?

I didn't measure it, but it's almost the same. The four XSLT transformations are the slowest part, and we had the same transformations before.

Sorting and joining the files is very fast.
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: A new method for calculating superseded updates

Postby WSUSUpdateAdmin » 08.12.2016, 16:39

Moin Hartmut,

vielen Dank vorab! :)
Ich werde das in Ruhe durcharbeiten, schaffe das aber nicht mehr vor dem Wochenende - die Vorweihnachtszeit...

Viele Grüße,
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: A new method for calculating superseded updates

Postby WSUSUpdateAdmin » 22.12.2016, 14:58

...und schon sind zwei Wochen 'rum und es ist nix passiert...
Naja, jedenfalls nichts, was hierher gehörte...

Ich hoffe und gehe davon aus, dass das im Neuen Jahr wieder besser wird bzw. werden kann.

Schöne Weihnachten!

Viele Grüße,
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: A new method for calculating superseded updates

Postby WSUSUpdateAdmin » 02.01.2017, 14:45

Moin und ein gutes Neues Jahr!

Zunächst mal ist das eine gute Idee und eine herausragende (und dokumentierte!) Arbeit, wie man es von Dir aus der Vergangenheit schon gewohnt ist. :D

Dennoch bin ich (noch) ein wenig zurückhaltend, was den Einbau anbelangt.

Zum einen wird der Code dadurch natürlich nicht einfacher (zu verstehen), und ich möchte vermeiden, dass ich ihn irgendwann selbst nicht mehr kapiere... ;)

Zum anderen stehen die vorgeschlagenen Änderungen zwar nicht gerade im Widerspruch, aber doch in gewisser Hinsicht in Konkurrenz zu denen, die ich nahezu zeitgleich im Rahmen der neu eingeführten Option "/seconly" vorgenommen habe und die im Vergleich zu Deinem Vorschlag geradezu trivial erscheinen.

Der wesentliche Vorteil Deiner Implementierung besteht (neben der technischen Eleganz) in meinen Augen darin, dass sämtliche von einem "monthly quality rollup" ersetzte Updates bei dessen Ausschluss vollautomatisch wieder "reaktiviert" (und somit heruntergeladen) werden, nicht nur das jeweilige "security only"-Paket des entsprechenden Monats, dessen KB-Id man allerdings ohnehin kennen und manuell in die "*-seconly.txt"-Dateien eintragen muss, sowohl in Deiner als auch in meiner Variante.

An meiner Version finde ich charmant, dass sie einfach ist und dass bei einer notwendigen Neubestimmung der "superseded updates" immer beide Versionen ermittelt werden, also "ExcludeList-superseded.txt" und "ExcludeList-superseded-seconly.txt".

Hier möchte ich gern noch ein wenig abwarten, wie sich die Abhängigkeiten denn künftig entwickeln, ob also mehr und mehr alte Sicherheitsupdates von "quality rollups" aufgesogen werden, was für Deine Implementierung spricht, oder nicht.

Ich hoffe auf geneigtes Verständnis und sage nochmals "dankeschön".

Viele Grüße,
Torsten

p.S. (vergessen): XP ist für mich schon länger kein Kriterium mehr.
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38


Return to Anregungen / Suggestions

Who is online

Users browsing this forum: No registered users and 33 guests