yay icon indicating copy to clipboard operation
yay copied to clipboard

install dependencies before donwloading sources

Open LuckyTurtleDev opened this issue 4 years ago • 18 comments

Is your feature request related to a problem? Please describe.

If a dependency needed by an dlagent the installation failed. Because the yay only ~check~ install dependency after downloading the source.

Describe the solution you'd like

Yay should check and install dependency after cloning the AUR repo and before downloading the other source to satisfy also the dependency for the dlagents.

Describe alternatives you've considered

Installing dependency manual.

Additional context

DLAGENTS allow you fetch source from additional protocols. As example this is used by many gog packages.

LuckyTurtleDev avatar Jan 20 '21 13:01 LuckyTurtleDev

Yay resolves dependencies right at the start, before downloading sources and before cloning the aur package.

Morganamilo avatar Jan 20 '21 13:01 Morganamilo

Yay resolves dependencies right at the start, before downloading sources and before cloning the aur package.

If I try to install gog-ftl yay recognize the lgogodownloader dependency. But it try to download the sources of gog-ftl before compiling/installing lgogodownloader.

LuckyTurtleDev avatar Jan 20 '21 13:01 LuckyTurtleDev

I guess yay should not download all sources then start the building.

Morganamilo avatar Jan 20 '21 13:01 Morganamilo

I guess yay should not download all sources then start the building.

This should be a better behavior, which should fix the problem.

LuckyTurtleDev avatar Jan 20 '21 14:01 LuckyTurtleDev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 20 '21 20:05 stale[bot]

@Lukas1818 I tried implement needed behavior with new flag --one-by-one

demo on asciinema You can see code at here.

This behavior is what you want? If yes i will create PR.

x1b6e6 avatar May 21 '21 07:05 x1b6e6

I guess yay should not download all sources then start the building.

I think this made for possibility disconnect from internet after download all sources and building packages offline. This useful for systems what work in offline and connecting to internet only for updates (i haven't more ideas). After approving #1505 this behavior will be more comfortable.

x1b6e6 avatar May 21 '21 08:05 x1b6e6

@Lukas1818 I tried implement needed behavior with new flag --one-by-one

demo on asciinema You can see code at here.

This behavior is what you want? If yes i will create PR.

yes, thanks

But I think this may should the default behavior, because many package hit this problem, as example every -git package. Building offline, should effect less user. For this a --downlaod-first flag can be added.

LuckyTurtleDev avatar May 21 '21 10:05 LuckyTurtleDev

Every -git package? i don't think so. git is in base-devel so you should have it installed before using the AUR / yay. It seems like a relative corner-case that packages have their own custom downloader. Most packages do fine with curl/wget/ssh/ftp/git.

grandchild avatar May 21 '21 14:05 grandchild

Every -git package? i don't think so. git is in base-devel so you should have it installed before using the AUR / yay. It seems like a relative corner-case that packages have their own custom downloader. Most packages do fine with curl/wget/ssh/ftp/git.

git is not part of the base-devel group. see:https://archlinux.org/groups/x86_64/base-devel/

But you are right the most arch user will install git before installing yay, instead of downloading the build-files from the aur web-interface. But there exist also distributions, which are based on arch and which have yay in there official package source, as example the popular manjaro: https://discover.manjaro.org/packages/yay This users must not install git before installing yay.

LuckyTurtleDev avatar May 21 '21 15:05 LuckyTurtleDev

@Lukas1818 git not in base-devel but it will be installed before downloading sources because installing dependencies from repo is earlier than downloading (if git placed in deps).

This users must not installing git before installing yay.

yay depends on git in PKGBUILD

x1b6e6 avatar May 21 '21 15:05 x1b6e6

@Lukas1818 git not in base-devel but it will install before downloading sources because installing dependencies from repo is earlier than downloading.

This users must not installing git before installing yay.

yay depends on git in PKGBUILD

ok I did not see this. But it make scene because yay must download repositories from the aur.

LuckyTurtleDev avatar May 21 '21 15:05 LuckyTurtleDev

@Lukas1818 git not in base-devel but it will install before downloading sources because installing dependencies from repo is earlier than downloading (if git placed in deps).

This users must not installing git before installing yay.

yay depends on git in PKGBUILD

So this problem appear only if the downloader is in the aur? I did not notify this. I had thought this problem will be hit, every time you install an aur package, which need a downloader, which is not already installed.

LuckyTurtleDev avatar May 21 '21 15:05 LuckyTurtleDev

@Lukas1818 I tried implement needed behavior with new flag --one-by-one

It shouldn't be a flag, it should be the only option.

This users must not installing git before installing yay. yay depends on git in PKGBUILD

Yes but there's svn packages too, plus packages with custom downloaders. So the talk about git is irrelevant.

Morganamilo avatar May 21 '21 15:05 Morganamilo

So this problem appear only if the downloader is in the aur?

Yes. So i don't know how new flag --one-by-one is really need. Situation is very rare and i don't think what someone will use this because easier install one by one manually.

It shouldn't be a flag, it should be the only option.

Are you suggesting using this behavior by default?

x1b6e6 avatar May 21 '21 15:05 x1b6e6

Yes, it's the correct way to do things and there's no advantage to the current way really.

Morganamilo avatar May 21 '21 15:05 Morganamilo

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 19 '21 01:09 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 19 '22 23:01 stale[bot]