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 18 Oct 2017, 09:20
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Better command line tools, and pkg manager suggestions
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Author Message
Keef


Joined: 20 Dec 2007
Posts: 864
Location: Staffordshire

PostPosted: Mon 09 Oct 2017, 06:52    Post subject:  

Tried again on Stretch 7.0.0 with the line 2703 fix.
Downloads are ok but do get some warnings, eg:
Code:
# pkg -g treesheets
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: /usr/sbin/pkg: /usr/sbin/pkg: line 19: cut: Argument list too long
line 19: line 19: sed: Argument list too longgrep: Argument list too long

/usr/sbin/pkg: line 19: sed: Argument list too long
/usr/sbin/pkg: line 19: basename: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
/usr/sbin/pkg: line 19: cut: Argument list too long
/usr/sbin/pkg: /usr/sbin/pkg: line 19: grep: Argument list too long/usr/sbin/pkg:
line 19: grep: Argument list too long
line 19: sed: Argument list too long
/usr/sbin/pkg: /usr/sbin/pkg: /usr/sbin/pkg: line 19: cut: Argument list too long
line 19: grep: Argument list too long
line 19: sed: Argument list too long
/usr/sbin/pkg: line 19: grep: Argument list too long
Install package treesheets_20161120~git7baabf39-1_i386: 
Success: treesheets_20161120~git7baabf39-1_i386 installed.
Menu entry:   [None] -> TreeSheets
Resolving dependencies
No missing dependencies.
# treesheets
treesheets: error while loading shared libraries: libwx_gtk2u_aui-3.0.so.0: cannot open shared object file: No such file or directory
#

Also note the missing dependency.
Also happened with FBReader:

Code:
...
Success: Downloaded /root/pkg/fbreader_0.12.10dfsg2-2+b1_i386.deb.
Install package fbreader_0.12.10dfsg2-2+b1_i386: 
Success: fbreader_0.12.10dfsg2-2+b1_i386 installed.
Menu entry:   Personal -> E-book reader
Resolving dependencies
No missing dependencies.           
# fbreader
fbreader: error while loading shared libraries: libzltext.so.0.13: cannot open shared object file: No such file or directory
#

Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Mon 09 Oct 2017, 19:57    Post subject: 1.9.11  

.. this won't fix all the errors posted above, but it's probably better...

Plus, now you can install/uninstall SFS files with the usual commands.
.. works best with SFS files created using dir2sfs or pkg --dir2sfs..

The following command should work OK with SFS 'packages':
(tested with torcs-1.3.7-i686_s700.sfs, qemu-2.4.1-i686_s700_6.9.11.sfs)

Code:
pkg -i file.sfs # install
pkg -u file.sfs # uninstall
pkg -c file.sfs # list sfs contents
pkg -pi # is installed or not [returns true/false]
pkg -ps file.sfs # show pkg status


