Pkg - CLI package manager

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: Pkg - CLI package manager

#61 Post by mavrothal »

sc0ttman wrote: IIRC, the first one should run itself on first load, but maybe it's not working..
Or maybe I need to boot a slack pup and fix some stuff..

(You can see all repos (currently) supported in the ~/.pkg/sources-all file)
Indeed you should, as ~/.pkg/sources-all is not created in LxPup. The repo list is OK in Xenialpup.

In my Xenial test though, repo update proceeded even when network was available (as tested by the pkg ping to google) but ubuntu access was blocked (by mistake in my access control utility). Consecutive attempts to update repos exited immediately without attempting the update.
You might want to read the update exit code (if not) and adjust (warning, possible update date stamp etc).
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#62 Post by sc0ttman »

Thanks for testing.

That is weird .. The file '~/.pkg/sources-all' isn't created, it should be there (and the same) on all systems.. It's included with Pkg...

I will download Xenial and LxPup and test.. I have no idea what your "access control utility" is though ..
I've not encountered the error you describe - so will boot those Pups at some point and see if I can re-produce..

Cheers for taking the time.

----------------

Just FYI, I have now updated Pkg on Gitlab, to include the following new command (as described earlier in the thread):

pkg dir2repo <dir>

You can type the following for help and usage info:

Code: Select all

# pkg usage dir2repo

Usage: pkg dir2repo DIR

Create a Puppy-compatible package repository (repo).

DIR must be a valid directory containing valid packages,
and all packages must have the same file extension.

HOW TO:

Run the command, you will be asked to give a repo name,
repo URL, and optional 'fall back' repos.

The entire contents of the given directory should
then be uploaded to your chosen repo URL.


MORE INFO:

Alongside the packages, a repo file will be generated
in the repo directory, as well as a repo installer file.

You can edit the contents of the following files
before uploading your repo:

Packages-*     <-- the repo file
install        <-- a repo info file (for installing the repo from URL)

SHARING REPOS:

Repos generated in this way and uploaded online can be
installed by other users simply by running this command:

  pkg add-repo <your-repo-URL>

SUPPORTED PACKAGES:

Supported packaged types include PET, SFS, DEB, TXZ.
You can use any supported packages types, but you
cannot mix and match them in a single repo.
NOTE:

Installing these repos with 1 command (as described above) not yet implemented but coming next.

As soon as I get my smokey01 FTP login details back (I never used it, and forgot them), then
I will create some PET and SFS repos (for Stretch-7.5 initially) and upload them there..

Then I can start testing the installation of those repos using `pkg add-repo <url>`..
Then I have to do some fixes for removing repos..

As soon as I have it working I will update Pkg ..

Then creating, sharing, adding & removing user-contributed repos (and even third-party repos
from other distros) will finally be easy in Puppy Linux!

:)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#63 Post by rockedge »

Then creating, sharing, adding & removing user-contributed repos (and even third-party repos
from other distros) will finally be easy in Puppy Linux!
exactly what I am looking for! I am experimenting with pkg in the installation of ZoneMinder. This is a tricky thing. I have achieved it with PPM only in pieces where PPM is useful in installing the missing dependencies which are many many but for the average user this just one of the hurdles to overcome to get the LAMP and ZoneMinder installed and working......

in Ubuntu apt-get will do almost all the work but even in best cases there is still manual configuration to do.

I can report that pkg successfully was able to do a zoneminder install that just about worked.....closer to fully automatic than I had hoped for. One or two libs were still needed and had to be tracked down BUT that maybe caused by my unfamiliarity with pkg and that I am just winging it until I learn how to use it correctly

The potential is there! PKG is coming close to being the tool I used exclusively to successfully install zoneminder. I added complexity by insisting on going from the zoneminder normal..... and using Puppy Linux to run a camera security and network video recorder..then even more bizzare I am apparently one of the only users in the world who use a Hiawatha Web Server and not Apache...so a LHMP and not a LAMP..to run zoneminder.

this throws a second wrench in the works when looking for package installs. ZoneMinder for Ubuntu is in a 3rd party Repo : iconner/PPA
I always had to modify the DISTRO_COMPAT_REPOS file manually to add the repo for the PPM which was only occasionally 100%. I have done this since UPUP 3.9.9.2

