{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/34479","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/34479/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/34479/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/34479/events","html_url":"https://github.com/saltstack/salt/issues/34479","id":164031492,"number":34479,"title":"Packages DB refresh leads to all packages definitions erased on windows minion","user":{"login":"phil123456","id":13568652,"avatar_url":"https://avatars.githubusercontent.com/u/13568652?v=3","gravatar_id":"","url":"https://api.github.com/users/phil123456","html_url":"https://github.com/phil123456","followers_url":"https://api.github.com/users/phil123456/followers","following_url":"https://api.github.com/users/phil123456/following{/other_user}","gists_url":"https://api.github.com/users/phil123456/gists{/gist_id}","starred_url":"https://api.github.com/users/phil123456/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil123456/subscriptions","organizations_url":"https://api.github.com/users/phil123456/orgs","repos_url":"https://api.github.com/users/phil123456/repos","events_url":"https://api.github.com/users/phil123456/events{/privacy}","received_events_url":"https://api.github.com/users/phil123456/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Info%20Needed","name":"Info Needed","color":"c7def8"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":474,"closed_issues":937,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-07-13T05:38:40Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-07-06T09:10:06Z","updated_at":"2016-07-13T06:30:45Z","closed_at":null,"body":"### Description of Issue/Question\r\n\r\nI tried to add my own package definition (winrar), but as I try to install it on minion, => package cannot be found in repository\r\n\r\ndigging further in the windows minion files\r\n\r\nC:\\salt\\var\\cache\\salt\\minion\\files\\base\\win\r\n\r\nonly contains repo-ng that contains winrepo.p\r\n\r\nand if I one it with an hex editor, it only contains character 0x80 (???)\r\n\r\nit seems de db refresh erased all other packages, I refreshed the db without my winrar sls but still the same\r\nall packages are GONE !\r\n\r\nthe minion log does not give any information about the package except it cannot find it\r\n\r\nlet me know if you need more infos\r\n\r\n### Setup\r\n\r\n    winrar:\r\n      '5.01':\r\n        full_name: 'WinRAR 5.01 (32-bit)'\r\n        installer: 'salt://windows/packages/winrar-x64-531fr.exe'\r\n        install_flags: '/s'\r\n        uninstaller: 'C:\\Program Files (x86)\\WinRAR\\uninstall.exe'\r\n        uninstall_flags: '/s'\r\n        msiexec: False\r\n        locale: en_US\r\n        reboot: False\r\n      latest:\r\n        full_name: 'WinRAR 5.31 (64-bit)'\r\n        installer: 'salt://windows/packages/winrar-x64-531fr.exe'\r\n        install_flags: '/s'\r\n        uninstaller: 'C:\\Program Files\\WinRAR\\uninstall.exe'\r\n        uninstall_flags: '/s'\r\n        msiexec: False\r\n        locale: en_US\r\n        reboot: False\r\n\r\n### Steps to Reproduce Issue\r\n\r\n    sudo salt-run winrepo.genrepo\r\n    event:\r\n        ----------\r\n        error:\r\n            Failed to compile /srv/salt/windows_packages/repo/salt-winrepo/duplicati.sls.\r\n    suffix:\r\n        progress\r\n    event:\r\n        ----------\r\n        error:\r\n            Failed to compile /srv/salt/windows_packages/repo/salt-winrepo/duplicati_x86.sls.\r\n    suffix:\r\n        progress\r\n    [ERROR   ] Rendering exception occurred: Jinja variable 'dict object' has no attribute 'os'\r\n    name_map:\r\n        ----------\r\n        7-Zip 16.00:\r\n            7zip_x86\r\n    ...\r\n       winrar:\r\n            ----------\r\n            5.01:\r\n                ----------\r\n                full_name:\r\n                    WinRAR 5.01 (32-bit)\r\n                install_flags:\r\n                    /s\r\n                installer:\r\n                    salt://windows/packages/winrar-x32-501fr.exe\r\n                locale:\r\n                    en_US\r\n                msiexec:\r\n                    False\r\n                reboot:\r\n                    False\r\n                uninstall_flags:\r\n                    /s\r\n                uninstaller:\r\n                    C:\\Program Files (x86)\\WinRAR\\uninstall.exe\r\n            latest:\r\n                ----------\r\n                full_name:\r\n                    WinRAR 5.31 (64-bit)\r\n                install_flags:\r\n                    /s\r\n                installer:\r\n                    salt://windows/packages/winrar-x64-531fr.exe\r\n                locale:\r\n                    en_US\r\n                msiexec:\r\n                    False\r\n                reboot:\r\n                    False\r\n                uninstall_flags:\r\n                    /s\r\n                uninstaller:\r\n                    C:\\Program Files\\WinRAR\\uninstall.exe\r\n    ....\r\n\r\nthen I did a refresh that seemed successfull\r\n\r\n    salt -G 'os:windows' pkg.refresh_db\r\n\r\non the minion:\r\n\r\n    2016-07-06 11:14:37 [salt.minion    ][INFO    ] Starting a new job with PID 7448\r\n    2016-07-06 11:14:37 [salt.fileclient][INFO    ] Caching directory 'win/repo-ng/' for environment 'base'\r\n    2016-07-06 11:14:39 [salt.minion    ][INFO    ] Returning information for job: 20160706111616222028\r\n    2016-07-06 11:14:42 [salt.minion    ][INFO    ] Starting a new job with PID 1564\r\n    2016-07-06 11:14:42 [salt.minion    ][INFO    ] Returning information for job: 20160706111621272031\r\n\r\npkg.available_version does not even show other packages before crashing:\r\n\r\n    C:\\>salt-call pkg.available_version winrar\r\n    [INFO    ] Caching directory 'win/repo-ng/' for environment 'base'\r\n    [ERROR   ] An un-handled exception was caught by salt's global exception handler:\r\n    IndexError: pop from empty list\r\n    Traceback (most recent call last):\r\n      File \"C:\\salt\\bin\\Scripts\\salt-call\", line 11, in <module>\r\n            salt_call()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\scripts.py\", line 345, in salt_call\r\n        client.run()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\call.py\", line 58, in run\r\n        caller.run()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\caller.py\", line 134, in run\r\n        ret = self.call()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\caller.py\", line 197, in call\r\n        ret['return'] = func(*args, **kwargs)\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\modules\\win_pkg.py\", line 97, in latest_version\r\n        latest_available = _get_latest_pkg_version(pkg_info)\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\modules\\win_pkg.py\", line 1099, in _get_latest_pkg_version\r\n        return sorted(pkginfo, cmp=_reverse_cmp_pkg_versions).pop()\r\n    IndexError: pop from empty list\r\n    Traceback (most recent call last):\r\n      File \"C:\\salt\\bin\\Scripts\\salt-call\", line 11, in <module>\r\n        salt_call()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\scripts.py\", line 345, in salt_call\r\n        client.run()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\call.py\", line 58, in run\r\n        caller.run()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\caller.py\", line 134, in run\r\n        ret = self.call()\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\cli\\caller.py\", line 197, in call\r\n        ret['return'] = func(*args, **kwargs)\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\modules\\win_pkg.py\", line 97, in latest_version\r\n        latest_available = _get_latest_pkg_version(pkg_info)\r\n      File \"C:\\salt\\bin\\lib\\site-packages\\salt\\modules\\win_pkg.py\", line 1099, in _get_latest_pkg_version\r\n        return sorted(pkginfo, cmp=_reverse_cmp_pkg_versions).pop()\r\n    IndexError: pop from empty list\r\n    \r\n\r\n### Versions Report\r\nSalt Version:\r\n           Salt: 2016.3.1\r\n \r\nDependency Versions:\r\n           cffi: 0.8.6\r\n       cherrypy: Not Installed\r\n       dateutil: 2.2\r\n          gitdb: 0.5.4\r\n      gitpython: 0.3.2 RC1\r\n          ioflo: Not Installed\r\n         Jinja2: 2.7.3\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n       M2Crypto: Not Installed\r\n           Mako: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.4.2\r\n   mysql-python: 1.2.3\r\n      pycparser: 2.10\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)\r\n   python-gnupg: 0.3.6\r\n         PyYAML: 3.11\r\n          PyZMQ: 14.4.0\r\n           RAET: Not Installed\r\n          smmap: 0.8.2\r\n        timelib: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.5\r\n \r\nSystem Versions:\r\n           dist: debian 8.5 \r\n        machine: x86_64\r\n        release: 3.16.0-4-amd64\r\n         system: Linux\r\n        version: debian 8.5 \r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/232268212","html_url":"https://github.com/saltstack/salt/issues/34479#issuecomment-232268212","issue_url":"https://api.github.com/repos/saltstack/salt/issues/34479","id":232268212,"user":{"login":"phil123456","id":13568652,"avatar_url":"https://avatars.githubusercontent.com/u/13568652?v=3","gravatar_id":"","url":"https://api.github.com/users/phil123456","html_url":"https://github.com/phil123456","followers_url":"https://api.github.com/users/phil123456/followers","following_url":"https://api.github.com/users/phil123456/following{/other_user}","gists_url":"https://api.github.com/users/phil123456/gists{/gist_id}","starred_url":"https://api.github.com/users/phil123456/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil123456/subscriptions","organizations_url":"https://api.github.com/users/phil123456/orgs","repos_url":"https://api.github.com/users/phil123456/repos","events_url":"https://api.github.com/users/phil123456/events{/privacy}","received_events_url":"https://api.github.com/users/phil123456/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T06:30:45Z","updated_at":"2016-07-13T06:30:45Z","body":"can I have an update on this\r\ndo you need more infos ?\r\nI really cannot push any windows package wich renders salt copletely useles on windows 7 minions"}}
{"actor":{"display_login":"phil123456"}}