.. and you don't need to give the .sfs extension if the SFS file is in current dir or installed..
(but if you don't give the .sfs extension Pkg might get confused by SFS files with exact same names as repo PETs etc.. not sure yet)


Changelog for 1.9.11

Code:
1.9.11
- added a fixed sfs_load called sfs_loadr, with fixes for the --cli option
- removed /usr/sbin/sfs_load_cli, outdated, not needed
- removed /usr/sbin/sfs_installer, outdated, not needed
- updated `pkg -i file.sfs` to install SFS like pkgs (uses sfs_loadr)
- updated `pkg -c file.sfs` lists SFS file contents too
- updated `pkg -u file.sfs` to uninstall SFS file (uses sfs_loadr)
- updated gpkgdialog to 0.3: cleaned up popup/tailbox output
- fixed check bad pkg URLs (404s), dont download
- fixed typo preventing .deb pkg install in install_pkg()
- fixed typo preventing parse correct pkg extension in pkg_unpack()
- fixes in get_pkg(), only install if pkg contents can be listed by pkg_contents()
- fixed a 'not getting deps properly' regression (I think)
- fixes in is_installed_pkg(), more accurate, fewer checks
- fixes in lucid repo stuff in ~/.pkg/sources-all
- cleanup download_pkg(), use download_progress script when called by gpkgdialog
- better error code handling and output .. Pkg fails a bit better/earlier
pkg-1.9.11alpha-noarch.pet
Description 
pet

 Download 
Filename  pkg-1.9.11alpha-noarch.pet 
Filesize  141.14 KB 
Downloaded  9 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 864
Location: Staffordshire

PostPosted: Tue 10 Oct 2017, 17:51    Post subject:  

sc0ttman

I've found that pkg -go <package name> will download the named package without installing, but any dependencies get automatically installed, which may not be wanted.

On Lupu,
Code:
pkg --update-sources
is not working.
Code:
# pkg --update-sources
Error: Repo files not found. Check /root/.packages


I tried altering pkgrc again, and the minimum changes needed are to REPONAME and REPOFILE.
'pkg --update-sources' and 'pkg --repo lucid' will then run ok, and the 'sources' file is updated.

Tried the sfs options on Slacko and had no problems.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Wed 11 Oct 2017, 09:59    Post subject:  

Hi Keef,

Were you running as root when `--updates-sources` didn't work?

Can you please give the the output of this in Lupu:
Code:
pkg -rfl

.. it should list all the available repo files.. I wouldn't ask but they are not all on ibiblio..

Also, I'm guessing that if by default ~/.pkg/pkgrc had details for noarch (not slack14.2),
when it was installed, then that `--update-sources` problem would go away.. So I'll do that.

Thanks for the feedback

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search

Last edited by sc0ttman on Wed 11 Oct 2017, 10:41; edited 1 time in total
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Wed 11 Oct 2017, 10:37    Post subject: 1.9.12  

Changelog for 1.9.12

Code:
1.9.12
- fixes in searches using pkg aliases
- fixes in is_local_pkg(), more reliable
- fixes in pkg_contents(), better at looking for WORKDIR/PKGNAME when not in WORKDIR
- fixes in pkg_contents(), removed error from output when pkgname comes from stdin (`pkg opts | pkg --contents -`)
- fixes in deb2pet(), now works better, cleaned up, uses the pkg_unpack() func
- fixed `pkg -go pkgname`: dont install pkgs, just download them
- fixed `pkg -PS pkgname`: lists deps sorted by missing/installed, more detailed than `pkg -ps pkgname`
- fixed `pkg --deps-check PKGNAME`: runs ldd on PKGNAME (must be an installed pkg) and prints msg about missing libs
- fixed TAB completion for --all-pkgs option
- fixes in RC files: use noarch repo on first run. See /etc/pkg/* and in ~/.pkg/*
- added new URLs for Trusty, Lucid and Precise repos: http://old-releases.ubuntu.com/ubuntu/
- added `pkg -pkg-entry PKGNAME`: list repo entry of pkg, each field on new line
- updated --list-deps,--list-installed:
    # --list-deps default behaviour is still to "list all deps of pkg (not inc builtins)"
    # --list-installed default behaviour is still to "list all installed pkgs (not inc builtins)"
    # but they now support the env vars: HIDE_USER_PKGS, HIDE_BUILTINS [true or false] ..
    # Pkg users can use these in combination to show all, only missing, already builtin, etc
    # EG:
     HIDE_USER_PKGS=true  HIDE_BUILTINS=true  pkg -le PKGNAME   # list only deps not yet installed:
     HIDE_USER_PKGS=true  HIDE_BUILTINS=false pkg -le PKGNAME   # list only the deps of PKGNAME that are already built in
     HIDE_USER_PKGS=false HIDE_BUILTINS=false pkg -le PKGNAME    # list all deps of PKGNAME (as listed in its repo, inc builtins)
     HIDE_USER_PKGS=false HIDE_BUILTINS=false pkg -li PKGNAME    # list all installed pkgs, inc builtins
     ...etc
- added `pkg -LE pkgname`: lists all deps, including builtins
- added `pkg -LI pkgname`: lists all installed pkgs, including builtins
- added the new capitalised options to help info [--help|-h|-H]
- added "NO_INSTALL" env var: replaces DEPINSTALL, GETINSTALL.. used by --get-only, --deps-download, others
pkg-1.9.12alpha-noarch.pet
Description 
pet

 Download 
Filename  pkg-1.9.12alpha-noarch.pet 
Filesize  141.91 KB 
Downloaded  6 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 864
Location: Staffordshire

PostPosted: Wed 11 Oct 2017, 15:12    Post subject:  

sc0ttman

Yes, I was running as root.
Still getting no joy with Lupu:

First run after installing new version:

Code:
# pkg -rfl
Error: Repo files not found. Check /root/.packages

#  pkg --update-sources
Error: Repo files not found. Check /root/.package


Same if I do --update-sources first.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Wed 11 Oct 2017, 15:47    Post subject: Pkg 1.9.13  

OK thanks Keef .. will just boot Lupu and sort it that way later..

I haven't forgot about the `Argument list too long stuff`- those errors will probably be
because the repo files in Ubuntu and Deb pups have so many pkgs in the repo files, or
because they have so many deps per pkg ..

I fixed the same errors ages ago in Tahr on my netbook ..

Here's a new one .. I have fixed a bunch of stuff, this ones one of the best version so far..
Not saying much admittedly at the mo, but this is now "getting there"..

Still only tested on Slacko 6.9.x for now..

This one fixes a lot of niggles.. It's now much more reliably loops through the pkgs/deps,
it trips up on far fewer caveats (already installed pkgs, builtins, in other repo, etc),,

In short --force works much better, and handling of ENV vars is much cleaner,
more options support the ENV vars, which all paves the way for easier handling
of install/remove builtins with a -F option.

Code:
1.9.13
- added entries for Zesty repos to sources-all (not tested)
- added --autoclean option: auto-delete pkg files after they've been installed
   # use  `pkg --autoclean [yes|no]` (no is default upon install)
- cleanup, renamed some funcs,
- fixes in various funcs to better support Pkgs ENV vars
- fixed download_pkg() not finding the pkg to download in current repo
- fixed call get_pkg() with full pkgname from get_deps()
- fixed get_deps() output messages, better ordered
- fixed various funcs: loop over pkgs and deps, dont skip or exit at the wrong time
- fixes when using --force option:
    # --force will list all deps, inc builtins
    # --force will re-download all pkgs, except builtins (by default)
    # --force will re-install all pkgs,  except builtins (by default)
    # --force will not install or uninstall builtins (that is coming soon..)
pkg-1.9.13alpha-noarch.pet
Description 
pet

 Download 
Filename  pkg-1.9.13alpha-noarch.pet 
Filesize  142.32 KB 
Downloaded  9 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
mistfire

Joined: 04 Nov 2008
Posts: 608
Location: PH

PostPosted: Sat 14 Oct 2017, 03:14    Post subject:  

Hello I wrote a script that works like apt-get called puppy-get. Can you help me to improve it? the thread was in the cutting edge section.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Sat 14 Oct 2017, 09:54    Post subject: 1.9.14  

mistfire wrote:
Hello I wrote a script that works like apt-get called puppy-get. Can you help me to improve it? the thread was in the cutting edge section.

Hi mistfire,

I looked at the code of your puppy-get, but didn't test it, in case it breaks my (flakey)
in-development setup.. But in the mean time, here's some suggestions:

I know you like pkg conversions and did a lot of scripts for it (which I will 'borrow' Wink ),
so maybe you want to look at my pkg_unpack() func in Pkg .. I stole the code
for it from Slackware somewhere, works lovely, small, simple, easily extended..

One feature I like to switch is autoclean, I think apt-get has it. Also reverse depends,
etc .. I have both of those in Pkg, see clean_pkgs() and list_dependants().

I will certainly pinch some code from yours (Arch pkg unpacking, etc), so obvs feel
free to steal anything you like from Pkg..

I am still trying to get together a consistent way to ignore (or not) builtin pkgs in
a nice and consistent way.. I am working towards a -F option, which works like -f,
but includes builtins too.. Easier to remaster, rebuild ISO, etc.

Any clever ideas in that area would be great (anyone?)

.. And if anyone could remove the BASH arrays from /etc/bash_completion.d/pkg,
and make TAB completion work in a busybox ASH shell, that would be amazing!
(This link would help, but I can't get my head around removing the BASH Array dependency)

Changelog for 1.9.14:

Summary

- Much better usage docs
Code:
pkg -usage  # to see cmds list
pkg -usage CMD # to see usage

- more consistent CLI interface output, especially when user gives invalid usage
- fixes when using --ask and --force
- fixed various funcs to better support the available ENV vars
- code clean up, other fixes

Details

Code:
1.9.14
- fixed list_dependants(): don't include the pkg being checked in the list, only its dependants
- fix pkg_download(): nicer output when using --ask
    * if not called with --ask, then always hide question tags
    * this fixes the output of funcs when Pkg disables $ASK internally, but user gave --ask option
- fix pkg_combine(): fixed some breaking changes from last version, added support for --ask and including BUILTINS
    * Use  `pkg --pkg-combine|-pc`  to combine a pkg with its deps, not including builtins.
    * Prefix above cmd with  HIDE_BUILTINS=false  to include builtins too
    * fixed: use --ask and Pkg will ask which pkgs to put into the final PET/SFS
- fixes in pkg_install(): better checking local files before install
- fixes in pkg_get(): works better when --force and --ask used together
    * dont error if user chooses to skip a download in the loop
- fixed pkg_update(): dont search or update builtin pkgs, unless  HIDE_BUILTINS=false  given
- cleanup naming of functions, more consistent
- cleanup CLI interace: fixed usage msgs not showing, fixed opts not accepting multiple pkgs
- cleanup code, moved help info to /usr/lib/pkg/docs/, source it in Pkg
- much nicer usage info: moved into /usr/lib/pkg/docs/usage/<cmd_name>
    * give cmd (--get, --download, etc) without options to see its usage info
    * or use `pkg --usage|-usage [CMD]` to see list or usage of available commands
pkg-1.9.14alpha-noarch.pet
Description 
pet

 Download 
Filename  pkg-1.9.14alpha-noarch.pet 
Filesize  147.17 KB 
Downloaded  4 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2529
Location: UK

PostPosted: Sun 15 Oct 2017, 12:56    Post subject: Pkg 1.9.15  

Changelog for 1.9.15

Summary:
- fixes in finding where pkgs comes from (builtin, devx, user pkg, etc)
- fixes and clean up of first run
- fixes in package status output (cmd: pkg --pkg-status|-ps|-PS pkgname)
- new option: `pkg --no-color OPTS` (disables ANSI console colours)
- much nicer command-line interface (CLI):
    * much easier to TAB auto-complete multiple pkg names for each option
    * much more robust and programmable
    * no longer required to encase multiple pkgs in quotes
    * pkgs can be delimited (separated) by space, comma (or a pipe when in quotes)
    * more options now support handling multiple pkgs


As of 1.9.15, all of the below commands are equivalent, and return the same result (the status of each pkg given):

Code:
pkg -PS geany vlc netsurf-3.3 avidemux

Code:
pkg -PS geany,vlc,netsurf-3.3,avidemux

Code:
pkg -PS "geany|vlc|netsurf-3.3|avidemux"

Code:
echo geany vlc netsurf-3.3 avidemux | pkg -PS -

Code:
echo "geany vlc-2.2.4-i686_s700 netsurf-3.3 avidemux" | pkg -PS -

Code:
echo "geany,vlc,netsurf-3.3,avidemux" | pkg -PS -

Code:
echo "geany|vlc|netsurf-3.3|avidemux" | pkg -PS -

Code:
echo "geany-1.27
vlc-2
netsurf
avidemux" | pkg -PS -


This makes Pkg much more 'programmable' - easier to use Pkg in your own code.

Full Changelog:

Code:
1.9.15
- added msg about enabling TAB auto-completion if not enabled
- added option: `pkg --no-colour|--no-color|-nc` .. an easier way to disable colours
    * added usage info in /usr/lib/pkg/docs/usage/no-colour
    * do `pkg -usage no-colour`
- cleanup: simpler creation of WORKDIR, simpler exit if fail to find WORKDIR
- cleanup: when finding avail repos on first run (see 'final checks' section)
- fixed: was missing usage help info for `--pkg-entry`
- improvements in CLI interface, more robust, more programmable:
    * supports passing multiple PKGs to most options, with or without quotes
    * PKGs can be delimited (separated) by space, comma (or a pipe when in quotes)
    * you can still pipe (newline or space delimited) lists into Pkg if you give dash (-) as its last option:
   example: `echo geany vlc | pkg -PS -` will print status of both pkgs
    * if piping stuff, use -ss and -ssa for pipe-able search output (-s and -s produce fancy ouput)
- fixed: include devx pkgs in `pkg -LI`, which should list ALL installed pkgs
- fixes in finding where pkg comes from:
    * same fixes applied to: is_usr_pkg(), is_devx_pkg(), is_builtin_pkg(), is_repo_pkg(), is_installed_pkg()
- fixed repo_file_list(): takes repo name returns name of its repo file,
    * fixed a failure to return the correct, matching repo file in some cases
- fixes in pkg_status():
    * show correct install status (user,devx,builtin,layers)
    * fixed missing repo filenames (see repo_file_list)
    * standardise output: add 'K' to end of $pkg_size, if not already there
pkg-1.9.15alpha-noarch.pet
Description 
pet

 Download 
Filename  pkg-1.9.15alpha-noarch.pet 
Filesize  147.27 KB 
Downloaded  9 Time(s) 

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 5 [70 Posts]   Goto page: Previous 1, 2, 3, 4, 5
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
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.0650s ][ Queries: 15 (0.0033s) ][ GZIP on ]