GithubHelp home page GithubHelp logo

Comments (14)

jacques avatar jacques commented on July 20, 2024

One would expect bash 4.2nb3 to install and due to 2.05.2.7nb11 being listed last chef installs this version instead.

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

Weird, on a fresh system:

$ sudo pkgin in bash
reading local summary...
processing local summary...
updating database: 100%
calculating dependencies... done.

nothing to upgrade.
1 packages to be installed: bash-4.2nb3 (1325K to download, 3897K to install)

What pkgin version are you using?

from pkgin.

jacques avatar jacques commented on July 20, 2024

This seems to be an issue on Joyent's SmartOS datasets (going back numerous releases). Filip and Jonathan never did figure out what was causing this.

[root@files2 /var/tmp]# cat /etc/pkgsrc_version
release: 2013Q3
architecture: x86_64
[root@files2 /var/tmp]# pkgin -v
pkgin 0.6.4 for SunOS-5.11 x86_64 (using SQLite 3.8.0.2)
[root@files2 /var/tmp]# pkgin se bash
bash-doc-2.05.2 Documentation for the GNU Bourne Again Shell
bash-completion-2.1 Programmable completion specifications for bash
bash-4.2nb3 = The GNU Bourne Again Shell
bash-2.05.2.7nb11 > The GNU Bourne Again Shell (version 2)

=: package is installed and up-to-date
<: package is installed but newer version is available

: installed package has a greater version than available package

Chef uses the bash-[0-9]* thing to figure out what to install which is expected in the correct order.

from pkgin.

mamash avatar mamash commented on July 20, 2024

Jacques, I don't know if you're doing some extra, but we cannot reproduce that problem on JPC. I.e. yes, pkgin still has the ancient problem that it can't sort the output properly, but that doesn't have any effect on what package gets installed.

[root@f0f6fdeb-096e-4c36-bebf-f079a769c79e ~]# cat /etc/pkgsrc_version
release: 2013Q4
architecture: i386
[root@f0f6fdeb-096e-4c36-bebf-f079a769c79e ~]# pkgin -v
pkgin 0.6.4 for SunOS-5.11 i386 (using SQLite 3.8.2)
[root@f0f6fdeb-096e-4c36-bebf-f079a769c79e ~]# pkgin se bash
dash-0.5.7           Debian Almquist shell, POSIX-compliant shell faster than bash
bash-doc-2.05.2      Documentation for the GNU Bourne Again Shell
bash-completion-2.1  Programmable completion specifications for bash
bash-4.2nb3          The GNU Bourne Again Shell
bash-2.05.2.7nb11    The GNU Bourne Again Shell (version 2)

=: package is installed and up-to-date
<: package is installed but newer version is available
>: installed package has a greater version than available package
[root@f0f6fdeb-096e-4c36-bebf-f079a769c79e ~]# pkgin in bash
calculating dependencies... done.

nothing to upgrade.
2 packages to be installed: binutils-2.23.2nb1 bash-4.2nb3 (10M to download, 39M to install)

proceed ? [Y/n] n

Are you saying you're taking the output of 'pkgin se' and grepping for bash? That would explain your problem, but you should really let pkgin do its job (e.g. 'pkgin in bash-4') rather than rely on wrapping around its output (which is anything but machine parse friendly).

from pkgin.

jacques avatar jacques commented on July 20, 2024
[root@ross ~]# pkgin se node
tex-pst-node-1.15    Draw connections using pstricks
p5-Tree-DAG_Node-1.06nb3 = Class for representing nodes in a tree
nodejs-0.8.9 >       V8 JavaScript for clients and servers
nodejs-0.8.6 >       V8 JavaScript for clients and servers
nodejs-0.8.23 <      V8 JavaScript for clients and servers
nodejs-0.8.22 <      V8 JavaScript for clients and servers
nodejs-0.8.18 <      V8 JavaScript for clients and servers
nodejs-0.8.16 =      V8 JavaScript for clients and servers
nodejs-0.8.14 >      V8 JavaScript for clients and servers
nodejs-0.8.11 >      V8 JavaScript for clients and servers
nodejs-0.6.21 >      Evented I/O for V8 javascript
nodejs-0.10.5 <      V8 JavaScript for clients and servers
nodejs-0.10.4 <      V8 JavaScript for clients and servers
nodejs-0.10.3 <      V8 JavaScript for clients and servers
nodejs-0.10.2 <      V8 JavaScript for clients and servers
nodejs-0.10.1 <      V8 JavaScript for clients and servers
nodejs-0.10.0 <      V8 JavaScript for clients and servers
munin-node-2.0.7nb1  System monitoring tool, client version
munin-node-2.0.0     System monitoring tool, client version
munin-common-2.0.7   Common components between a munin node and master
munin-common-1.4.5   Common components between a munin node and master

=: package is installed and up-to-date
<: package is installed but newer version is available
>: installed package has a greater version than available package
[root@ross ~]# pkgin -v
pkgin 0.6.0 for SunOS-5.11 i386 (using SQLite 3.7.7.1)

from pkgin.

jacques avatar jacques commented on July 20, 2024

https://github.com/opscode/chef/blob/master/lib/chef/provider/package/smartos.rb

from pkgin.

mamash avatar mamash commented on July 20, 2024

Yeah, I think you're really hitting two 'issues'. First, all pkgin listings should be name/version sorted. Second, there should be a machine parseable output (no progress bars, no headings etc.).

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

The alphabetic order issue is only concerning pkgin se right ?
About the machine parseable, we could add a -q|--quiet flag, would this suit the need?

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

All,
what would be the wanted behaviour as "machine parseable output"? Getting rid of the progressbar is understood, what other elements would you like to make disappear for an automated behaviour?

from pkgin.

mamash avatar mamash commented on July 20, 2024

I'd get rid of any headers/footers, and consider using a single delimiter for the columns. Right now it seems to be just a (eventually random) bunch of spaces (i.e. not even a tab, even though it looks like one). I understand it might be tough to find a single printable char that'd not conflict with the package COMMENT at any point.

Also, a machine parseable 'pkgin se' would be nice, although I'm not sure where to put the [<=>] indicator.

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

Actually it's a printf("%-20s ..."), pretty much like pkg_install does.
So I assume we talking about modifying pkgin:

  • install
  • list
  • available
  • search
  • update
  • upgrade
  • full-update

Right?

from pkgin.

mamash avatar mamash commented on July 20, 2024

I hate to be the one spec'ing the request out, as I'm not machine parsing pkgin at all myself... ;) I'd say that available/list/search are the commands that 3rd party tools harvest for information. The formatting of upgrade/full-upgrade output is I believe covered in another ticket. For the rest (install, update), I think it's only important to be able to query for the exit status (did it succeed?).

I'm sorry, I'm in the middle of the openssl-bleeding-its-heart-out crisis right now... ;)

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

Bumping this issue before closing it, pkgin has the -p flag which produces parsable output and disables the progress bar, does this satisfies the initial demand?

from pkgin.

iMilnb avatar iMilnb commented on July 20, 2024

Feature added in pkgin 0.7.0

from pkgin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.