{"action":"closed","issue":{"url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1065","labels_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1065/comments","events_url":"https://api.github.com/repos/QubesOS/qubes-issues/issues/1065/events","html_url":"https://github.com/QubesOS/qubes-issues/issues/1065","id":94968489,"number":1065,"title":"Debian Template: qubes-core-agent.postinst causes very slow package installation","user":{"login":"adrelanos","id":1985040,"avatar_url":"https://avatars.githubusercontent.com/u/1985040?v=3","gravatar_id":"","url":"https://api.github.com/users/adrelanos","html_url":"https://github.com/adrelanos","followers_url":"https://api.github.com/users/adrelanos/followers","following_url":"https://api.github.com/users/adrelanos/following{/other_user}","gists_url":"https://api.github.com/users/adrelanos/gists{/gist_id}","starred_url":"https://api.github.com/users/adrelanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrelanos/subscriptions","organizations_url":"https://api.github.com/users/adrelanos/orgs","repos_url":"https://api.github.com/users/adrelanos/repos","events_url":"https://api.github.com/users/adrelanos/events{/privacy}","received_events_url":"https://api.github.com/users/adrelanos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/C:%20core","name":"C: core","color":"0000aa"},{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/C:%20Debian","name":"C: Debian","color":"0052cc"},{"url":"https://api.github.com/repos/QubesOS/qubes-issues/labels/P:%20minor","name":"P: minor","color":"dcffff"}],"state":"closed","locked":false,"assignee":{"login":"nrgaway","id":441906,"avatar_url":"https://avatars.githubusercontent.com/u/441906?v=3","gravatar_id":"","url":"https://api.github.com/users/nrgaway","html_url":"https://github.com/nrgaway","followers_url":"https://api.github.com/users/nrgaway/followers","following_url":"https://api.github.com/users/nrgaway/following{/other_user}","gists_url":"https://api.github.com/users/nrgaway/gists{/gist_id}","starred_url":"https://api.github.com/users/nrgaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrgaway/subscriptions","organizations_url":"https://api.github.com/users/nrgaway/orgs","repos_url":"https://api.github.com/users/nrgaway/repos","events_url":"https://api.github.com/users/nrgaway/events{/privacy}","received_events_url":"https://api.github.com/users/nrgaway/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/QubesOS/qubes-issues/milestones/3","html_url":"https://github.com/QubesOS/qubes-issues/milestones/Release%203.0","labels_url":"https://api.github.com/repos/QubesOS/qubes-issues/milestones/3/labels","id":1011213,"number":3,"title":"Release 3.0","description":" * Odyssey-based [http://theinvisiblethings.blogspot.com/2013/03/introducing-qubes-odyssey-framework.html link]\r\n * Xen 4.4\r\n * Default USB VM to host all the system's USB controllers \r\n * IPv6 routing between all domains \r\n * ~~~Templates support for HVMs/Windows VMs (if licensing allows)~~~ (Already done in Qubes R2 Beta 3 :)\r\n * Integration of Anti Evil Maid with system installer, support Intel TXT in installer-generated grub?","creator":{"login":"marmarek","id":726704,"avatar_url":"https://avatars.githubusercontent.com/u/726704?v=3","gravatar_id":"","url":"https://api.github.com/users/marmarek","html_url":"https://github.com/marmarek","followers_url":"https://api.github.com/users/marmarek/followers","following_url":"https://api.github.com/users/marmarek/following{/other_user}","gists_url":"https://api.github.com/users/marmarek/gists{/gist_id}","starred_url":"https://api.github.com/users/marmarek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmarek/subscriptions","organizations_url":"https://api.github.com/users/marmarek/orgs","repos_url":"https://api.github.com/users/marmarek/repos","events_url":"https://api.github.com/users/marmarek/events{/privacy}","received_events_url":"https://api.github.com/users/marmarek/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":40,"state":"open","created_at":"2015-03-08T14:05:21Z","updated_at":"2015-08-04T21:28:57Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-07-14T15:09:19Z","updated_at":"2015-08-04T21:28:57Z","closed_at":"2015-08-04T21:28:57Z","body":"Installation of packages in Debian TemplateVM is currently very slow. To see this issue in action, open `/var/lib/dpkg/info/qubes-core-agent.postinst` as root and add `set -x` below `#!/bin/bash`. This is something I consider as a sanity test during development anyhow to check if everything works as expected. `qubes-core-agent.postinst` is called an unnecessarily high amount of times running for a very long time. For example, each time some file in `/usr/share/application` is changed, all the `#DEBHELPER#` code is invoked, that eventually includes restart of all systemd unit files, that are shipped by by the qubes-core-agent-linux package.\r\n\r\nProposed fix:\r\nConsider adding an `exit 0` below [line 397](https://github.com/QubesOS/qubes-core-agent-linux/blob/b368ffe5c690feea416274ddffcca272bcb71892/debian/qubes-core-agent.postinst#L397). This would result in case of `triggered` to not run any `#DEBHELPER#` code.\r\n\r\nI don't know yet if there are any situations, where maintainer scripts are called \"internally\" using action `triggered`, where `#DEBHELPER#` code is supposed to be executed. Something to ask debian-mentors."}}