{"action":"opened","issue":{"url":"https://api.github.com/repos/lkardos/test/issues/34","labels_url":"https://api.github.com/repos/lkardos/test/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/lkardos/test/issues/34/comments","events_url":"https://api.github.com/repos/lkardos/test/issues/34/events","html_url":"https://github.com/lkardos/test/issues/34","id":84018153,"number":34,"title":"%preun is called with arg 0 during upgrade","user":{"login":"lkardos","id":7781878,"avatar_url":"https://avatars.githubusercontent.com/u/7781878?v=3","gravatar_id":"","url":"https://api.github.com/users/lkardos","html_url":"https://github.com/lkardos","followers_url":"https://api.github.com/users/lkardos/followers","following_url":"https://api.github.com/users/lkardos/following{/other_user}","gists_url":"https://api.github.com/users/lkardos/gists{/gist_id}","starred_url":"https://api.github.com/users/lkardos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkardos/subscriptions","organizations_url":"https://api.github.com/users/lkardos/orgs","repos_url":"https://api.github.com/users/lkardos/repos","events_url":"https://api.github.com/users/lkardos/events{/privacy}","received_events_url":"https://api.github.com/users/lkardos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lkardos","id":7781878,"avatar_url":"https://avatars.githubusercontent.com/u/7781878?v=3","gravatar_id":"","url":"https://api.github.com/users/lkardos","html_url":"https://github.com/lkardos","followers_url":"https://api.github.com/users/lkardos/followers","following_url":"https://api.github.com/users/lkardos/following{/other_user}","gists_url":"https://api.github.com/users/lkardos/gists{/gist_id}","starred_url":"https://api.github.com/users/lkardos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lkardos/subscriptions","organizations_url":"https://api.github.com/users/lkardos/orgs","repos_url":"https://api.github.com/users/lkardos/repos","events_url":"https://api.github.com/users/lkardos/events{/privacy}","received_events_url":"https://api.github.com/users/lkardos/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-06-02T13:18:53Z","updated_at":"2015-06-02T13:18:53Z","closed_at":null,"body":"_Imported from trac issue 16.  Created by robbertdam on 2008-12-15T16:43:25, last modified: 2010-05-05T10:42:35_\n\nI'm experiencing the following issue when performing an upgrade of my software using RPM.    When upgrading an obsolete package using rpm -U (I used the keyword \"obsoletes\" in the RPM spec) the following happens:    1. %pre is called on the new package  2. %post is called on the new package  3. %preun is called on the old (obsolete) package with $1 == 0 <--- NOT CORRECT  4. %postun is called on the old package          The issue occurs on the following configuration:    /proc/version  Linux version 2.6.25.5-Kernel-TNX-1.0.stable.48 (geeko@buildhost) (gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)) #39 SMP PREEMPT Tu  e Sep 23 09:15:55 CEST 2008    Distribution: OpenSuse 11      On the following configuration_ the %preun is not called at all_ and the obsolete pacakage appears to be still installed after the upgrade.     Linux version 2.6.16.29linux-2.6.16.29-pentium-m-1.0.stable.45-pentium4 (wijnand@wst102) (gcc version 4.1.2 20061115 (prerelease) (SUSE Lin  ux)) #3 SMP PREEMPT Wed Jul 2 16:42:03 CEST 2008    Distribution: OpenSuse 10.1        In both configurations rpm --version gives \"RPM version 4.4.2\"  \n\n_Trac comment by pmatilai on 2009-06-05 12:07:46:_\n%preun with $1 == 0 being wrong or not is largely a matter of interpretation: the old package gets erased_ not upgraded. But sure_ packages dont currently have proper means to know whether they got obsoleted or erased_ this is one of the things listed in [wiki:Problems/Upgrade] too.\n\n"}}