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

[yay v12] Selective local install for meta package #1899

Closed
HLFH opened this issue Jan 23, 2023 · 3 comments · Fixed by #1903
Closed

[yay v12] Selective local install for meta package #1899

HLFH opened this issue Jan 23, 2023 · 3 comments · Fixed by #1903
Labels
Status: Approved Feature Request or Enchancement has been approved. Type: Feature Request

Comments

@HLFH
Copy link

HLFH commented Jan 23, 2023

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

I am using the next branch using the yay-git AUR package.
I wanted to install the new version of postfix 3.7.4 that has been released upstream but not on Arch Linux.
To do that:

yay -G postfix
cd postfix/repos/extra-x86_64 
vim PKGBUILD

And replace

pkgver=3.7.3
pkgrel=4

by:

pkgver=3.7.4
pkgrel=1

And remove linux6.patch from source.
And remove from prepare():

  # support Linux 6.x
  patch -Np2 -d $pkgbase-$pkgver -i ../linux6.patch

Exit vim with :wq.

Then:

rm linux6.patch
updpkgsums
makepkg --printsrcinfo > .SRCINFO
git add PKGBUILD .SRCINFO linux6.patch
git commit -m 'postfix 3.7.4 release'
gpg --recv-keys 0C0B590E80CA15A7
cd ..
yay -Bi extra-x86_64 

Describe the solution you'd like

  1. When yay -Bi happens, the local changes should be taken but they are reversed if git add and git commit have not been used after the local changes.

  2. When I use yay -Bi, I think debugedit is a dependency? Can you add it to yay AUR package?
    And I'll ask as well to the maintainer of the yay-git AUR package, but if it is a necessary dep.

  -> Nettoyage des symboles inutiles dans les fichiers binaires et les bibliothèques…
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
/usr/share/makepkg/tidy/strip.sh: ligne 48: debugedit : commande introuvable
  1. We should be able to do a selective local install of a meta package
yay -Bi extra-x86_64 -m postfix,postfix-mysql

Instead of having offered every subpackage:

Paquets (8) postfix-3.7.4-1  postfix-cdb-3.7.4-1  postfix-ldap-3.7.4-1  postfix-lmdb-3.7.4-1  postfix-mysql-3.7.4-1  postfix-pcre-3.7.4-1  postfix-pgsql-3.7.4-1
            postfix-sqlite-3.7.4-1

Taille totale installée :      4,62 MiB
Taille de mise à jour nette :  0,19 MiB

:: Procéder à l’installation ? [O/n]  

Describe alternatives you've considered

yay -S postfix
And editing the PKGBUILD, which is nice, but I think the other option should exist, especially when you create locally your own meta packages from scratch and want to selectively install some of the subpackages but not all.

Furthermore, it does not seem to work: I am not able to edit the PKGBUILD during a reinstall process.
See: #1900

@HLFH HLFH added Status: Discussion Open Topic is being considered and open for discussion Type: Feature Request labels Jan 23, 2023
@HLFH
Copy link
Author

HLFH commented Jan 23, 2023

I suppose it does work with pikaur since 03/06/2021 but I'm using yay ;) I also had to install the asp dependency for ABS support in -G/--getpkgbuild operation.

yay -S pikaur
pikaur -S asp
pikaur -G postfix
cd postfix/repos/extra-x86_64

Then, edit as said above the PKGBUILD.
And:

updpkgsums
pikaur -Pi PKGBUILD
Lecture de la base locale du paquet…
Résolution des dépendances de l'AUR…
Lecture des bases de données du paquet…

:: Les paquets de l'AUR seront installés :
 postfix-cdb                                                -> 3.7.4-1
 postfix-ldap                                               -> 3.7.4-1
 postfix-lmdb                                               -> 3.7.4-1
 postfix-pcre                                               -> 3.7.4-1
 postfix-pgsql                                              -> 3.7.4-1
 postfix-sqlite                                             -> 3.7.4-1
 postfix                               3.7.3-4              -> 3.7.4-1
 postfix-mysql                         3.7.3-4              -> 3.7.4-1

:: Commencer l'installation ? [O/n]
:: [v]oir les détails du paquet   sélectionner [m]anuellement les paquets
>>> m

DELETE ALL with text editor but keep:

:: Les paquets de l'AUR seront installés :
 postfix                               3.7.3-4              -> 3.7.4-1
 postfix-mysql                         3.7.3-4              -> 3.7.4-1

And you get:

Résolution des dépendances de l'AUR…

:: Les paquets de l'AUR seront installés :
 postfix                               3.7.3-4              -> 3.7.4-1
 postfix-mysql                         3.7.3-4              -> 3.7.4-1

:: Commencer l'installation ? [O/n]
:: [v]oir les détails du paquet   sélectionner [m]anuellement les paquets
>>> O

@HLFH
Copy link
Author

HLFH commented Jan 23, 2023

And if the package is like an ABS-like package and not an AUR package, we should not need the .SRCINFO file for yay -Bi.

Something like that:

yay -Bi PKGBUILD -m postfix,postfix-mysql

@Jguer Jguer added Status: Approved Feature Request or Enchancement has been approved. and removed Status: Discussion Open Topic is being considered and open for discussion labels Jan 23, 2023
@Jguer
Copy link
Owner

Jguer commented Jan 23, 2023

yay currently reads SRCINFOs and not PKGBUILDs as they are more machine friendly and dynamic strings don't need to be calculated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Approved Feature Request or Enchancement has been approved. Type: Feature Request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants