(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Sep 2020, 22:51
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Pkg - CLI package manager
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 11 of 11 [152 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11
Author Message
rockedge


Joined: 11 Apr 2012
Posts: 1874
Location: Connecticut, United States

PostPosted: Sun 12 Jan 2020, 20:09    Post subject:  

Plugin system! fantastic work...looking forward to the added flexibility

now we're getting to be power users!
Back to top
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2806
Location: UK

PostPosted: Sun 19 Jan 2020, 09:18    Post subject:  

The plugin system is now merged into Pkg

You can get the latest from https://gitlab.com/sc0ttj/Pkg/-/archive/master/Pkg-master.tar.gz

Plugins must be a shell script ending in .sh (ash, no Bash arrays).

If you want your plugin to run for a specific package, put it in:

/usr/share/pkg/plugins/<hook>/<pkgname>/

If you want your plugin to run for more than one specific package, put it in:

/usr/share/pkg/plugins/<hook>/

The "hook" given decides WHEN the plugin is run.

The hook you use can be any of the following (each is a dir in the plugins folder):

init
pre_install
post_install
pre_uninstall
post_uninstall
pre_build
post_build
exit


You can disable a plugin simply by making it non-executable:

chmod -x /usr/share/pkg/plugins/post_install/some-plugin.sh

(and enable it by making it executable with chmod +x)


---

Plugins require a run() function, as that is what Pkg will execute after sourcing the plugins.

Look in /usr/share/pkg/plugins/post_install/ for examples.

Using the vars provided by Pkg and DISTRO_SPECS, you can run plugins conditionally:

- only for certain systems (Debian-based, Slackware-based, etc)
- only for certain package types (.deb, .pet, .txz, .sfs, etc)
- only for specific packages (gimp, wings3d, kodi, etc)
- only for specific versions of packages (gimp-3.01, wings3d-2.3, etc)
- only if certain Pkg options were given (--ask, --force, --quiet, etc)
- only for packages starting with "lib*" (etc)
- any combination of the above

_________________
Pkg, mdsh, Woofy, Akita, VLC-GTK, Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 11 of 11 [152 Posts]   Goto page: Previous 1, 2, 3, ..., 9, 10, 11
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.4125s ][ Queries: 12 (0.3752s) ][ GZIP on ]