Closed yan12125 closed 5 years ago
不会啊,这种情况是支持的:
结果:
>>> py test-lilac-dep.py
Dependency(pkgdir=PosixPath('/ldata/src/archgitrepo/libsysstat-git'), pkgname='libsysstat-git')
Dependency(pkgdir=PosixPath('/ldata/src/archgitrepo/lxqt-globalkeys-git'), pkgname='lxqt-globalkeys-git')
Dependency(pkgdir=PosixPath('/ldata/src/archgitrepo/liblxqt-git'), pkgname='liblxqt-git')
Dependency(pkgdir=PosixPath('/ldata/src/archgitrepo/libqtxdg-git'), pkgname='libqtxdg-git')
Dependency(pkgdir=PosixPath('/ldata/src/archgitrepo/lxqt-build-tools-git'), pkgname='lxqt-build-tools-git')
依赖解析的代码在这里:
(那块折叠的是什么语法啊。。。)
Hmm 那我研究下為啥Lilac的指令沒有包含libqtxdg-git
命令执行失败! 命令 ['extra-x86_64-build', '--', '-I', PosixPath('/home/lilydjwg/archgitrepo/libsysstat-git/libsysstat-git-0.4.1.4.gef0e4de-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/lxqt-globalkeys-git/lxqt-globalkeys-git-0.13.0.76.g7ac6ecb-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/liblxqt-git/liblxqt-git-0.13.0.110.g0a6ae1d-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/lxqt-build-tools-git/lxqt-build-tools-git-0.5.0.16.g72e5bf0-1-any.pkg.tar.xz'), '-d', '/home/lilydjwg/.cargo:/build/.cargo', '--', '--holdver'] 返回了错误号 255。命令的输出如下: :: Synchronizing package databases... core is up to date extra is up to date community is up to date :: Starting full system upgrade... there is nothing to do ==> Building in chroot for [extra] (x86_64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [lilydjwg]...done loading packages... resolving dependencies... :: There are 2 providers available for libgl: :: Repository extra 1) libglvnd 2) nvidia-340xx-utils Enter a number (default=1): warning: cannot resolve "libqtxdg-git", a dependency of "liblxqt-git" warning: cannot resolve "liblxqt-git", a dependency of "lxqt-globalkeys-git" warning: cannot resolve "libqtxdg-git", a dependency of "liblxqt-git" :: The following packages cannot be upgraded due to unresolvable dependencies: lxqt-globalkeys-git liblxqt-git :: Do you want to skip the above packages for this upgrade? [y/N] error: failed to prepare transaction (could not satisfy dependencies) :: unable to satisfy dependency 'libqtxdg-git' required by liblxqt-git :: unable to satisfy dependency 'liblxqt-git' required by lxqt-globalkeys-git :: unable to satisfy dependency 'libqtxdg-git' required by liblxqt-git ==> Making package: lxqt-panel-git 0.13.0.1103.g5c4e722a-1 (Tue Dec 11 11:31:35 2018) ==> Retrieving sources... -> Updating lxqt-panel git repo... Fetching origin ==> Validating source files with sha256sums... lxqt-panel ... Skipped ==> Making package: lxqt-panel-git 0.13.0.1103.g5c4e722a-1 (Tue 11 Dec 2018 11:31:37 AM CST) ==> Checking runtime dependencies... ==> Installing missing dependencies... error: target not found: libsysstat-git error: target not found: lxqt-globalkeys-git ==> ERROR: 'pacman' failed to install missing dependencies. ==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/lilydjwg/build 调用栈如下: Traceback (most recent call last): File "/home/lilydjwg/soft/lilac/lilac", line 89, in build_package bindmounts = BIND_MOUNTS, File "/home/lilydjwg/soft/lilac/lilac2/building.py", line 72, in lilac_build build_prefix, depend_packages, bindmounts, makechrootpkg_args) File "/home/lilydjwg/soft/lilac/lilac2/building.py", line 117, in call_build_cmd build_output = run_cmd(cmd, use_pty=True) File "/home/lilydjwg/soft/lilac/lilac2/cmd.py", line 103, in run_cmd raise subprocess.CalledProcessError(code, cmd, outs) subprocess.CalledProcessError: Command '['extra-x86_64-build', '--', '-I', PosixPath('/home/lilydjwg/archgitrepo/libsysstat-git/libsysstat-git-0.4.1.4.gef0e4de-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/lxqt-globalkeys-git/lxqt-globalkeys-git-0.13.0.76.g7ac6ecb-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/liblxqt-git/liblxqt-git-0.13.0.110.g0a6ae1d-1-x86_64.pkg.tar.xz'), '-I', PosixPath('/home/lilydjwg/archgitrepo/lxqt-build-tools-git/lxqt-build-tools-git-0.5.0.16.g72e5bf0-1-any.pkg.tar.xz'), '-d', '/home/lilydjwg/.cargo:/build/.cargo', '--', '--holdver']' returned non-zero exit status 255.
@petronny: summary & details~
@yan12125 这是什么时候的日志?
我從我的信箱複製出來的。編譯機上的話是從lilac-log/2018-12-11T09:03:01
這個檔案的146379行開始。
咦,好奇怪,明明别的都解析出来了,为什么就这个 lxqt-panel-git 的少了一个呢……
我在我的機器上跑test-lilac-dep.py
,的確少了一個包:
$ PYTHONPATH=./vendor python t.py
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/liblxqt-git'), pkgname='liblxqt-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-build-tools-git'), pkgname='lxqt-build-tools-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/libsysstat-git'), pkgname='libsysstat-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-globalkeys-git'), pkgname='lxqt-globalkeys-git')
百合是不是有些code沒有commit上去?
lilac: 9ce5f09dbb294e7d2ab662976b0dea23d2f89515 with archlinuxcn/repo@68142e1a4a69081bb93890826a604b52c5ede77c
同样的 commit,结果不同……大概和加载顺序有关。
FWIW, 我的機器上順序是這樣:
libsysstat-git
lxqt-build-tools-git
libqtxdg-git
lxqt-globalkeys-git
lxqt-panel-git
liblxqt-git
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-globalkeys-git'), pkgname='lxqt-globalkeys-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/liblxqt-git'), pkgname='liblxqt-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/libsysstat-git'), pkgname='libsysstat-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-build-tools-git'), pkgname='lxqt-build-tools-git')
(我在lilacpy.py裡,load_lilac()之前加print)
libsysstat-git
lxqt-build-tools-git
liblxqt-git
libqtxdg-git
lxqt-globalkeys-git
lxqt-panel-git
果然……
@yan12125 试试 1c3dd4a15fd65e934ecee30a1bbf4221006b0e2e?
It works :)
libsysstat-git
lxqt-build-tools-git
libqtxdg-git
lxqt-globalkeys-git
lxqt-panel-git
liblxqt-git
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/liblxqt-git'), pkgname='liblxqt-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-build-tools-git'), pkgname='lxqt-build-tools-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/lxqt-globalkeys-git'), pkgname='lxqt-globalkeys-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/libqtxdg-git'), pkgname='libqtxdg-git')
Dependency(pkgdir=PosixPath('../aur/archlinuxcn-repo/libsysstat-git'), pkgname='libsysstat-git')
好耶~
This is how current Lilac resolves dependencies:
https://github.com/archlinuxcn/lilac/blob/87465706360168f3a0cce49cb68f8aafd8ca5dff/lilac2/building.py#L53-L61
It cannot resolve dependencies more than two layers. An example is lxqt-panel-git, whose dependency tree is:
A solution (workaround?) is using
archlinux-x86_64
as the build prefix.看了下Lilac的代碼,修好這個問題似乎得改不少地方,因此先開個坑,有空再研究。