I have compiled ZoneMinder from source in Puppy Linux Bionic 18.05+20 most recently....this is not for the faint of heart. I will experiment later with pkg and building packages from source.

so at the moment I have a fresh install of Bionic the latest pkg and I am installing Hiawatha 10.8.3 after adding the repo
installing mariadb -ubuntu
installing PHP 7.2.3
installing many PERL modules some with pkg some with cpanminus
installing zoneminder 1.32.2 after adding the repo
then I will attempt to build opencv and darknet-yolo3 then configure it to
all work together and in the end I hope to see many camera streams and much motion detection with object recognition ....
I think this will be a pretty thorough test of pkg in my case.

So far pkg is performing well and I am still winging it....but getting better at using pkg.

So far I am just going with the command line until I get the basics

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#64 Post by rockedge »

That is weird .. The file '~/.pkg/sources-all' isn't created, it should be there (and the same) on all systems.. It's included with Pkg...
I encountered this as well. Installed pkg on 2 different machines both running
Bionic 18.05+20. Machine #1 everything was created and all repos appear in
a pkg repo-list command.

Machine #2 ~/.pkg/sources and ~/.pkg/sources-all were not created correctly.
I copied those 2 directories from machine 1 onto machine #2 and pkg worked as expected. I ran the installer.sh a couple of times with different clones from gitlabs with no luck on machine #2 until I copied the ones from machine #1.
After #2 started working I was able to add a repo from iconner PPA with success and everything seems to work. Something in the installer.sh failing?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#65 Post by bigpup »

Any info on what machine #2 is?
Installed on what?
What format?
Frugal or full Puppy install?
Frugal using save file or folder?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#66 Post by mikeslr »

Also the specifics on machine # 1. If the problem is computer architecture related it would help to figure out what goes wrong by knowing what works.

