{"action":"opened","issue":{"url":"https://api.github.com/repos/archlinuxcn/lilac/issues/62","repository_url":"https://api.github.com/repos/archlinuxcn/lilac","labels_url":"https://api.github.com/repos/archlinuxcn/lilac/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/archlinuxcn/lilac/issues/62/comments","events_url":"https://api.github.com/repos/archlinuxcn/lilac/issues/62/events","html_url":"https://github.com/archlinuxcn/lilac/issues/62","id":318708659,"number":62,"title":"增加文件編輯（常用）工具函數","user":{"login":"renyuneyun","id":3293723,"avatar_url":"https://avatars2.githubusercontent.com/u/3293723?v=4","gravatar_id":"","url":"https://api.github.com/users/renyuneyun","html_url":"https://github.com/renyuneyun","followers_url":"https://api.github.com/users/renyuneyun/followers","following_url":"https://api.github.com/users/renyuneyun/following{/other_user}","gists_url":"https://api.github.com/users/renyuneyun/gists{/gist_id}","starred_url":"https://api.github.com/users/renyuneyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renyuneyun/subscriptions","organizations_url":"https://api.github.com/users/renyuneyun/orgs","repos_url":"https://api.github.com/users/renyuneyun/repos","events_url":"https://api.github.com/users/renyuneyun/events{/privacy}","received_events_url":"https://api.github.com/users/renyuneyun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-29T11:12:05Z","updated_at":"2018-04-29T11:12:05Z","closed_at":null,"author_association":"NONE","body":"之前在寫倉庫中的lilac.py的時候，時不時會碰到PKGBUILD中部分變量（主要是`depends`和`mekedepends`）不正確/完整的問題。\r\n雖說理論上應該等上游（對於我的幾例來說就是AUR）修改，但有時候上游修改太慢，所以有時直接就在lilac.py中修改了，直到上游修正再改回去。\r\n\r\n這樣，那部分工具函數就要複製過來過去地，稍顯累贅。故而想是否可以將其加入lilac代碼庫中，以便重用、訂正以及更多人使用。\r\n\r\n[這裏](https://github.com/renyuneyun/lilac/blob/utils/lilac2/utils.py)基本上是直接將之前用的代碼複製過來，並增加了兩個入口函數（`add_depends`和`add_makedepends`）。\r\n\r\n如果認爲可以合併的話，現在還有兩個問題：\r\n1. 這個文件應該放在哪，以及叫什麼？\r\n2. 是否應該在次級模塊中引用lilaclib？或者是將被引用的那個函數（`edit_file`）移至（另一個？）次級模塊中的某個地方？"}}
{"actor":{"display_login":"renyuneyun"}}