archlinux / archlinux-repro

Tools to reproduce arch linux packages
MIT License
128 stars 35 forks source link

Clone from gitlab instead of using asp #124

Closed kpcyrd closed 1 year ago

kpcyrd commented 1 year ago

Current error:

(1/3) Rebuilding certificate stores...
(2/3) Warn about old perl modules
(3/3) Updating the info directory file...
Installing devtools from https://archive.archlinux.org/packages/d/devtools-1:1.0.0-1-any.pkg.tar.zst
loading packages...
looking for conflicting packages...

Packages (1) devtools-1:1.0.0-1

Total Installed Size:  0.23 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                         [#######################################] 100%
(1/1) checking package integrity                                       [#######################################] 100%
(1/1) loading package files                                            [#######################################] 100%
(1/1) checking for file conflicts                                      [#######################################] 100%
(1/1) checking available disk space                                    [#######################################] 100%
:: Processing package changes...
(1/1) installing devtools                                              [#######################################] 100%
Optional dependencies for devtools
    btrfs-progs: btrfs support
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
cp: cannot stat '/usr/share/devtools/makepkg-x86_64.conf': No such file or directory
  -> Delete snapshot for pmbootstrap_168102...

Permalink to a package to reproduce this with: https://archive.archlinux.org/repos/2023/05/25/extra/os/x86_64/doctl-1.96.0-1-x86_64.pkg.tar.zst

Foxboron commented 1 year ago

cp: cannot stat '/usr/share/devtools/makepkg-x86_64.conf': No such file or directory

The file has moved to /usr/share/devtools/makepkg.conf.d/x86_64.conf

Foxboron commented 1 year ago

Ah, that is very annoying as we need to special case this.

Foxboron commented 1 year ago
diff --git a/repro.in b/repro.in
index 7ce2528..9756428 100755
--- a/repro.in
+++ b/repro.in
@@ -497,7 +497,8 @@ if [[ "$DEVTOOLS_PKG" == https* ]]; then
 else
   pacman --noconfirm --needed -Sddu "$DEVTOOLS_PKG"
 fi
-cp -v /usr/share/devtools/makepkg-x86_64.conf /mnt/etc/makepkg.conf
+[[ -f /usr/share/devtools/makepkg-x86_64.conf ]] && cp -v /usr/share/devtools/makepkg-x86_64.conf /mnt/etc/makepkg.conf
+[[ -f /usr/share/devtools/makepkg.d/x86_64.conf ]] && cp -v /usr/share/devtools/makepkg.d/x86_64.conf /mnt/etc/makepkg.conf
 __END__
     lock_close 9 "$KEYRINGCACHE/$keyring_package.lock"

Should work

kpcyrd commented 1 year ago

I made it work with errexit and tested it with one package before the migration and one after

Foxboron commented 1 year ago

Awesome :) thanks!