I'm in the middle of project right now. But as soon as it's finished --or I get stumped :( -- I'll think of some applications I might want and begin to explore pkg. I have two different computers I use daily. A couple more I could dust off.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#67 Post by rockedge »

both Bionic systems are frugally installed on internal hard drive

working machine #1 -->>
DELL INSPIRON E1505

Code: Select all

▶—— BASE SYSTEM ——◀

PC Manufacturer: Dell Inc.
Product Name: MM061                           

Motherboard Vendor: Dell Inc.
Product Name: 0XD720

BIOS Vendor: Dell Inc.
Version: A17
Release Date: 06/13/2007

Genuine Intel(R) CPU T2400 @ 1.83GHz
Max Speed: 1833 MHz
Current Speed of Core 0:1833 MHz, 1:1833 MHz
Core Count: 2
Thread Count: 2

Frequency governor   : ondemand
Freq. scaling driver : acpi-cpufreq

l1tf:Vulnerable
meltdown:Vulnerable
spec_store_bypass:Not affected
spectre_v1:Mitigation: __user pointer sanitization
spectre_v2:Mitigation: Full generic retpoline

Core 0 (coretemp) : +54.0 C (high = +NA.0 C, crit = +100.0 C)
Core 1 (coretemp) : +57.0 C (high = +NA.0 C, crit = +100.0 C)

Personal Storage Folder:
 Name: /BionicZM-C/upupbbsave
 Total Size: 145G 
 Free Space: 78G 
 Location: partition sdb1

Memory Allocation:
 Total RAM: 3276 MB
 Used RAM: 1865 MB
 Free RAM: 1411 MB
 Buffers: 694 MB
 Cached: 702 MB
 Total Swap: 5927 MB
 Free Swap: 5926 MB

 Actual▶—— BASE SYSTEM ——◀

PC Manufacturer: Dell Inc.
Product Name: MM061                           

Motherboard Vendor: Dell Inc.
Product Name: 0XD720

BIOS Vendor: Dell Inc.
Version: A17
Release Date: 06/13/2007

Genuine Intel(R) CPU T2400 @ 1.83GHz
Max Speed: 1833 MHz
Current Speed of Core 0:1833 MHz, 1:1833 MHz
Core Count: 2
Thread Count: 2

Frequency governor   : ondemand
Freq. scaling driver : acpi-cpufreq

l1tf:Vulnerable
meltdown:Vulnerable
spec_store_bypass:Not affected
spectre_v1:Mitigation: __user pointer sanitization
spectre_v2:Mitigation: Full generic retpoline

Core 0 (coretemp) : +54.0 C (high = +NA.0 C, crit = +100.0 C)
Core 1 (coretemp) : +57.0 C (high = +NA.0 C, crit = +100.0 C)

Personal Storage Folder:
 Name: /BionicZM-C/upupbbsave
 Total Size: 145G 
 Free Space: 78G 
 Location: partition sdb1

Memory Allocation:
 Total RAM: 3276 MB
 Used RAM: 1865 MB
 Free RAM: 1411 MB
 Buffers: 694 MB
 Cached: 702 MB
 Total Swap: 5927 MB
 Free Swap: 5926 MB

 Actual Used RAM: 469 MB  	Used - (buffers + cached)
 Actual Free RAM: 2807 MB	Free + (buffers + cached)

Linux Kernel: 4.18.16 (i686)
Kernel Version: #1 SMP PREEMPT Fri Oct 26 19:48:32 EDT 2018
Build GCC: 7.3.0
PAE Enabled: Yes

Kernel Command Line:
pdrv=13ec514b-7e2d-43e1-b18e-ed4daceba563  psubdir=/BionicZM-C net.ifnames=0 pmedia=atahd pfix=fsck intel_pstate=disable

Distro: UPupBB 18.05
Window Manager: JWM v2.3.7
Desktop Start: xwin jwm
Machine #2 NOT working correctly -->>
DELL Optiplex 980

Code: Select all

▶—— BASE SYSTEM ——◀

PC Manufacturer: Dell Inc.
Product Name: OptiPlex 980                 

Motherboard Vendor: Dell Inc.
Product Name: 0D441T

BIOS Vendor: Dell Inc.
Version: A18
Release Date: 02/27/2018

Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz
Max Speed: 5200 MHz
Current Speed of Core 0:3193 MHz, 1:1197 MHz, 2:1596 MHz, 3:2660 MHz
Core Count: 2
Thread Count: 2

Frequency governor   : ondemand
Freq. scaling driver : acpi-cpufreq

l1tf	: Mitigation	: PTE Inversion
meltdown	: Vulnerable
spec_store_bypass	: Vulnerable
spectre_v1	: Mitigation	: __user pointer sanitization
spectre_v2	: Mitigation	: Full generic retpoline, IBPB, IBRS_FW

Core 0 (coretemp) : +23.0 C (high = +89.0 C, crit = +105.0 C)
Core 2 (coretemp) : +20.0 C (high = +89.0 C, crit = +105.0 C)

Personal Storage Folder:
 Name: /BionicZM-C/upupbbsave-2
 Total Size: 162G 
 Free Space: 147G 
 Location: partition sda4

Memory Allocation:
 Total RAM: 7894 MB
 Used RAM: 1796 MB
 Free RAM: 6098 MB
 Buffers: 135 MB
 Cached: 987 MB
 Total Swap: 0 MB
 Free Swap: 0 MB

 Actual Used RAM: 674 MB  	Used - (buffers + cached)
 Actual Free RAM: 7220 MB	Free + (buffers + cached)

Linux Kernel: 4.18.16 (i686)
Kernel Version: #1 SMP PREEMPT Fri Oct 26 19:48:32 EDT 2018
Build GCC: 7.3.0
PAE Enabled: Yes

Kernel Command Line:
pdrv=acc8a5ba-3340-43e8-9d4c-b09ef6b299d1  psubdir=/BionicZM-C pmedia=atahd pfix=fsck net.ifnames=0

Distro: UPupBB 18.05
Window Manager: JWM v2.3.7
Desktop Start: xwin jwm

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#68 Post by rockedge »

machine #2 NOT working correctly
Attachments
Screenshot(14).png
(76.53 KiB) Downloaded 499 times
Last edited by rockedge on Sun 09 Dec 2018, 01:07, edited 1 time in total.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#69 Post by rockedge »

machine #1 works correctly
Attachments
Screenshot(14).png
(56.78 KiB) Downloaded 566 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#70 Post by sc0ttman »

I will look over the info above in a bit.. Thanks for helping out guys.

In the mean time, I have fixed the repo creation stuff...

Code: Select all

# pkg dir2repo myrepo

Creating repo from contents of: /root/myrepo

Step 1 of 3: CHOOSE A REPO NAME
(something like 'distroversion-username-repo', such as 'bionic-bob-main' or 'stretch-sc0ttman-games')

Type a repo name and hit ENTER: stretch-sc0ttman-gfx

Step 2 of 3: ADD THE REPO URL
(the full URL where you will upload your repo file and packages)

Type a repo URL and hit ENTER: http://smokey01.com/sc0ttman/stretch-7.5/gfx/

Step 3 of 3: ADD FALLBACK REPOS
(the other repos to fall back to when looking for dependencies)

List fallback repos (separated by a space) and hit ENTER: noarch common32

Success: Repo stretch-sc0ttman-gfx created.

You should upload everything in /root/myrepo to:

  http://smokey01.com/sc0ttman/stretch-7.5/gfx/

You (and anyone else) can then install the repo using:

  pkg add-repo http://smokey01.com/sc0ttman/stretch-7.5/gfx/

NOTE: You can edit the install and Packages-debian-stretch-sc0ttman-gfx
files in a text editor, before you upload your new repo.
Repo created... So I uploaded the contents of /root/myrepo/ to the repo URL I chose above,
then I ran the command Pkg gave me to install it:

Code: Select all

# pkg add-repo http://smokey01.com/sc0ttman/stretch-7.5/gfx/

Repo 'stretch-sc0ttman-gfx' added successfully.

Adding repo: noarch..
Adding repo: stretch..
Adding repo: stretch-contrib..
Adding repo: stretch-multimedia..
Adding repo: stretch-non-free..
Adding repo: common32..
Adding repo: stretch-main..
Adding repo: bionic-teamxbmc..
Adding repo: precise-steam..
Adding repo: stretch-sc0ttman-gfx..
Sources updated.

Repo info:
- Repo:          stretch-sc0ttman-gfx
- Repo file:     Packages-debian-stretch-sc0ttman-gfx
- Package Type:  sfs
- Packages:      2
- URL Mirror 1:  http://smokey01.com

- Fall back to:  noarch, common32

Success! Repo added and available to use.

To use this repo, simply type the following and hit ENTER:
  pkg repo stretch-sc0ttman-gfx
Anyone else who is using the latest Pkg (and has it working :oops:) should be able to create and install
repos in the same way

:) 8)

