Re: Making a package multiarch (for real)

2014-11-07 Thread Mathieu Malaterre
On Thu, Nov 6, 2014 at 6:43 PM, Jakub Wilk jw...@debian.org wrote:
 Hi Mathieu,

 * Mathieu Malaterre ma...@debian.org, 2014-11-06, 18:10:

 [CC me please]


 [done!]

 $ sudo apt-get upgrade
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 You might want to run 'apt-get -f install' to correct these.
 The following packages have unmet dependencies:
 libcharls1:i386 : Conflicts: libcharls1 but 1.0-5 is installed
 E: Unmet dependencies. Try using -f.


 My guess is that apt tries to upgrade your local package to the one in the
 archive. But that won't work, because the archive version lacks  the
 Multi-Arch field.

 Solution: don't reuse version numbers. :-)

Works nicely thanks much !


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/ca+7wuszpva+azxb5xsj9dhb4zovr5mbazd2ekghk-grkxvv...@mail.gmail.com



Re: Making a package multiarch (for real)

2014-11-07 Thread Mathieu Malaterre
On Thu, Nov 6, 2014 at 6:57 PM, Wookey woo...@wookware.org wrote:
 +++ Mathieu Malaterre [2014-11-06 18:10 +0100]:
 [CC me please]

 I am trying to make CharLS a true multiarch capable package. However I
 fail to understand what I did wrong.

 Steps:
 $ apt-get source charls
 $ cd charls-1.0
 $ vim debian/control
 - mark libcharls-dev as `Multi-Arch: foreign` and libcharls1 as
 `Multi-Arch: same`

 In general -dev packages should be :same, along with the library
 packages, then -dev packages for build and host arches can be
 co-installed for cross-compiling. I know the docs are out of date on
 this point, but please do both unless it is difficult for some reason.

Ok. I'll upload new charls packages with Multiarch: same set on both
-dev and real shared lib package. Thanks for the clarification.

-M


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/ca+7wusyybzztkzzygax6iqmwt3z9kvvb-nhfcaqqyp7ab7q...@mail.gmail.com



Making a package multiarch (for real)

2014-11-06 Thread Mathieu Malaterre
[CC me please]

I am trying to make CharLS a true multiarch capable package. However I
fail to understand what I did wrong.

Steps:
$ apt-get source charls
$ cd charls-1.0
$ vim debian/control
- mark libcharls-dev as `Multi-Arch: foreign` and libcharls1 as
`Multi-Arch: same`

Build on both amd64 and i386:

$ dpkg -I libcharls1_1.0-5_amd64.deb | grep same
 Multi-Arch: same
$ dpkg -I libcharls1_1.0-5_i386.deb | grep same
 Multi-Arch: same

shared lib are using proper multiarch paths:

$ dpkg -c libcharls1_1.0-5_amd64.deb
drwxr-xr-x root/root 0 2014-11-06 17:53 ./
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/doc/
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/doc/libcharls1/
-rw-r--r-- root/root   750 2014-11-06 16:23
./usr/share/doc/libcharls1/changelog.Debian.gz
-rw-r--r-- root/root  1860 2014-11-06 16:23
./usr/share/doc/libcharls1/copyright
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/lib/
drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root198824 2014-11-06 17:53
./usr/lib/x86_64-linux-gnu/libCharLS.so.1.0
lrwxrwxrwx root/root 0 2014-11-06 17:53
./usr/lib/x86_64-linux-gnu/libCharLS.so.1 - libCharLS.so.1.0

and:

$ dpkg -c libcharls1_1.0-5_i386.deb
drwxr-xr-x root/root 0 2014-11-06 17:54 ./
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/doc/
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/doc/libcharls1/
-rw-r--r-- root/root   750 2014-11-06 16:23
./usr/share/doc/libcharls1/changelog.Debian.gz
-rw-r--r-- root/root  1860 2014-11-06 16:23
./usr/share/doc/libcharls1/copyright
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/lib/
drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/lib/i386-linux-gnu/
-rw-r--r-- root/root198060 2014-11-06 17:54
./usr/lib/i386-linux-gnu/libCharLS.so.1.0
lrwxrwxrwx root/root 0 2014-11-06 17:54
./usr/lib/i386-linux-gnu/libCharLS.so.1 - libCharLS.so.1.0


