Re: [gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On 11/13/19 2:02 PM, Joakim Tjernlund wrote: > On Wed, 2019-11-13 at 11:07 -0800, Zac Medico wrote: >> On 11/8/19 9:09 AM, Joakim Tjernlund wrote: >>> On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: I am looking for a way to seed emerge with an older pkg db so emerge can calculate which packages needs to be rebuild/upgraded in order to get to the same state as the system pkg db, Is that possible? Also, is there some tool that allows med to copy just files needed for a profile? Something like "cp" /etc/portage/make.profile /my/destination >>> >>> portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use >>> different VDBs/EDBs >>> Does portage have something similar? >> >> No, nothing like either of those things. >> >> However, if you want to operate on an old system then the usual >> recommendation is to unpack a stage3 and bind mount the old system root >> into the stage3 so that you can chroot into the stage3 and run something >> like this: >> >> emerge --root /mnt/old-system portage > > Nice trick, but not quite what I want to do. > Simply described I build binary pkgs which I tar together, transfer to an > remote embedded system > and install these using qmerge(from portage-utils) > > The problem is how make sure I got just the pkgs I need. > > I build binary pkgs on the same HW using emerge and this is performed over > time and > when release comes I package those bin pkgs and at that time I need some way > to make sure > I got what the right pkgs. I figured I could use emerge to generate the > difference > for me and the compare that list with the bin pkgs I have. > > Maybe there is a simpler way to do this? I have the old VDB and the new VDB > I need this list to be in dependency order too. If you have a copy of the old VDB located at /mnt/old-root/var/db/pkg then you can just do something like this to see what packages it will install: emerge -pv --usepkgonly --root /mnt/old-root [atom]... Also if you have the old portage config located at /mnt/old-root/etc/portage then you can add --config-root /mnt/old-root to your emerge options. -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On Wed, 2019-11-13 at 11:07 -0800, Zac Medico wrote: > On 11/8/19 9:09 AM, Joakim Tjernlund wrote: > > On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: > >> I am looking for a way to seed emerge with an older pkg db so emerge can > >> calculate > >> which packages needs to be rebuild/upgraded in order to get to the same > >> state as the system pkg db, > >> Is that possible? > >> > >> Also, is there some tool that allows med to copy just files needed for a > >> profile? > >> Something like "cp" /etc/portage/make.profile /my/destination > >> > > > > portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use > > different VDBs/EDBs > > Does portage have something similar? > > No, nothing like either of those things. > > However, if you want to operate on an old system then the usual > recommendation is to unpack a stage3 and bind mount the old system root > into the stage3 so that you can chroot into the stage3 and run something > like this: > > emerge --root /mnt/old-system portage Nice trick, but not quite what I want to do. Simply described I build binary pkgs which I tar together, transfer to an remote embedded system and install these using qmerge(from portage-utils) The problem is how make sure I got just the pkgs I need. I build binary pkgs on the same HW using emerge and this is performed over time and when release comes I package those bin pkgs and at that time I need some way to make sure I got what the right pkgs. I figured I could use emerge to generate the difference for me and the compare that list with the bin pkgs I have. Maybe there is a simpler way to do this? I have the old VDB and the new VDB I need this list to be in dependency order too. Jocke
Re: [gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On 11/13/19 11:34 AM, Michael 'veremitz' Everitt wrote: > On 13/11/19 19:07, Zac Medico wrote: >> On 11/8/19 9:09 AM, Joakim Tjernlund wrote: >>> On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: I am looking for a way to seed emerge with an older pkg db so emerge can calculate which packages needs to be rebuild/upgraded in order to get to the same state as the system pkg db, Is that possible? Also, is there some tool that allows med to copy just files needed for a profile? Something like "cp" /etc/portage/make.profile /my/destination >>> portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use >>> different VDBs/EDBs >>> Does portage have something similar? >> No, nothing like either of those things. >> >> However, if you want to operate on an old system then the usual >> recommendation is to unpack a stage3 and bind mount the old system root >> into the stage3 so that you can chroot into the stage3 and run something >> like this: >> >> emerge --root /mnt/old-system portage > In the interests of clarity, what does this achieve, and what would the > next couple of steps look like? > (actual commands not necessary, pseudo-code WFM) On old systems, upgrading can be difficult or impossible since you may not have the dependencies needed to build/install the current ebuilds that are available. Unpacking a fresh stage3 gives you access to the latest system packages, so in theory you can use those to build/install any of the current ebuilds that are available. For example, if the old system's portage only supports EAPI 4, then it's impossible to upgrade since gentoo/profiles/base/eapi contains EAPI 5. So, you need to use a command like the one I posted above to upgrade portage to a version that supports EAPI 5. -- Thanks, Zac signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On 13/11/19 19:07, Zac Medico wrote: > On 11/8/19 9:09 AM, Joakim Tjernlund wrote: >> On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: >>> I am looking for a way to seed emerge with an older pkg db so emerge can >>> calculate >>> which packages needs to be rebuild/upgraded in order to get to the same >>> state as the system pkg db, >>> Is that possible? >>> >>> Also, is there some tool that allows med to copy just files needed for a >>> profile? >>> Something like "cp" /etc/portage/make.profile /my/destination >>> >> portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use >> different VDBs/EDBs >> Does portage have something similar? > No, nothing like either of those things. > > However, if you want to operate on an old system then the usual > recommendation is to unpack a stage3 and bind mount the old system root > into the stage3 so that you can chroot into the stage3 and run something > like this: > > emerge --root /mnt/old-system portage In the interests of clarity, what does this achieve, and what would the next couple of steps look like? (actual commands not necessary, pseudo-code WFM) signature.asc Description: OpenPGP digital signature
Re: [gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On 11/8/19 9:09 AM, Joakim Tjernlund wrote: > On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: >> I am looking for a way to seed emerge with an older pkg db so emerge can >> calculate >> which packages needs to be rebuild/upgraded in order to get to the same >> state as the system pkg db, >> Is that possible? >> >> Also, is there some tool that allows med to copy just files needed for a >> profile? >> Something like "cp" /etc/portage/make.profile /my/destination >> > > portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use > different VDBs/EDBs > Does portage have something similar? No, nothing like either of those things. However, if you want to operate on an old system then the usual recommendation is to unpack a stage3 and bind mount the old system root into the stage3 so that you can chroot into the stage3 and run something like this: emerge --root /mnt/old-system portage -- Thanks, Zac signature.asc Description: OpenPGP digital signature
[gentoo-portage-dev] Re: seed emerge with old /var/db/pkg ?
On Fri, 2019-11-08 at 01:57 +0100, Joakim Tjernlund wrote: > I am looking for a way to seed emerge with an older pkg db so emerge can > calculate > which packages needs to be rebuild/upgraded in order to get to the same state > as the system pkg db, > Is that possible? > > Also, is there some tool that allows med to copy just files needed for a > profile? > Something like "cp" /etc/portage/make.profile /my/destination > portage-utils has variables Q_VDB and Q_EDB which allows qmerge to use different VDBs/EDBs Does portage have something similar?