NOTE:

The repo name should be something like:

bionic-someuser-main
stretch-bob-games
..etc..

You can edit the repo file contents before you upload the repo, but you must also update the contents of
the 'install' file if you rename the repo file.

** It is NOT recommended to rename the repo file after you have already uploaded and shared the repo
URL with others. **

You cannot remove or rename the 'install' file that is generated in the repo dir - and it must be uploaded too.

To update your repo, just run `pkg dir2repo <dir>` on the same dir as before, and re-upload the contents,
overwriting anything already uploaded..

Generally, don't move, rename or delete things in your local repo dir unless you need to. Anything you delete,
rename or update locally should be re-uploaded as needed to keep things in sync.

EDIT: the `pkg repo-update` command still needs updating so it asks to update these repos too..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#71 Post by sc0ttman »

If anyone noticed Pkg being slow recently, it's cos I had it using Bash while testing, and forgot to change it back to Ash...

Fixed in the latest commit .. runs much faster again.. (So re-download the .tar.gz in the first post of `git pull` the latest..)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#72 Post by bigpup »

sc0ttman,

Just to let you know people are interested in this and using it.

From Xenialpup 7.5 Quickpet>Info>Xenialpup updates

List of what has been fixed or added to Xenialpup.
13/04/2018 added PKG, a command line package manager by sc0ttman. PKG is in early development and so may have a
few bugs. Help development by reporting any problems either on the forum or raise a new issue on gitlab.
forum http://murga-linux.com/puppy/viewtopic.php?t=112927 (you can find usage intructions here)
gitlab https://gitlab.com/sc0ttj/Pkg
This is Pkg V1.9.21, so 666philb is a little behind on your latest version.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Re: Pkg - CLI package manager

#73 Post by peebee »

mavrothal wrote:Indeed you should, as ~/.pkg/sources-all is not created in LxPup. The repo list is OK in Xenialpup.
Just noticed this.....

The packages directory in recent woof-ce builds is /var/packages
and /root/.packages is just a link to it

