[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881432: debian-policy: Please clarify postinst invocation upon first installation



Package: debian-policy
Version: 4.1.1.1
Severity: wishlist

Hello,

the question of how to tell in postinst whether this is an upgrade or a
first installation comes up every now and then. Again yesterday in
#debian-mentors. Therefore I'm asking for a clarifcation in

6.5. Summary of ways maintainer scripts are called

in the paragraph after

"postinst configure most-recently-configured-version"

Suggested wording:

| If this package was prevously uninstalled, the
| "most-recently-configured-version" string is empty.

Reading src/configure.c in dpkg, this should be technically correct.

Also testing for an empty $2 in postinst is common according to
codesearch[1].

Regards,
    Christoph

[1] https://codesearch.debian.net/search?q=-z+%22%5C%242%22+path%3Adebian%2F*.postinst

Attachment: signature.asc
Description: Digital signature


Reply to: