Draft: pkg: add Debian style repo using sources.list

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Draft: pkg: add Debian style repo using sources.list

#1 Post by s243a »

Traditionally, it has been difficult to add repos via the puppy package manager (i.e. ppm AKA petget). For instance when I once tried to add the Tor repo to the puppy package manager I had to jump through a bunch of hoops.
http://www.murga-linux.com/puppy//viewt ... 78#1010478

Mistfire made some efforts to simplify things in PPMv3 and some of these change might have been incorporated into WoofCE and if not you can probably find them as part of x-slacko slim.

However, in my opinion; even with Mistfire's simplifications, the ppm way of adding repos is confusing. The Debian approach or using the sources.list file is much simpler and this can be done via Scotmann's package manager (AKA pkg).

**WARNING**

I consider this approach experimental because as a minimum Scotmann's version of the package manager hasn't had as much testing as the puppy package manager (AKA petget). I presume that "pkg" works on the systems which Scotmann tested it on and it may also work on puppy distros which include pkg as part of the release (e.g. josejp2424's version of dpup buster). However, even if it does work in said versions of puppy; it still might be the case that for these puppies, the sources.list approach might be quite a bit slower than the 0setup approach. See issue:

- ppa2pup should probably use the deb2pup binary

Anyway, I'm working on some code that appears to significantly speed up this by utilizing AWK to convert the debian package database into puppy format (the credit goes mostly to jamesbond here). See issue:

- ppa2pup alternative approaches

To test this code you can replace the file /usr/sbin/ppa2pup with the following code [1]:

/usr/sbin/ppa2pup
**Above Link Updated** - 19 Nov 19


I recommend creating a backup of ppa2pup so that as a minimum one has a reference point to see what has changed. For testing you you might want to comment out the line in /usr/sbin/pkg which calls 0setup [2]. If you like how the new ppa2pup code works, you can add all repos to sources.list so that these packages are updated via ppa2pup rather than via 0setup. This will remove both the architecture dependencies of pkg and also the dependencies of package on the puppy package manager [3]

Once this is done then we can test out ppa2pup with the following command:

Code: Select all

pkg --repo-update
**Testing Required**

I will do some testing of this updated version of ppa2pup on my tiny_puduan_ascii distro. If anyone tests this on a different version of puppy, please let me know of the results :)

Notes
-------------------
1 - When copying from pastebin either copy and paste the raw version of the file or alternatively download the file and change the line ending to Unix format either by using the editor (e.g. geany) or the dos2unix utility.
2 - It is safe to comment out the 0setup line from package because we can call this function directly if we want rather than using "pkg --repo-update".
3 - Removing the dependencies on petget will help in building minimal systems like wiak's firstrib/weedog system.
Last edited by s243a on Tue 19 Nov 2019, 13:15, edited 3 times in total.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#2 Post by s243a »

**Warning**

If the project specific repo has the same "distribution version" and "stream name" as the main os distribution repo then adding the project specific repo to souces.list might overwrite repo databases (and related metadata) associated with the main distribution repo:

See:

ppa2pup overwrites main repos if either the tor or node.js repositories are in sources.list

I'm going to try to fix this :)
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#3 Post by s243a »

s243a wrote:**Warning**

If the project specific repo has the same "distribution version" and "stream name" as the main os distribution repo then adding the project specific repo to souces.list might overwrite repo databases (and related metadata) associated with the main distribution repo:

See:

ppa2pup overwrites main repos if either the tor or node.js repositories are in sources.list

I'm going to try to fix this :)
So far my fix looks okay. See post:
https://gitlab.com/sc0ttj/Pkg/issues/74#note_245796003

**I only tried updating repos though and not installing. Links in the initial post have been updated.
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

#4 Post by s243a »

I'm still working on this. I realized that the code I copied from jamesbond didn't produce exactly the right db format. See post:

https://gitlab.com/sc0ttj/Pkg/issues/73#note_245847505

(delete)

Edit: Jamesbond's code is updated. The updated code appears to work but further testing required:
Find me on [url=https://www.minds.com/ns_tidder]minds[/url] and on [url=https://www.pearltrees.com/s243a/puppy-linux/id12399810]pearltrees[/url].

Post Reply