Just a thought - maybe this change is causing the differences seen in Pkg?
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#74 Post by Keef »

I've not used pkg much because I have been mainly on EasyOS. Recently downloaded Upupcc (UPup Cosmic Cuttlefish 18.10 Oct 2018) as I wanted a 32bit Pup to play with.
Anyway, I finally managed a build script! Nothing special, just nnn the terminal file manager. Started with the Xdialog script and fiddled with that. Only problem was that it appended ta610 to the pet names. That I think comes from build.conf, (DEF_BUILD=) so removed it, and it says "leave empty to use a default value from DISTRO_SPECS". However it produced a single incomplete pet (just var/log/ something) with i686 as a suffix. Manually put in 'upupcc' and it worked perfectly.
Attachments
nnn.petbuild.gz
Remove fake .gz
(815 Bytes) Downloaded 186 times
Screenshot(1).jpg
(47.08 KiB) Downloaded 386 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#75 Post by sc0ttman »

Happy New Year everyone!

Thanks for all the feedback.. I'll catch up with the previous posts soon - I've had a look,
not sure what to do about those errors for now.. Will get them sorted at some point.

And thanks for the build script Keef - that's great.. I hope many of our good compiler ppl (like yourself) start sharing more build scripts in the new year!

-----------------------------------------

On another note, I've updated the `pkg repo-update` command..
It is much better now.

Improvements:
* can now update all supported third-party repo types (Debian/Ubuntu, PPA, Slackware, and now Pkg-created repos)
* can now update ALL supported repos types without any user input
* now supports the --ask option :) (asks before updating each third-party repo)
* much, much nicer output - more standardised across repos, more readable
* fixes in creation of fallback repo lists (the repos to fall back to when getting deps) for user-added repos
* the `pkg add-repo` command inherits a few of these fixes, but is largely unchanged (and still works as usual)

Example output of `pkg repo-update`:

Code: Select all

# pkg repo-update
Updating system repositories, please wait..

Repo files updated:
Packages-debian-stretch-main
Packages-debian-stretch-non-free
Packages-debian-stretch-contrib
Packages-debian-stretch-multimedia
Packages-debian-stretch_updates-main
Packages-debian-stretch_updates-non-free
Packages-debian-stretch_updates-contrib

Updating third-party repos.. This may take a while..

Processing:  http://smokey01.com/sc0ttman/stretch-7.5/gfx/
Please wait...
Success: Updated repo 'stretch-sc0ttman-gfx'

Processing:  http://repo.steampowered.com/steam/ precise steam
Please wait...
Success: Updated repo 'precise-steam'

Processing:  ppa:team-xbmc/ppa ubuntu bionic
Please wait...
Success: Updated repo 'bionic-teamxbmc'

Processing:  https://rlworkman.net/pkgs/14.2/
Please wait...
Success: Updated repo 'rlworkman-14.2'
The scripts slack2pup and ppa2pup have some small improvement in them too:
* only ask for repo name (etc) if adding a new repo, else get its info from Pkg sources files
* speedup: slack2pup now uses Ash not Bash (ppa2pup will do too, soon)
* nicer output, more readable


...TLDR

* You can now do `pkg repo-update` to update ALL supported repos, without any more input...
* Or, you can do `pkg repo-update --ask` and Pkg will ask before updating each repo

For help, you can also run:

pkg usage repo-update

which gives:

Code: Select all

Usage: pkg repo-update|ru [--ask]

Download and update the latest repo files from their online
sources to get the latest packages available.

This command updates all system (built-in) repos, and any third-party
(user-added) repos as well.

With --ask you will be asked to confirm before each
third-party repo is updated.

MORE INFO:

Pkg will look in the following files for system (built-in) repos:

  /root/.pkg/sources        <-- lists ALL SUPPORTED system repos
  /root/.pkg/sources-all    <-- lists AVAILABLE system repos

(Pkg uses the script '/usr/local/petget/0setup' to update the system repos.)

Pkg will then look in the following files for third-party (user-added) repos:

  /root/.pkg/sources-user   <-- Pkg-created repos (created using 'dir2repo' command)
  /etc/slackpkg/mirrors     <-- Slackware repos
  /etc/apt/sources.list     <-- Apt repos (Ubuntu, Debian or PPA repos)
  /root/.pkg/sources        <-- lists the repo names, repo files, etc
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#76 Post by sc0ttman »