Install:

$ sudo dpkg -i libcharls1_1.0-5_amd64.deb libcharls1_1.0-5_i386.deb
(Reading database ... 252480 files and directories currently installed.)
Preparing to unpack libcharls1_1.0-5_amd64.deb ...
Unpacking libcharls1:amd64 (1.0-5) over (1.0-5) ...
Preparing to unpack libcharls1_1.0-5_i386.deb ...
Unpacking libcharls1:i386 (1.0-5) over (1.0-5) ...
Setting up libcharls1:amd64 (1.0-5) ...
Setting up libcharls1:i386 (1.0-5) ...
Processing triggers for libc-bin (2.19-12) ...

But then:

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libcharls1:i386 : Conflicts: libcharls1 but 1.0-5 is installed
E: Unmet dependencies. Try using -f.


How do I get a detailed diagnosis of the conflicting files ?


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/CA+7wUszc=5cp_yy+wroxmorr3mgajogx8w4yrtznh4ky19+...@mail.gmail.com



Re: Making a package multiarch (for real)

2014-11-06 Thread Jakub Wilk

Hi Mathieu,

* Mathieu Malaterre ma...@debian.org, 2014-11-06, 18:10:

[CC me please]


[done!]


$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libcharls1:i386 : Conflicts: libcharls1 but 1.0-5 is installed
E: Unmet dependencies. Try using -f.


My guess is that apt tries to upgrade your local package to the one in 
the archive. But that won't work, because the archive version lacks  
the Multi-Arch field.


Solution: don't reuse version numbers. :-)

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141106174355.ga8...@jwilk.net



Re: Making a package multiarch (for real)

2014-11-06 Thread Wookey
+++ Mathieu Malaterre [2014-11-06 18:10 +0100]:
 [CC me please]
 
 I am trying to make CharLS a true multiarch capable package. However I
 fail to understand what I did wrong.
 
 Steps:
 $ apt-get source charls
 $ cd charls-1.0
 $ vim debian/control
 - mark libcharls-dev as `Multi-Arch: foreign` and libcharls1 as
 `Multi-Arch: same`

