Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 11 Dec 2019, 14:00
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Draft: pkg: add Debian style repo using sources.list
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 2204

PostPosted: Sun 17 Nov 2019, 14:38    Post subject:  Draft: pkg: add Debian style repo using sources.list  

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//viewtopic.php?p=1010478#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:

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 Smile

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.

_________________
Find me on minds and on pearltrees.

Last edited by s243a on Tue 19 Nov 2019, 09:15; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2204

PostPosted: Sun 17 Nov 2019, 19:14    Post subject:  

**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 Smile

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2204

PostPosted: Sun 17 Nov 2019, 21:44    Post subject:  

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 Smile


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 minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
s243a

Joined: 02 Sep 2014
Posts: 2204

PostPosted: Mon 18 Nov 2019, 10:08    Post subject:  

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 minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0377s ][ Queries: 11 (0.0072s) ][ GZIP on ]