{"action":"created","issue":{"url":"https://api.github.com/repos/mikix/deb2snap/issues/6","labels_url":"https://api.github.com/repos/mikix/deb2snap/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/mikix/deb2snap/issues/6/comments","events_url":"https://api.github.com/repos/mikix/deb2snap/issues/6/events","html_url":"https://github.com/mikix/deb2snap/issues/6","id":90016062,"number":6,"title":"Package libc6:amd64 not installed","user":{"login":"nobuto-m","id":4356209,"avatar_url":"https://avatars.githubusercontent.com/u/4356209?v=3","gravatar_id":"","url":"https://api.github.com/users/nobuto-m","html_url":"https://github.com/nobuto-m","followers_url":"https://api.github.com/users/nobuto-m/followers","following_url":"https://api.github.com/users/nobuto-m/following{/other_user}","gists_url":"https://api.github.com/users/nobuto-m/gists{/gist_id}","starred_url":"https://api.github.com/users/nobuto-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobuto-m/subscriptions","organizations_url":"https://api.github.com/users/nobuto-m/orgs","repos_url":"https://api.github.com/users/nobuto-m/repos","events_url":"https://api.github.com/users/nobuto-m/events{/privacy}","received_events_url":"https://api.github.com/users/nobuto-m/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-22T05:33:04Z","updated_at":"2015-08-03T19:25:25Z","closed_at":null,"body":"On amd64 host, I got the error \"Package libc6:amd64 not installed\".\r\n\r\n```\r\n$ bash -x ./deb2snap -d 15.04 hello\r\n...\r\n++ dpkg -S /lib/x86_64-linux-gnu/libc.so.6\r\n++ sed 's/: .*//'\r\n+ PACKAGES=' hello libc6:amd64'\r\n...\r\n++ ./tools/dep-tree --manifest /home/ubuntu/.cache/snappy-preload/manifests/ubuntu-core-15.04-core-amd64.manifest hello libc6:amd64\r\nPackage libc6:amd64 not installed\r\n```\r\n\r\nHow to reproduce:\r\n\r\ncreate vivid LXC container\r\n```\r\n$ sudo lxc-create -t ubuntu-cloud -n vivid-lxc -- --release vivid -S ~/.ssh/id_rsa.pub\r\n```\r\n\r\nprepare deb2snap\r\n```\r\n$ sudo apt-add-repository ppa:snappy-dev/tools\r\n$ sudo apt update\r\n\r\n$ sudo apt install cmake gcc-multilib ubuntu-snappy-cli git dpkg-dev\r\n\r\n$ git clone https://github.com/mikix/deb2snap\r\n$ cd deb2snap\r\n```\r\nrun deb2snap\r\n```\r\n$ sudo apt install hello\r\n$ ./deb2snap -d 15.04 hello\r\nPackage libc6:amd64 not installed\r\n```\r\n\r\nlibc6:amd64 is certainly installed.\r\n```\r\n$ apt-cache policy libc6:amd64\r\nlibc6:\r\n  Installed: 2.21-0ubuntu4\r\n  Candidate: 2.21-0ubuntu4\r\n  Version table:\r\n *** 2.21-0ubuntu4 0\r\n        500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages\r\n        100 /var/lib/dpkg/status\r\n```"},"comment":{"url":"https://api.github.com/repos/mikix/deb2snap/issues/comments/127377961","html_url":"https://github.com/mikix/deb2snap/issues/6#issuecomment-127377961","issue_url":"https://api.github.com/repos/mikix/deb2snap/issues/6","id":127377961,"user":{"login":"bladernr","id":4295496,"avatar_url":"https://avatars.githubusercontent.com/u/4295496?v=3","gravatar_id":"","url":"https://api.github.com/users/bladernr","html_url":"https://github.com/bladernr","followers_url":"https://api.github.com/users/bladernr/followers","following_url":"https://api.github.com/users/bladernr/following{/other_user}","gists_url":"https://api.github.com/users/bladernr/gists{/gist_id}","starred_url":"https://api.github.com/users/bladernr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bladernr/subscriptions","organizations_url":"https://api.github.com/users/bladernr/orgs","repos_url":"https://api.github.com/users/bladernr/repos","events_url":"https://api.github.com/users/bladernr/events{/privacy}","received_events_url":"https://api.github.com/users/bladernr/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T19:25:25Z","updated_at":"2015-08-03T19:25:25Z","body":"FWIW, I fired up python3 in that environment and generated the trace directly:\r\n```\r\nPython 3.4.3 (default, Mar 26 2015, 23:09:09) \r\n[GCC 4.9.2] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import apt\r\n>>> cache = apt.Cache()\r\n>>> cache['libc6:armhf'].installed\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 198, in __getitem__\r\n    return self._weakref[key]\r\n  File \"/usr/lib/python3.4/weakref.py\", line 125, in __getitem__\r\n    o = self.data[key]()\r\nKeyError: 'libc6:armhf'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/lib/python3/dist-packages/apt/cache.py\", line 205, in __getitem__\r\n    raise KeyError('The cache has no package named %r' % key)\r\nKeyError: \"The cache has no package named 'libc6:armhf'\"\r\n>>> \r\n```\r\nAnd then tried again with no arch:\r\n```\r\n>>> cache['libc6'].installed\r\n<Version: package:'libc6' version:'2.21-0ubuntu4'>\r\n```"}}