repo icon indicating copy to clipboard operation
repo copied to clipboard

Hooks (part 1)

Open lilydjwg opened this issue 8 years ago • 25 comments

See here for more info.

Update 2024-08-04:

  • [ ] eka2l1-git (@heavysink)
  • [x] emacs-org-mode-git (@yuyichao)
  • [ ] gconf (@ykelvis)
  • [x] gdb-git (@yuyichao)
  • [ ] go-for-it-git (@ykelvis)
  • [ ] jdownloader2 (@heavysink)
  • [ ] konsole-git (@axionl)
  • [x] menulibre (@Integral-Tech)
  • [x] notion-app-enhanced (@yuyichao)
  • [ ] osdlyrics-git (@heavysink)
  • [ ] panoply (@heavysink)
  • [ ] pnmixer (@ykelvis)
  • [ ] rstudio-desktop-bin (@xgdgsc)
  • [ ] snes9x-git (@heavysink)
  • [x] vlc-nox (@roaldclark)

lilydjwg avatar May 04 '16 03:05 lilydjwg

There is a rough way to find which packages need to be fixed by using the one-line script:

cd repo; find -name '*.install' -exec grep '\(update-desktop-database\|update-mime-database\|install-info\|glib-compile-schemes\|gtk-update-icon-cache\|xdg-icon-resource\|gconf\|gio-querymodules\)' {} +|cut -d'/' -f2|sort -u|sed 's/^/* [ ] /'

Related articles:

zsrkmyn avatar May 04 '16 06:05 zsrkmyn

Is it enough to just rebuild our packages, or do we have to wait for someone to change the PKGBUILD first?

colinkeenan avatar May 04 '16 15:05 colinkeenan

IIUC you should delete the unnecessary install script, update pkgrel and rebuild.

yuyichao avatar May 04 '16 15:05 yuyichao

Or, just delete those lines from the install script? If deleting the install script, I would also need to remove install="${pkgname}.install" from the PKGBUILD.

On Wed, May 4, 2016 at 10:42 AM, Yichao Yu [email protected] wrote:

IIUC you should delete the unnecessary install script, update pkgrel and rebuild.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/archlinuxcn/repo/issues/233#issuecomment-216906585

colinkeenan avatar May 04 '16 15:05 colinkeenan

@colinkeenan We need to remove the calls to update-desktop-database/gtk-update-icon-cache/... from the $pkgname.install file (and remove the $pkgname.install file also if nothing is left), but remember to KEEP the dependencies (i.e. leave depends array untouched).

My opinion is that if the PKGBUILD came from AUR and still tracks AUR, we can wait for AUR maintainer to do the change and rebuild accordingly. The only drawback of not rebuilding is to run those commands twice, once in the .install script and once in the hooks, so not a severe issue.

farseerfc avatar May 04 '16 15:05 farseerfc

When I try to rm the .install file from AUR, at git push I get an error

remote: error: missing source file: mendeleydesktop.install
remote: error: hook declined to update refs/heads/master
To ssh://[email protected]/mendeleydesktop.git
 ! [remote rejected] master -> master (hook declined)

How to solve this?

xgdgsc avatar May 05 '16 02:05 xgdgsc

Remember to run: makepkg --printsrcinfo >.SRCINFO every time you create a commit for AUR. You may need to use git commit --amend now to rewrite history.

farseerfc avatar May 05 '16 03:05 farseerfc

you can just use mksrcinfo

On Wed, May 4, 2016 at 10:33 PM, Jiachen Yang [email protected] wrote:

Remember to run: makepkg --printsrcinfo >.SRCINFO every time you create a commit for AUR. You may need to use git commit --amend now to rewrite history.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/archlinuxcn/repo/issues/233#issuecomment-217070379

colinkeenan avatar May 05 '16 03:05 colinkeenan

So the mksrcinfo must be in the same commit as the git rm? I did that in a later commit. I will try again.

xgdgsc avatar May 05 '16 05:05 xgdgsc

Yes they must in the same commit. You need to rewrite the history.

farseerfc avatar May 05 '16 05:05 farseerfc

好多还没有处理的包啊。

lilydjwg avatar May 09 '16 02:05 lilydjwg

这些命令被删除是因为被弃用了吗?

petronny avatar May 15 '16 11:05 petronny

因为会自动检测运行.

yuyichao avatar May 15 '16 12:05 yuyichao

@petronny, 因为 alpm-hooks 在 pacman 更新/删除/安装软件包的时候会检测文件或软件包变动,然后执行相关指令。好处在于多个包对于一个 hook 的话不会重复执行。比如安装了多个 ttf-* 字体,只会在安装完毕后执行一次/usr/bin/fc-cache -s,减少重复的工作以及简化.install脚本。 看这里的 Related articles 啦。

zsrkmyn avatar May 15 '16 12:05 zsrkmyn

原来如此。。总之我先通知AUR的维护者了

petronny avatar May 15 '16 15:05 petronny

这里还有多少包没有完成呀?

lilydjwg avatar Jul 16 '16 10:07 lilydjwg

我对现在的repo重跑了一遍@zsrkmyn的命令,并更新了一下list

petronny avatar Sep 04 '16 04:09 petronny

我重新生成了一个新 list,放到第一个评论里了。 还有好多包……

lilydjwg avatar Jan 13 '17 04:01 lilydjwg

更新了list

petronny avatar May 24 '19 10:05 petronny

list updated again.

lilydjwg avatar Aug 14 '19 07:08 lilydjwg

list updated again again.

SilverRainZ avatar Nov 04 '21 17:11 SilverRainZ