File: README.source

package info (click to toggle)
libmtp 1.1.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,056 kB
  • sloc: ansic: 29,517; sh: 4,362; makefile: 188; python: 26; perl: 13
file content (64 lines) | stat: -rw-r--r-- 2,744 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
This process of old libmtp rules files will take a looooong time to fade away, 
possibly after the next stable release of Debian.

There's quite a load of stuff to check in the Debian package. They originally 
came from an Ubuntu patch. The reason is because the libmtp files rule was *not* 
placed in the correct folder. It's a bit tricky to understand what is actually 
going on, so I will try to make it as simple as possible.

The story goes like this:

- DEFAULT folder for the standard (package-default) libmtp8.rules must be: 
  /lib/udev/rules.d/

- DEFAULT (package-default) rules file in DEFAULT folder should be prefixed, 
  we used "45-", so the new rules file is: 
  /lib/udev/rules.d/45-libmtp8.rules

- USER-MODIFIED libmtp8.rules must be in folder:
  /etc/udev/rules.d/

- Any USER-MODIFIED libmtp*.rules that were modified in the past, should go in folder:
  /etc/udev/rules.d/

Notes and actions taken:
- /etc/udev/libmtp.rules was/is used in libmtp5 and libmtp6 libmtp6 (<< 0.2.1-2)
- /etc/udev/rules.d/libmtp8.rules (the link to /etc/udev/libmtp8.rules) has to be removed.
- Any other symlinks (e.g. /etc/udev/rules.d/libmtp.rules of older libmtp{5,6} packages) have to be removed.
- /etc/udev/libmtp8.rules (the file) has to go to /etc/udev/rules.d/libmtp8.rules

Notes for the future:
- It doesn't make sense to have a versioned libmtp[0-9]+.rules file.
  Should be replaced by a non-versioned libmtp.rules file. That file should be in libmtp-common.

libmtp.preinst.in
------------------
During an install or an upgrade libmtp.preinst.in is processed:
- PART A:
  * Checks if the installed version is 0.3.7-3 or less
    * Removes the current link file: /etc/udev/rules.d/libmtp8.rules
    * Prepares to move the conffile of currently installed package to the new 
      folder: /etc/udev/libmtp8.rules

- PART B: 
  * Does not remove /etc/udev/libmtp.rules file if libmtp5 or libmtp6 
    (<< 0.2.1-2) is installed.

- PART C:
  * Disabled until the package libmtp-common is made
  * Remove conffile /lib/udev/rules.d/45-libmtp8.rules
    - This is the package-default, do not mix with user-modified 
      /etc/udev/rules.d/45-libmtp8.rules
    - Will be replaced by unversioned /lib/udev/rules.d/45-libmtp.rules

libmtp.postinst.in
------------------
After the above installfest, libmtp.postinst.in is executed:
- PART A: Removes link /etc/udev/rules.d/libmtp8.rules if its file-target does not exist
- PART B: Removes link /etc/udev/rules.d/libmtp.rules if its file-target does not exist
- PART C:
  * Check if package version is 0.3.7-3 or less
    * If rules file is in /etc/udev/, move it to correct path /etc/udev/rules.d/ with 45- prefix

 -- Savvas Radevic <vicedar@gmail.com>  Thu, 30 Jul 2009 09:56:33 +0200