Re: Debian package component belonging

2013-05-05 Thread Jerome BENOIT
Hello List,

On 05/05/13 07:07, Bob Proulx wrote:
 Jerome BENOIT wrote:
 Bob Proulx wrote:
 Jerome BENOIT wrote:
 Is there an easy way to get it from the .debian.tar.(gz|bz2|xz) ?

   $ tar xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz --to-stdout 
 debian/control | sed -n '/^Section:/{s/.* //;s@/.*@@p;q}'
   non-free

 You are faster than me. On the other hand, time delay was in your favour.
 
 :-)
 
 Let me continue, for the record:

 For debballs:

 $ dpkg --info | grep ^Section

 and so forth.
 
 Oh!  I didn't know about that option.  Neat!  I learned a new feature.

the reading of

/bin/lesspipe

was helpful.

 
 But that doesn't work on debian.tar.gz files.  That works on .deb
 files.  A different problem!   :-)
 
   $ dpkg --info emacs23-common-non-dfsg_23.4+1-1_all.deb | grep ^Section:
   Section: non-free/editors
 
 Or if it is already installed:
 
   $ dpkg --status emacs23-common-non-dfsg | grep ^Section:
   Section: non-free/editors

My goal is to get the component from files uploaded with `dput'. 

Thanks,
Jerome

 
 Bob

-- 
Jerome BENOIT
jgmbenoit-at+rezozer*dot_net


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51864ee1.5090...@rezozer.net



Re: Debian package component belonging

2013-05-04 Thread Jerome BENOIT
Hi Bob,

On 04/05/13 05:04, Bob Proulx wrote:
 Hi Jerome,
 
 Jerome BENOIT wrote:
 I was looking for a ready to use tool to extract the components:
 I guess I have to write my own stuff to do so.
 
 How about:
 
   $ tar --to-stdout -xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz 
 debian/control | grep ^Section:
   Section: non-free/editors
   Section: non-free/editors
 
 Which can be automated to extract just the field from the packages.
 
   $ tar xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz --to-stdout debian/control 
 | sed -n '/^Section:/{s/.* //;s@/.*@@p;q}'
   non-free

You are faster than me. On the other hand, time delay was in your favour.

Let me continue, for the record:

For debballs:

$ dpkg --info | grep ^Section

and so forth.


Thanks again,
Jerome



 
 Bob


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/5184f4e5.4010...@rezozer.net



Re: Debian package component belonging

2013-05-04 Thread Bob Proulx
Jerome BENOIT wrote:
 Bob Proulx wrote:
  Jerome BENOIT wrote:
   Is there an easy way to get it from the .debian.tar.(gz|bz2|xz) ?
 
$ tar xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz --to-stdout 
  debian/control | sed -n '/^Section:/{s/.* //;s@/.*@@p;q}'
non-free
 
 You are faster than me. On the other hand, time delay was in your favour.

:-)

 Let me continue, for the record:
 
 For debballs:
 
 $ dpkg --info | grep ^Section
 
 and so forth.

Oh!  I didn't know about that option.  Neat!  I learned a new feature.

But that doesn't work on debian.tar.gz files.  That works on .deb
files.  A different problem!   :-)

  $ dpkg --info emacs23-common-non-dfsg_23.4+1-1_all.deb | grep ^Section:
  Section: non-free/editors

Or if it is already installed:

  $ dpkg --status emacs23-common-non-dfsg | grep ^Section:
  Section: non-free/editors

Bob


signature.asc
Description: Digital signature


Debian package component belonging

2013-05-03 Thread Jerome BENOIT
Hello List,

given a package name, how can we know to which Debian component (man, contrib, 
non-free) it belongs ?

Thanks in advance,
Jerome


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51844b39@rezozer.net



Re: Debian package component belonging

2013-05-03 Thread Bob Proulx
Jerome BENOIT wrote:
 given a package name, how can we know to which Debian component
 (man, contrib, non-free) it belongs ?

1. Use apt-cache to show the package header and look to see what
   section it it in.

  $ apt-cache show emacs23-common-non-dfsg | grep Section
  Section: non-free/editors

2.  Use apt-cache to show where a package comes from:

  $ apt-cache policy emacs23-common-non-dfsg
  emacs23-common-non-dfsg:
Installed: 23.4+1-1
Candidate: 23.4+1-1
Version table:
   *** 23.4+1-1 0
  500 http://ftp.us.debian.org/debian/ sid/non-free amd64 Packages
  500 http://ftp.us.debian.org/debian/ testing/non-free amd64 Packages
  100 /var/lib/dpkg/status

3. Look for it here.  Scroll down to Search package directories,
   Select any, Enter the name in the form and hit Enter.

  http://www.debian.org/distrib/packages

Ends up here:

  http://packages.debian.org/sid/emacs23-common-non-dfsg

4. Install 'vrms' and wait for the email nagging you about non-free
   packages that you have installed! :-)

Bob


signature.asc
Description: Digital signature


Re: Debian package component belonging

2013-05-03 Thread Jerome BENOIT
Hi Bob !

On 04/05/13 01:49, Bob Proulx wrote:
 Jerome BENOIT wrote:
 given a package name, how can we know to which Debian component
 (man, contrib, non-free) it belongs ?
 
 1. Use apt-cache to show the package header and look to see what
section it it in.
 
   $ apt-cache show emacs23-common-non-dfsg | grep Section
   Section: non-free/editors
 
 2.  Use apt-cache to show where a package comes from:
 
   $ apt-cache policy emacs23-common-non-dfsg
   emacs23-common-non-dfsg:
 Installed: 23.4+1-1
 Candidate: 23.4+1-1
 Version table:
*** 23.4+1-1 0
   500 http://ftp.us.debian.org/debian/ sid/non-free amd64 Packages
   500 http://ftp.us.debian.org/debian/ testing/non-free amd64 Packages
   100 /var/lib/dpkg/status
 
 3. Look for it here.  Scroll down to Search package directories,
Select any, Enter the name in the form and hit Enter.
 
   http://www.debian.org/distrib/packages
 
 Ends up here:
 
   http://packages.debian.org/sid/emacs23-common-non-dfsg
 
 4. Install 'vrms' and wait for the email nagging you about non-free
packages that you have installed! :-)

I understand now that the component is contained in the Section field, `main' 
not being given.

