Bug 41037 - Software policy: Check for packages to be removed might fail
Software policy: Check for packages to be removed might fail
Status: CLOSED WONTFIX
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: General
UCC 2.1
Other Linux
: P5 normal
: ---
Assigned To: UCC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-12 12:50 CEST by Michael Grandjean
Modified: 2023-06-28 10:33 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
proposed patch (582 bytes, patch)
2016-04-12 13:04 CEST, Michael Grandjean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2016-04-12 12:50:43 CEST
univention-ucc-software-update receives the "univentionCorporateClientSoftwareUpdateRemoveList" from UCS and checks via dpkg-query if the package is installed or not:

> 103         if dpkg-query -W  -f='${Status}' $PKGRM | grep -q "installed"; then
> 104                 rmneeded="$rmneeded $I"
> 105         fi

The problem is that the "grep" statement is incomplete. "dpkg-query -W  -f='${Status}'" can have at least these outputs:

> dpkg-query -W  -f='${Status}' gtg
> deinstall ok config-files
> 
> dpkg-query -W  -f='${Status}' hexchat
> install ok installed
>
> dpkg-query -W  -f='${Status}' amarok 
> unknown ok not-installed

The last one (not-installed) also matches the grep command, but that is clearly not wanted.
Comment 1 Michael Grandjean univentionstaff 2016-04-12 13:04:49 CEST
Created attachment 7590 [details]
proposed patch
Comment 2 Ingo Steuwer univentionstaff 2020-06-19 16:56:04 CEST
UCC 1.x / 2.x is out of maintenance. In case this Bug is still relevant please clone with the correct version.