You are not logged in.

#1 2016-02-28 17:55:03

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Overidding default arguments passed to makepkg through makechrootpkg

I'd like to be prompted when running makechrootpkg but am unsure how to override the implicit --noprompt default that makechrootpkg passes to makepkg. 

% makechrootpkg -help
Usage: makechrootpkg [options] -r <chrootdir> [--] [makepkg args]
 Run this script in a PKGBUILD dir to build a package inside a
 clean chroot. Arguments passed to this script after the
 end-of-options marker (--) will be passed to makepkg.

 The chroot dir consists of the following directories:
 <chrootdir>/{root, copy} but only "root" is required
 by default. The working copy will be created as needed

The chroot "root" directory must be created via the following
command:
    mkarchroot <chrootdir>/root base-devel

Default makepkg args: -s --noconfirm -L --holdver

For example, building vlc hich needs phonon-qt4-backend (and 2 packages provide this):

% sudo makechrootpkg -r /scratch/.chroot64/ -- -s

But makepkg auto selects the first of them without prompting:

...
==> Making package: vlc 2.2.2-2 (Sun Feb 28 12:49:20 EST 2016)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
:: There are 4 providers available for libgl:
:: Repository extra
   1) mesa-libgl  2) nvidia-304xx-libgl  3) nvidia-340xx-libgl  4) nvidia-libgl

Enter a number (default=1): 
:: There are 2 providers available for libx264.so=148-64:
:: Repository extra
   1) libx264  2) libx264-10bit

Enter a number (default=1): 
...

Last edited by graysky (2016-02-28 17:56:01)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2016-02-28 18:01:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: Overidding default arguments passed to makepkg through makechrootpkg

Why does it matter? If you really need this for some strange reason, you should be able to tell it to install a package file specifically with the -I option.

Last edited by Scimmia (2016-02-28 18:02:22)

Offline

#3 2016-02-28 18:08:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Overidding default arguments passed to makepkg through makechrootpkg

Agreed, but that isn't general.  Seems like there should be a method to override one or more of the defaults.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-02-29 01:30:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: Overidding default arguments passed to makepkg through makechrootpkg

The point of multiple packages "provide"ing the same thing is that they all satisfy the dep. It shouldn't matter which one is installed in the chroot.

Offline

#5 2016-02-29 20:13:15

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Overidding default arguments passed to makepkg through makechrootpkg

It wasn't clear to me that all flavors of a dependency were identical.  For example, above, libx264.so=148-64 is supplied by libx264 and libx264-10bit and it isn't clear to me that that particular dep is the same in each packages.  You're suggesting that it is in fact the same or even identical?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2016-02-29 20:26:53

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Overidding default arguments passed to makepkg through makechrootpkg

Sure they are. See the PKGBUILD: https://projects.archlinux.org/svntogit … kages/x264

Same library but built with a better (and slower) bit depth.
And the default selection is surely always a reasonable choice for chroot building.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2016-02-29 20:48:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Overidding default arguments passed to makepkg through makechrootpkg

OK.  Perhaps the premise of my reasoning for wanting this feature was flawed.  My question remains though:  is it possible to override, not just add to the default options that makechrootpkg passes to makepkg, namely: `-s --noconfirm -L --holdver`?

Last edited by graysky (2016-02-29 21:00:33)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2016-02-29 20:53:17

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Overidding default arguments passed to makepkg through makechrootpkg

No, is there a compelling use case for adding that?

...

And I would think that is makepkg's responsibility (later options negating earlier options).

But makepkg doesn't have a corresponding --confirm option (or any negation options).

Last edited by eschwartz (2016-02-29 20:55:05)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2016-02-29 21:10:12

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Overidding default arguments passed to makepkg through makechrootpkg

I assume this is related to ccm. I don't know how it's considered etiquette-wise, but I re-implemented makechrootpkg in my chroot manager script because I needed something that was too specialized to request as a feature.

FTR, I don't have any immediate plans to release my script, but I put the relevant code in it's own 'section' (indicated by comments) and made clear its origin.

Edit: 're-implement' makes it sound like I re-wrote it. It was largely copy-pasta.

Last edited by alphaniner (2016-02-29 21:51:10)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB