Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 759244 - app-portage/smart-live-rebuild-1.3.6 should to pass --getbinpkg=n to emerge, not just --usepkg=n
Summary: app-portage/smart-live-rebuild-1.3.6 should to pass --getbinpkg=n to emerge, ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-09 16:46 UTC by flippynelle
Modified: 2023-08-24 20:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flippynelle 2020-12-09 16:46:52 UTC
in order to bypass a FEATURES=getbinpkg in make.conf, smart-live-rebuild ought to pass --getbinpkg=n  to emerge, which will work assuming bug https://bugs.gentoo.org/759067 is fixed.


Reproducible: Always

Steps to Reproduce:
1. have "FEATURES=getbinpkg" in /etc/portage/make.conf
2. have /etc/portage/binrepos.conf 
sample contents:

[var-cache-binpkgs--local-binhost]
priority = 5000
sync-uri = file:///var/cache/binpkgs

2. run 'smart-live-rebuild'


Actual Results:  
*** Found 4 packages to rebuild (out of 10 live packages).
->  emerge --oneshot --usepkg=n sys-apps/util-linux:0 app-editors/vim-core:0 app-editors/vim:0 sys-apps/busybox:0

These are the packages that would be merged, in order:

Calculating dependencies... done!
[binary   R   *] sys-apps/busybox-9999-1 
[binary   R   *] app-editors/vim-core-9999-1 
[binary   R   *] sys-apps/util-linux-9999-1 
[binary   R   *] app-editors/vim-9999-1 

Would you like to merge these packages? [Yes/No] n


Expected Results:  
*** Found 4 packages to rebuild (out of 10 live packages).
->  emerge --oneshot --usepkg=n --getbinpkg=n sys-apps/util-linux:0 app-editors/vim-core:0 app-editors/vim:0 sys-apps/busybox:0

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] sys-apps/busybox-9999-1 
[ebuild   R   *] app-editors/vim-core-9999-1 
[ebuild   R   *] sys-apps/util-linux-9999-1 
[ebuild   R   *] app-editors/vim-9999-1 

Would you like to merge these packages? [Yes/No] n


idea for a patch:

Index: /var/tmp/portage/app-portage/smart-live-rebuild-1.3.6/work/smart-live-rebuild-1.3.6/smartliverebuild/cli.py
===================================================================
--- .orig/smartliverebuild/cli.py
+++ mod/smartliverebuild/cli.py
@@ -151,7 +151,7 @@ def main(argv):
 			print(p)
 		return 0
 	else:
-		cmd = ['emerge', '--oneshot', '--usepkg=n']
+		cmd = ['emerge', '--oneshot', '--usepkg=n', '--getbinpkg=n']
 		cmd.extend(args)
 		cmd.extend(packages)
 		out.s2(' '.join(cmd))
Comment 1 Zac Medico gentoo-dev 2020-12-10 00:09:42 UTC
Maybe we can make --usepkg=n imply --getbinpkg=n.
Comment 2 flippynelle 2020-12-10 01:09:13 UTC
(In reply to Zac Medico from comment #1)
> Maybe we can make --usepkg=n imply --getbinpkg=n.

Maybe, I don't know. Do the docs allow for it? I'm unsure... grr

       --getbinpkg [ y | n ], -g
              Using the server and location defined in PORTAGE_BINHOST (see make.conf(5)), portage will download the in‐
              formation  from  each  binary  package found and it will use that information to help build the dependency
              list.  This option implies -k.  (Use -gK for binary-only merging.)

       --getbinpkgonly [ y | n ], -G
              This option is identical to -g, as above, except binaries from the remote server are preferred over  local
              packages if they are not identical.


       --usepkg [ y | n ], -k
              Tells emerge to use binary packages (from $PKGDIR) if they are  available,  thus  possibly  avoiding  some
              time-consuming compiles.  This option is useful for CD installs; you can export PKGDIR=/mnt/cdrom/packages
              and then use this option to have emerge "pull" binary packages from the CD in order to  satisfy  dependen‐
              cies.

       --usepkgonly [ y | n ], -K
              Tells emerge to only use binary packages (from $PKGDIR).  All the binary packages must be available at the
              time of dependency calculation or emerge will simply abort.  Portage does not use ebuild repositories when
              calculating dependency information so all masking information is ignored.
Comment 3 Zac Medico gentoo-dev 2020-12-10 01:49:24 UTC
We can update the docs. The --getbinpkg option has implies --usepkg, and I don't see any reason why --usepkg=n should not imply --getbinpkg=n.
Comment 4 Adjudicator Darren 2021-01-24 18:00:21 UTC
This got fixed in app-portage/smart-live-rebuild-1.3.7

eg. it does this:

->  emerge --oneshot --getbinpkg=n --usepkg-exclude app-editors/vim-core:0 app-editors/vim:0 app-editors/vim-core:0 app-editors/vim:0

which is pretty smart, imho. Thanks!
Comment 5 Adjudicator Darren 2021-01-24 18:44:15 UTC
Could that --usepkg-exclude change (and the --getbinpkg=n) be done for 'revdep-rebuild' too ?

because I'm getting this:

# time revdep-rebuild
 * This is the new python coded version
 * Please report any bugs found using it.
 * The original revdep-rebuild script is installed as revdep-rebuild.sh
 * Please file bugs at: https://bugs.gentoo.org/
 * Checking dynamic linking consistency
 * Assign files to packages

emerge  --oneshot --complete-graph=y media-sound/pulseaudio:0 media-libs/libsndfile:0

These are the packages that would be merged, in reverse order:

Calculating dependencies  ...... done!
[binary   R    ] media-sound/pulseaudio-13.0-r1-2 
[binary   R    ]  media-libs/libsndfile-1.0.31-1 

Would you like to merge these packages? [Yes/No] n

Quitting.
Comment 6 Adjudicator Darren 2021-01-24 18:45:43 UTC
(In reply to Adjudicator Darren from comment #5)
> Could that --usepkg-exclude change (and the --getbinpkg=n) be done for
> 'revdep-rebuild' too ?
> 
> because I'm getting this:
> 
> # time revdep-rebuild
>  * This is the new python coded version
>  * Please report any bugs found using it.
>  * The original revdep-rebuild script is installed as revdep-rebuild.sh
>  * Please file bugs at: https://bugs.gentoo.org/
>  * Checking dynamic linking consistency
>  * Assign files to packages
> 
> emerge  --oneshot --complete-graph=y media-sound/pulseaudio:0
> media-libs/libsndfile:0
> 
> These are the packages that would be merged, in reverse order:
> 
> Calculating dependencies  ...... done!
> [binary   R    ] media-sound/pulseaudio-13.0-r1-2 
> [binary   R    ]  media-libs/libsndfile-1.0.31-1 
> 
> Would you like to merge these packages? [Yes/No] n
> 
> Quitting.


forgot to mention workaround:

# revdep-rebuild -- --getbinpkg=n --usepkg=n