New command available in latest Pkg:

pkg merge PKGNAME,PKGNAME,.. [--with-deps]

Code: Select all

# pkg usage merge

Usage: pkg merge PKGNAME,PKGNAME,.. [--with-deps]

Merge multiple packages into a single package. The newly
created package file will a .PET.

If --with-deps is given, the dependencies of each listed
package will also be merged into the final package file.

PKGNAME(s) must be comma separated (no spaces)!
Examples:

Code: Select all

pkg merge freeciv_2.5.6-2,freeciv-server,freeciv-client-gtk --with-deps
.. the above command will merge the 3 given packages, and all their dependencies into a single PET package - freeciv_2.5.6-2-MERGED.pet.

(You will be asked for a package name for the new package during creation..)
Last edited by sc0ttman on Wed 02 Jan 2019, 16:43, edited 1 time in total.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

mfb

#77 Post by mfb »

Hi sc0ttman,

Your "merge" command in your post immediately above is of considerable interest to me.

Last month, foxpup expressed it is his understanding that this package is PPM compatible (I'm using radky's "Dpup Stretch 7.5 (RC3))".

I follow the command, but (because of my deficiencies) although I've skip-read the whole of this thread I haven't followed too much too well.

If you are able to confirm compatibility, could you also say what I need (e.g. devx etc.) so I can try the command.

Thank you.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#78 Post by sc0ttman »

mfb wrote:Hi sc0ttman,

Your "merge" command in your post immediately above is of considerable interest to me.

Last month, foxpup expressed it is his understanding that this package is PPM compatible (I'm using radky's "Dpup Stretch 7.5 (RC3))".

I follow the command, but (because of my deficiencies) although I've skip-read the whole of this thread I haven't followed too much too well.

If you are able to confirm compatibility, could you also say what I need (e.g. devx etc.) so I can try the command.

Thank you.
(I'm also using Dpup Stretch 7.5 RC3, so Pkg should work for you ;) but you only need the devx to use Git, or compile packages from source..)

You can install and use Pkg this way (without the devx):

1. Download the .tar.gz here: https://gitlab.com/sc0ttj/Pkg/-/archive ... ter.tar.gz

^ that is always the latest version, whenever you download it..

2. Then unzip it somewhere ... open a terminal inside the unzipped directory, or cd into it...

3. Then in your terminal run:

./installer.sh

This will install Pkg :)


..
...
.....


You can then start using it :

Code: Select all

pkg welcome      # help msg

Code: Select all

pkg update-sources  # set all available repos

Code: Select all

pkg repo-update      # update all available repos 

Code: Select all

pkg repo-list    # list available repos

Code: Select all

pkg repo NAME    # change to repo called NAME

Code: Select all

pkg names PKGNAME   # list matching packages

Code: Select all

pkg search TERM   # search all fields (name, descr, category, deps, etc)
... now about merging packages:

Code: Select all

pkg merge PKGNAME,PKGNAME    # merge the give packages (not including their deps)

Code: Select all

pkg merge PKGNAME,PKGNAME --with-deps    #  merge the given packages, including their deps
Please note: until Pkg can create .deb packages from directories (dir2deb),
and process DEB meta info better, the 'merge' (and 'split') commands will
not build 'perfect' packages yet...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#79 Post by sc0ttman »

I've done some fixes on the `pkg merge` command, available in the latest Pkg..

- better error handling (of invalid/non/missing packages)
- completing the merge & build of the package works ok now, where found not to work before
- better output and info messages (now includes the deps added if using --with-deps)
- better suggested final package naming (includes -WITHDEPS in name if --with-deps was given)

Should now work ok for you mfb ;) (maybe...)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#80 Post by sc0ttman »

I've done some fixes in adding Pkg created repos, listing repos, and some related stuff..

And some code clean ups .. (in case anyone wants to submit some PRs at GitLab, or post some fixes/diffs here.. hint, hint ;) )

.. If you had trouble creating and adding your own reps, re-download the latest Pkg,
and it might solve your problems.

Also added better support common32/common64 repos..

EDIT: also added some fixes and improvements to pkgdialog (the ncurses fontend)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

Post Reply