64studio / dibby

Generate Custom Debian images for your embedded projects
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Install custom Debian packages in the workspace as a task #12

Open obbardc opened 5 years ago

obbardc commented 5 years ago

The following installs all Debian packages in the workspace deb directory. Is installing all packages in that directory a good idea?

# install deb packages & fix depends
dpkg -i /mnt/workspace/debs/*.deb
apt-get install -f --yes
danielhjames commented 5 years ago

That is a good point, but I think one workspace per project is appropriate (i.e. if another project requires a different selection of local debs, it should probably have its own workspace). Alternatively the user can customise the task script.

As for using install -f that should work, but I will look into how gdebi-core does the dependency lookup, as that is more slick.

danielhjames commented 5 years ago

Good news, recent versions of apt support installing local debs as long as a deb of the same name isn't available from a configured repo (in which case the repo version is preferred). For example, after commenting out the 64 Studio repo from the local apt configuration:

sudo apt install ./dibby_0.0.1_all.deb 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'dibby' instead of './dibby_0.0.1_all.deb'
The following NEW packages will be installed:
  dibby
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/5,604 B of archives.
After this operation, 23.6 kB of additional disk space will be used.
Get:1 /home/daniel/64studio/dibby/dibby_0.0.1_all.deb dibby all 0.0.1 [5,604 B]
Selecting previously unselected package dibby.
(Reading database ... 282624 files and directories currently installed.)
Preparing to unpack .../dibby/dibby_0.0.1_all.deb ...
Unpacking dibby (0.0.1) ...
Setting up dibby (0.0.1) ...

It does need the ./ or full local path to find the local file.

obbardc commented 5 years ago

So how about installing custom versions of packages already in repositories?

On Tue, 30 Apr 2019 at 14:44, Daniel James notifications@github.com wrote:

Good news, recent versions of apt support installing local debs as long as a deb of the same name isn't available from a configured repo (in which case the repo version is preferred). For example, after commenting out the 64 Studio repo from the local apt configuration:

sudo apt install ./dibby_0.0.1_all.deb Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'dibby' instead of './dibby_0.0.1_all.deb' The following NEW packages will be installed: dibby 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. Need to get 0 B/5,604 B of archives. After this operation, 23.6 kB of additional disk space will be used. Get:1 /home/daniel/64studio/dibby/dibby_0.0.1_all.deb dibby all 0.0.1 [5,604 B] Selecting previously unselected package dibby. (Reading database ... 282624 files and directories currently installed.) Preparing to unpack .../dibby/dibby_0.0.1_all.deb ... Unpacking dibby (0.0.1) ... Setting up dibby (0.0.1) ...

It does need the ./ or full local path to find the local file.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/64studio/dibby/issues/12#issuecomment-487957572, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH3LVWBRC2CLTWXHU2UGHDPTBEJ7ANCNFSM4HJCWEQA .

danielhjames commented 5 years ago

I think to do that with apt we would need to create a local repository and pin it to a higher priority. Or use gdebi-core in place of apt.