{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/32240","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/32240/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/32240/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/32240/events","html_url":"https://github.com/saltstack/salt/issues/32240","id":144602552,"number":32240,"title":"pkgrepo.managed touches all files even if specific sources.list is given","user":{"login":"do3meli","id":1478176,"avatar_url":"https://avatars.githubusercontent.com/u/1478176?v=3","gravatar_id":"","url":"https://api.github.com/users/do3meli","html_url":"https://github.com/do3meli","followers_url":"https://api.github.com/users/do3meli/followers","following_url":"https://api.github.com/users/do3meli/following{/other_user}","gists_url":"https://api.github.com/users/do3meli/gists{/gist_id}","starred_url":"https://api.github.com/users/do3meli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/do3meli/subscriptions","organizations_url":"https://api.github.com/users/do3meli/orgs","repos_url":"https://api.github.com/users/do3meli/repos","events_url":"https://api.github.com/users/do3meli/events{/privacy}","received_events_url":"https://api.github.com/users/do3meli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"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":390,"closed_issues":781,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2016-03-30T19:17:48Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-03-30T14:01:56Z","updated_at":"2016-03-30T19:37:46Z","closed_at":null,"body":"### Description of Issue/Question\r\nWhen pkgrepo.managed is used to configure a new apt repository in a specific file it looks to me like it is touching all sources.list files it finds. this should not be the case. I assume that pkgrepo.managed is only opening the specified sources.list file and does not look at any other files.\r\n\r\n### Setup\r\nin my sls config i define the one and only file where pkgrepo.managed should look at:\r\n``` \r\npkgsources-ox-appsuite-ui:\r\n  pkgrepo.managed:\r\n    - comments: \"my very fancy comment\"\r\n    - refresh_db: False\r\n    - name: deb http://i-want-to-have-my-own-pkg-repo.com/packages/\r\n    - file: /etc/apt/sources.list.d/my-own-sources.list\r\n```\r\n\r\n### Steps to Reproduce Issue\r\n1. configure sls state like above\r\n2. create some sources.list files in /etc/apt/sources.list.d/\r\n2. run it against a minion\r\n3. check the various sources.list files for its timestamp. they all now have the same timestamp from the time when the salt run occurred.\r\n\r\n### Versions Report\r\nsalt-minion --version: \r\n```\r\nsalt-minion 2015.8.8 (Beryllium)\r\n```\r\nsalt --version-report:\r\n```\r\nSalt Version:\r\n           Salt: 2015.8.8\r\n \r\nDependency Versions:\r\n         Jinja2: 2.7.2\r\n       M2Crypto: Not Installed\r\n           Mako: 0.9.1\r\n         PyYAML: 3.10\r\n          PyZMQ: 14.0.1\r\n         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.4\r\n           cffi: 1.5.0\r\n       cherrypy: 3.2.2\r\n       dateutil: 1.5\r\n          gitdb: 0.5.4\r\n      gitpython: 0.3.2 RC1\r\n          ioflo: Not Installed\r\n        libgit2: Not Installed\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.3.0\r\n   mysql-python: 1.2.3\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n         pygit2: Not Installed\r\n   python-gnupg: Not Installed\r\n          smmap: 0.8.2\r\n        timelib: Not Installed\r\n \r\nSystem Versions:\r\n           dist: Ubuntu 14.04 trusty\r\n        machine: x86_64\r\n        release: 3.13.0-77-generic\r\n         system: Ubuntu 14.04 trusty\r\n\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/203600557","html_url":"https://github.com/saltstack/salt/issues/32240#issuecomment-203600557","issue_url":"https://api.github.com/repos/saltstack/salt/issues/32240","id":203600557,"user":{"login":"do3meli","id":1478176,"avatar_url":"https://avatars.githubusercontent.com/u/1478176?v=3","gravatar_id":"","url":"https://api.github.com/users/do3meli","html_url":"https://github.com/do3meli","followers_url":"https://api.github.com/users/do3meli/followers","following_url":"https://api.github.com/users/do3meli/following{/other_user}","gists_url":"https://api.github.com/users/do3meli/gists{/gist_id}","starred_url":"https://api.github.com/users/do3meli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/do3meli/subscriptions","organizations_url":"https://api.github.com/users/do3meli/orgs","repos_url":"https://api.github.com/users/do3meli/repos","events_url":"https://api.github.com/users/do3meli/events{/privacy}","received_events_url":"https://api.github.com/users/do3meli/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T19:37:46Z","updated_at":"2016-03-30T19:37:46Z","body":"That would be an explenation. Still i am wondering why all sources.list files are not just opened for read only to do this job. The last modified timestamp should only change for the file given..."}}