5.

Is there an easy way to get it from the .debian.tar.(gz|bz2|xz) ?

Thanks again,
Jerome

 
 Bob


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/518455b9.4040...@rezozer.net



Re: Debian package component belonging

2013-05-03 Thread Bob Proulx
Jerome BENOIT wrote:
 Is there an easy way to get it from the .debian.tar.(gz|bz2|xz) ?

Look at the debian/control file.  Look for the Section: field.  What
does it say?  The main/ is implied and so not included.  But any
section that is other than main will be stated there.  If it doesn't
say then it was expected to be in main.

Continuing with my emacs doc example:

  $ grep Section emacs23-non-dfsg-23.4+1/debian/control
  Section: non-free/editors
  Section: non-free/editors

And of course that will be in the .debian.tar.(gz|bz2|xz) file.

Bob


signature.asc
Description: Digital signature


Re: Debian package component belonging

2013-05-03 Thread Jerome BENOIT
Hi Again,

On 04/05/13 03:18, Bob Proulx wrote:
 Jerome BENOIT wrote:
 Is there an easy way to get it from the .debian.tar.(gz|bz2|xz) ?
 
 Look at the debian/control file.

I got this part.
I was looking for a ready to use tool to extract the components:
I guess I have to write my own stuff to do so.

  Look for the Section: field.

In fact it is what I was looking for.

  What
 does it say?  The main/ is implied and so not included.  But any
 section that is other than main will be stated there.  If it doesn't
 say then it was expected to be in main.

Ok

 
 Continuing with my emacs doc example:
 
   $ grep Section emacs23-non-dfsg-23.4+1/debian/control
   Section: non-free/editors
   Section: non-free/editors
 
 And of course that will be in the .debian.tar.(gz|bz2|xz) file.

Indeed

Thanks again,
Jerome

 
 Bob


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/51846a37.1020...@rezozer.net



Re: Debian package component belonging

2013-05-03 Thread Bob Proulx
Hi Jerome,

Jerome BENOIT wrote:
 I was looking for a ready to use tool to extract the components:
 I guess I have to write my own stuff to do so.

How about:

  $ tar --to-stdout -xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz debian/control 
| grep ^Section:
  Section: non-free/editors
  Section: non-free/editors

Which can be automated to extract just the field from the packages.

  $ tar xf emacs23-non-dfsg_23.4+1-1.debian.tar.gz --to-stdout debian/control | 
sed -n '/^Section:/{s/.* //;s@/.*@@p;q}'
  non-free

Bob


signature.asc
Description: Digital signature


Re: Debian package component belonging

2013-05-03 Thread Cláudio E. Elicker
On Sat, 04 May 2013 01:41:45 +0200
Jerome BENOIT g62993...@rezozer.net wrote:

 Hello List,
 
 given a package name, how can we know to which Debian component (man,
 contrib, non-free) it belongs ?
 
 Thanks in advance,
 Jerome
 
 

aptitude -F 'Package: %p - Section: %s' search '^package_name$'



-- 
EMACS is my operating system; Linux is my device driver.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130504004314.50fdb00c@yeh1.parsec