Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File rename fails with --allsource #538

Closed
pvsr opened this issue Jun 23, 2019 · 6 comments · Fixed by #595
Closed

File rename fails with --allsource #538

pvsr opened this issue Jun 23, 2019 · 6 comments · Fixed by #595

Comments

@pvsr
Copy link

pvsr commented Jun 23, 2019

Any package I try to install with --allsource errors out with something like this:

==> Making package: aura-git 2.0.0.r1465.4c6c481-2 (Sat 22 Jun 2019 08:40:12 PM EDT)
==> Retrieving sources...
  -> Cloning aura-git git repo...
Cloning into bare repository '/tmp/aura-git-3765352355900081325/aura-git/aura-git'...
remote: Enumerating objects: 565, done.
remote: Counting objects: 100% (565/565), done.
remote: Compressing objects: 100% (215/215), done.
remote: Total 11068 (delta 344), reused 478 (delta 297), pack-reused 10503
Receiving objects: 100% (11068/11068), 5.09 MiB | 5.28 MiB/s, done.
Resolving deltas: 100% (7115/7115), done.
==> Validating source files with md5sums...
    aura-git ... Skipped
==> Entering fakeroot environment...
==> Creating source package...
  -> Adding PKGBUILD...
  -> Generating .SRCINFO file...
  -> Adding aura-git...
  -> Compressing source package...
==> Leaving fakeroot environment.
==> Source package created: aura-git (Sat 22 Jun 2019 08:40:14 PM EDT)
==> Making package: aura-git 2.0.0.r1465.4c6c481-2 (Sat 22 Jun 2019 08:40:15 PM EDT)
==> ERROR: A source package has already been built. (use -f to overwrite)
aura: /tmp/aura-git-3765352355900081325/aura-git/aura-git-2.0.0.r1465.4c6c481-2.src.tar.gz: renameFile:renamePath:rename: unsupported operation (Invalid cross-device link)

I have / and /boot on two partitions of the same device and another drive mounted under /media, so I don't know where the cross-device thing is coming from. This is with the current git master.

@fosskers
Copy link
Owner

This was a problem quite a long time ago, when packages were built in /tmp. Let me check this again.

@fosskers
Copy link
Owner

Ah my mistake - it seems that the --allsource functionality we had given Aura is just completely broken. Fixing it now.

@fosskers
Copy link
Owner

fosskers commented May 13, 2020

git clone https://aur.archlinux.org/aura-bin.git
cd aura-bin
makepkg --allsource
# ... Work ...
ls

and we see:

aura-2.3.0-x86_64.tar.gz  aura-bin-2.3.0-1.src.tar.gz  PKGBUILD  src/

Where aura-bin-2.3.0-1.src.tar.gz is the tarball produced by --allsource.
It seems that Aura's --allsource is able to get this far too, but then gets confused about what to do with the file afterwards. I think we expected behaviour would be to just leave it, and not try and copy it to the package cache with the intent of installing it, since there's nothing to install.

@fosskers
Copy link
Owner

fosskers commented May 13, 2020

colin@yumi ~/beef> sudo aura -Ax aura-bin --allsource
[sudo] password for colin: 
aura >>= Determining dependencies...
aura >>= AUR Packages:
aura-bin
aura >>= Continue? [Y/n] 
aura >>= Building aura-bin...
# ... Work ...
==> Leaving fakeroot environment.
==> Source package created: aura-bin (Wed 13 May 2020 10:45:26 AM PDT)
==> Making package: aura-bin 2.3.0-1 (Wed 13 May 2020 10:45:27 AM PDT)
==> ERROR: A source package has already been built. (use -f to overwrite)
aura: /home/colin/beef/aura-bin-1553585085333874906/aura-bin/aura-bin-2.3.0-1.src.tar.gz: renameFile:renamePath:rename: does not exist (No such file or directory)

Notice Source package created. We don't see that message when building normally, so we know --allsource is at least being passed down to makepkg properly.

@fosskers
Copy link
Owner

fosskers commented May 13, 2020

Nevermind, we do copy it to a deterministic location:

srcPkgStore :: FilePath
srcPkgStore = "/var/cache/aura/src"

The problem here is that when --allsource is called by Aura, it is running makepkg twice. I think use of --allsource should prevent the build, and just produce the .src.tar.gz.

@fosskers fosskers linked a pull request May 13, 2020 that will close this issue
@fosskers
Copy link
Owner

Fixed. The change will be included in Aura's upcoming release. Thanks for your patience, and sorry about the wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants