Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-17 Thread Dmitriy Matrosov

On 09/16/12 22:32, Sharon Kimble wrote:
 On 15 September 2012 19:45, Dmitriy Matrosov sgf@gmail.com wrote:
 On 09/15/12 21:38, Andrei POPESCU wrote:

 On Sb, 15 sep 12, 12:53:46, Ed Jabbour wrote:

 I'd like to remove packages gotten from deb-multimedia and replace
 some from the Debian repos.  However, removing them will also remove a
 bunch  of libs and kde progs. E.g., apt-get remove libavcodec53
 yields:

 0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.

 I'm not up to reinstalling 190 packages.  apt-get install that pkg
 just tells me that libavcodec53 is already the newest version.  Is
 there any way around this?  Is it possible to easily replace the deb-
 multimedia pkgs with the Debian ones?


 It's possible. I've done it with aptitude by looking up each package
 from the list generated by the command below and selecting the Debian
 version instead of the deb-multimedia version.

  aptitude search ~S~i~Omultimedia

 With apt-get you would have to build up a big command line like

  apt-get install package1/version1 package2/versions ...

 because there are lots of interdependencies which would get in the way.

 You can find packages from deb-multimedia without aptitude as well. 
Like so


 $ dpkg-query -Wf '${Package}\n' \
  | xargs -d'\n' sh -euf -c '
 apt-cache showpkg $@ \
 | sed -ne
 s/^Package: //p;
 /^Versions:/,/^Reverse Depends:/{
 
\_^[^[:space:]].*(/var/lib/dpkg/status)_p;

 }; \
 | sed -neN; /_deb.multimedia_/P;
 ' sh

 I tried this on a wheezy installation, and it failed, so I tried
 sending it to a 'dpkg.txt' and I got a null output on it although I
 know that I do have some files from that repository. I'd like to know
 how to get it working on wheezy please?

Ok. First, i'll explain what it does, and may be this will help you to 
fix it,

because this command relies on names and output formatting and is not very
reliable, to be honest.  I'll get list of all packages, like

$ dpkg-query -Wf '${Package}\n' | head -n3
ace-gperf
acl
acpi

then i execute short script. Though, script is executed for as many 
arguments
as possible, this is just for performance reasons. I use `apt-cache 
showpkg`,
because it displays version with path to corresponding repository 
(repository

'Packages' file in fact, cached in /var/lib/apt/lists) and, if package is
installed (see note [1]), path to dpkg status file (/var/lib/dpkg/status).
Let's see how it looks:

# apt-cache showpkg hello
Package: hello
Versions:
2.8-2 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_wheezy_main_binary-i386_Packages) 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_sid_main_binary-i386_Packages)

 Description Language: en
 File: 
/var/lib/apt/lists/shilvana.local:3142_debian_dists_wheezy_main_i18n_Translation-en

  MD5: b7df6fe7ffb325083a3a60819a7df548
 Description Language:
 File: 
/var/lib/apt/lists/shilvana.local:3142_debian_dists_wheezy_main_binary-i386_Packages

  MD5: b7df6fe7ffb325083a3a60819a7df548

2.6-1 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_squeeze_main_binary-i386_Packages) 
(/var/lib/dpkg/status)

 Description Language: en
 File: 
/var/lib/apt/lists/shilvana.local:3142_debian_dists_wheezy_main_i18n_Translation-en

  MD5: b7df6fe7ffb325083a3a60819a7df548
 Description Language:
 File: 
/var/lib/apt/lists/shilvana.local:3142_debian_dists_squeeze_main_binary-i386_Packages

  MD5: b7df6fe7ffb325083a3a60819a7df548


Reverse Depends:
..

the interesting lines are these two:

2.8-2 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_wheezy_main_binary-i386_Packages) 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_sid_main_binary-i386_Packages)
2.6-1 
(/var/lib/apt/lists/shilvana.local:3142_debian_dists_squeeze_main_binary-i386_Packages) 
(/var/lib/dpkg/status)


as you may see, they have the form:

^version (path) (path)

Now to choose only installed packages, i should check, that one of package's
version lines contain (/var/lib/dpkg/status). And to determine from what
repository package came from, i should check other path entries. Let's 
try it

with sed:

apt-cache showpkg hello \
| sed -ne
s/^Package: //p;
/^Versions:/,/^Reverse Depends:/{
\_^[^[:space:]].*(/var/lib/dpkg/status)_p;
};


I print package name, then for range starting at /^Versions:/ and ending at
/^Reverse Depends:/ i choose lines, which start not with [:space:] and 
contain

(/var/lib/dpkg/status). Result will look like:

hello
2.6-1 

Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-17 Thread Dmitriy Matrosov

On 09/17/12 13:05, Dmitriy Matrosov wrote:


[1]: Though, note, that (/var/lib/dpkg/status) file will be listed in
`apt-cache showpkg` output even for uninstalled packages, which config 
files

still present. E.g.  for status, like:

Status: deinstall ok config-files

Just want to add: if you need to exclude these packages (like ones with 
status
'deinstall ok config-files') you may do this by filtering dpkg-query 
output, like so


$ dpkg-query -Wf '${Package}\t${Status}\n' | sed -ne '/install ok 
installed/s/\t.*//p'



--
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/50570dd7.3060...@gmail.com



Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-16 Thread Sharon Kimble
On 15 September 2012 19:45, Dmitriy Matrosov sgf@gmail.com wrote:
 On 09/15/12 21:38, Andrei POPESCU wrote:

 On Sb, 15 sep 12, 12:53:46, Ed Jabbour wrote:

 I'd like to remove packages gotten from deb-multimedia and replace
 some from the Debian repos.  However, removing them will also remove a
 bunch  of libs and kde progs. E.g., apt-get remove libavcodec53
 yields:

 0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.

 I'm not up to reinstalling 190 packages.  apt-get install that pkg
 just tells me that libavcodec53 is already the newest version.  Is
 there any way around this?  Is it possible to easily replace the deb-
 multimedia pkgs with the Debian ones?


 It's possible. I've done it with aptitude by looking up each package
 from the list generated by the command below and selecting the Debian
 version instead of the deb-multimedia version.

  aptitude search ~S~i~Omultimedia

 With apt-get you would have to build up a big command line like

  apt-get install package1/version1 package2/versions ...

 because there are lots of interdependencies which would get in the way.

 You can find packages from deb-multimedia without aptitude as well. Like so

 $ dpkg-query -Wf '${Package}\n' \
  | xargs -d'\n' sh -euf -c '
 apt-cache showpkg $@ \
 | sed -ne
 s/^Package: //p;
 /^Versions:/,/^Reverse Depends:/{
 \_^[^[:space:]].*(/var/lib/dpkg/status)_p;
 }; \
 | sed -neN; /_deb.multimedia_/P;
 ' sh

I tried this on a wheezy installation, and it failed, so I tried
sending it to a 'dpkg.txt' and I got a null output on it although I
know that I do have some files from that repository. I'd like to know
how to get it working on wheezy please?

Thanks
Sharon.

 Result of this command will be list of packages, which are installed
 (referenced
 from /var/lig/dpkg/status) and that are available from deb-multimedia. If
 this package
 version also available from other source (like squeeze repository), it
 _
A taste of linux = http://www.sharons.org.uk/taste/index.html
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian Wheezy, xfce 4.8, LibreOffice 3.5.4.2
Registered Linux user 334501


-- 
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/CAM9u--eK19R_Au3qpZSiOQH3D009=wbifqkkvzpw8xmsxfe...@mail.gmail.com



Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-16 Thread Rob Owens
On Sat, Sep 15, 2012 at 12:53:46PM -0400, Ed Jabbour wrote:
 I'd like to remove packages gotten from deb-multimedia and replace 
 some from the Debian repos.  However, removing them will also remove a 
 bunch  of libs and kde progs. E.g., apt-get remove libavcodec53 
 yields:
 
 0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.
 
 I'm not up to reinstalling 190 packages.  apt-get install that pkg 
 just tells me that libavcodec53 is already the newest version.  Is 
 there any way around this?  Is it possible to easily replace the deb-
 multimedia pkgs with the Debian ones?
 
I haven't tried this, but it seems like it would work:

1)  Remove the deb-multimedia packages using dpkg instead of apt

2)  Remove deb-multimedia from sources.list

3)  apt-get install -f

-Rob


-- 
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/20120916211305.gb3...@aurora.owens.net



Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-16 Thread Andrei POPESCU
On Du, 16 sep 12, 17:13:05, Rob Owens wrote:
 
 I haven't tried this, but it seems like it would work:
 
 1)  Remove the deb-multimedia packages using dpkg instead of apt
 
Unless I'm mistaken this needs --force-depends

 2)  Remove deb-multimedia from sources.list
 
 3)  apt-get install -f

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-15 Thread Andrei POPESCU
On Sb, 15 sep 12, 12:53:46, Ed Jabbour wrote:
 I'd like to remove packages gotten from deb-multimedia and replace 
 some from the Debian repos.  However, removing them will also remove a 
 bunch  of libs and kde progs. E.g., apt-get remove libavcodec53 
 yields:
 
 0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.
 
 I'm not up to reinstalling 190 packages.  apt-get install that pkg 
 just tells me that libavcodec53 is already the newest version.  Is 
 there any way around this?  Is it possible to easily replace the deb-
 multimedia pkgs with the Debian ones?

It's possible. I've done it with aptitude by looking up each package 
from the list generated by the command below and selecting the Debian 
version instead of the deb-multimedia version.

aptitude search ~S~i~Omultimedia

With apt-get you would have to build up a big command line like

apt-get install package1/version1 package2/versions ... 

because there are lots of interdependencies which would get in the way.

You could also try pinning deb-multimedia to -1, and try an 'install', 
possibly with '-f'.

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-15 Thread Dmitriy Matrosov

On 09/15/12 21:38, Andrei POPESCU wrote:

On Sb, 15 sep 12, 12:53:46, Ed Jabbour wrote:

I'd like to remove packages gotten from deb-multimedia and replace
some from the Debian repos.  However, removing them will also remove a
bunch  of libs and kde progs. E.g., apt-get remove libavcodec53
yields:

0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.

I'm not up to reinstalling 190 packages.  apt-get install that pkg
just tells me that libavcodec53 is already the newest version.  Is
there any way around this?  Is it possible to easily replace the deb-
multimedia pkgs with the Debian ones?


It's possible. I've done it with aptitude by looking up each package
from the list generated by the command below and selecting the Debian
version instead of the deb-multimedia version.

 aptitude search ~S~i~Omultimedia

With apt-get you would have to build up a big command line like

 apt-get install package1/version1 package2/versions ...

because there are lots of interdependencies which would get in the way.

You can find packages from deb-multimedia without aptitude as well. Like so

$ dpkg-query -Wf '${Package}\n' \
 | xargs -d'\n' sh -euf -c '
apt-cache showpkg $@ \
| sed -ne
s/^Package: //p;
/^Versions:/,/^Reverse Depends:/{
\_^[^[:space:]].*(/var/lib/dpkg/status)_p;
}; \
| sed -neN; /_deb.multimedia_/P;
' sh

Result of this command will be list of packages, which are installed 
(referenced
from /var/lig/dpkg/status) and that are available from deb-multimedia. 
If this package
version also available from other source (like squeeze repository), it 
_also_ will be

listed. Such extra packages may be filtered by editing 2nd sed's regexp.


--
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/5054ccbc.9030...@gmail.com



Re: Removing deb-multimedia pkgs w/o removing everything

2012-09-15 Thread lee
Ed Jabbour e...@att.net writes:

 I'd like to remove packages gotten from deb-multimedia and replace 
 some from the Debian repos.  However, removing them will also remove a 
 bunch  of libs and kde progs. E.g., apt-get remove libavcodec53 
 yields:

 0 upgraded, 1 newly installed, 190 to remove and 1 not upgraded.

 I'm not up to reinstalling 190 packages.

You can look at the list of packages that will be removed and from that
list, you can pick the packages you still want.  After removing the many
packages, make the DMO repository unavailable and just re-install the
few packages you want.  I tried it a while ago, using aptitude.  268
packages were removed --- about five of them I wanted and re-installed
them.  So far, I'm not missing anything.


-- 
Debian testing amd64


-- 
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/87y5kbhzl2@yun.yagibdah.de