In general -dev packages should be :same, along with the library
packages, then -dev packages for build and host arches can be
co-installed for cross-compiling. I know the docs are out of date on
this point, but please do both unless it is difficult for some reason.
 
 Build on both amd64 and i386:
 
 $ dpkg -I libcharls1_1.0-5_amd64.deb | grep same
  Multi-Arch: same
 $ dpkg -I libcharls1_1.0-5_i386.deb | grep same
  Multi-Arch: same
 
 shared lib are using proper multiarch paths:
 
 $ dpkg -c libcharls1_1.0-5_amd64.deb
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/doc/
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/share/doc/libcharls1/
 -rw-r--r-- root/root   750 2014-11-06 16:23
 ./usr/share/doc/libcharls1/changelog.Debian.gz
 -rw-r--r-- root/root  1860 2014-11-06 16:23
 ./usr/share/doc/libcharls1/copyright
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/lib/
 drwxr-xr-x root/root 0 2014-11-06 17:53 ./usr/lib/x86_64-linux-gnu/
 -rw-r--r-- root/root198824 2014-11-06 17:53
 ./usr/lib/x86_64-linux-gnu/libCharLS.so.1.0
 lrwxrwxrwx root/root 0 2014-11-06 17:53
 ./usr/lib/x86_64-linux-gnu/libCharLS.so.1 - libCharLS.so.1.0
 
 and:
 
 $ dpkg -c libcharls1_1.0-5_i386.deb
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/doc/
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/share/doc/libcharls1/
 -rw-r--r-- root/root   750 2014-11-06 16:23
 ./usr/share/doc/libcharls1/changelog.Debian.gz
 -rw-r--r-- root/root  1860 2014-11-06 16:23
 ./usr/share/doc/libcharls1/copyright
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/lib/
 drwxr-xr-x root/root 0 2014-11-06 17:54 ./usr/lib/i386-linux-gnu/
 -rw-r--r-- root/root198060 2014-11-06 17:54
 ./usr/lib/i386-linux-gnu/libCharLS.so.1.0
 lrwxrwxrwx root/root 0 2014-11-06 17:54
 ./usr/lib/i386-linux-gnu/libCharLS.so.1 - libCharLS.so.1.0
 
 
 Install:
 
 $ sudo dpkg -i libcharls1_1.0-5_amd64.deb libcharls1_1.0-5_i386.deb
 (Reading database ... 252480 files and directories currently installed.)
 Preparing to unpack libcharls1_1.0-5_amd64.deb ...
 Unpacking libcharls1:amd64 (1.0-5) over (1.0-5) ...
 Preparing to unpack libcharls1_1.0-5_i386.deb ...
 Unpacking libcharls1:i386 (1.0-5) over (1.0-5) ...
 Setting up libcharls1:amd64 (1.0-5) ...
 Setting up libcharls1:i386 (1.0-5) ...
 Processing triggers for libc-bin (2.19-12) ...
 
 But then:
 
 $ sudo apt-get upgrade
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 You might want to run 'apt-get -f install' to correct these.
 The following packages have unmet dependencies:
  libcharls1:i386 : Conflicts: libcharls1 but 1.0-5 is installed
 E: Unmet dependencies. Try using -f.

I presume you are on an amd64 box? 

It's not obvious what's wrong there. Is your package available
somewhere to look at?

 How do I get a detailed diagnosis of the conflicting files ?

Good question. I usually use aptitude but it's not great for multiarch
issues. does apt-get -f install help?

Wookey
-- 
Principal hats:  Linaro, Emdebian, Wookware, Balloonboard, ARM
http://wookware.org/


-- 
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141106175709.gk28...@stoneboat.aleph1.co.uk



Re: Making a package multiarch (for real)

2014-11-06 Thread David Kalnischkies
On Thu, Nov 06, 2014 at 06:43:55PM +0100, Jakub Wilk wrote:
 * Mathieu Malaterre ma...@debian.org, 2014-11-06, 18:10:
 $ sudo apt-get upgrade
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 You might want to run 'apt-get -f install' to correct these.
 The following packages have unmet dependencies:
 libcharls1:i386 : Conflicts: libcharls1 but 1.0-5 is installed
 E: Unmet dependencies. Try using -f.
 
 My guess is that apt tries to upgrade your local package to the one in the
 archive. But that won't work, because the archive version lacks  the
 Multi-Arch field.
 
 Solution: don't reuse version numbers. :-)

That is indeed the solution, the problem is the inverse though:
apt isn't detecting that the two versions (the one online and the one in
the status file) are different as it isn't considering the Multi-Arch
field in this test [in the version you run, apt/experimental does].

So, apt is parsing the online one (without Multi-Arch and hence with the
implicit Conflicts) first and recognizes the status file stanza as a
duplicate it then records as an other source for this version.
You can observe this with apt-cache policy $pkg.

Change something of value (Depends line for example) and apt detects it
properly. Remember though that not all tools go to all this trouble:
Many have the quite reasonable same version == same package assumption.

In other words: Go and change the version number already. ;)


Best regards

David Kalnischkies

P.S.: I say 'apt' here, but I mean 'any tool based on libapt', so you
have the same problem regardless of if you use apt-get or a software-
center. All bets are off if we talk about non-apt-based tools…


signature.asc
Description: Digital signature