Upload var/lib/dpkg/info/debconf.postinst with huggingface_hub
Browse files
var/lib/dpkg/info/debconf.postinst
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
set -e
|
3 |
+
|
4 |
+
if [ -z "$DEBIAN_HAS_FRONTEND" ] && [ "$1" = configure ] && [ -n "$2" ] && \
|
5 |
+
dpkg --compare-versions "$2" lt 1.1.0; then
|
6 |
+
# Transition from old database format before debconf starts up.
|
7 |
+
if dpkg --compare-versions "$2" lt 0.9.00; then
|
8 |
+
if [ -e /var/lib/debconf/config.db -o -e /var/lib/debconf/templates.db ]; then
|
9 |
+
/usr/share/debconf/transition_db.pl
|
10 |
+
fi
|
11 |
+
# This package used to add itself to apt.conf. That could result in
|
12 |
+
# a zero-byte file, since it no longer does. Detect that and remove
|
13 |
+
# the file.
|
14 |
+
if [ ! -s /etc/apt/apt.conf ]; then
|
15 |
+
rm -f /etc/apt/apt.conf
|
16 |
+
fi
|
17 |
+
fi
|
18 |
+
|
19 |
+
# Fix up broken db's before debconf starts up.
|
20 |
+
if dpkg --compare-versions "$2" lt 1.0.25; then
|
21 |
+
/usr/share/debconf/fix_db.pl
|
22 |
+
fi
|
23 |
+
|
24 |
+
# configdb splits into passworded and non-passworded parts, before debconf
|
25 |
+
# starts up. Do so only if the debconf.conf has the new databases in it.
|
26 |
+
if dpkg --compare-versions "$2" lt 1.1.0 &&
|
27 |
+
perl -e 'use Debconf::Db; Debconf::Db->load; for (@ARGV) { exit 1 unless
|
28 |
+
Debconf::DbDriver->driver($_) }' config passwords; then
|
29 |
+
# copies in only the passwords, of course
|
30 |
+
debconf-copydb config passwords
|
31 |
+
# makes a new config with only non-passwords in it
|
32 |
+
debconf-copydb config newconfig \
|
33 |
+
-c Name:newconfig \
|
34 |
+
-c Driver:File \
|
35 |
+
-c Reject-Type:password \
|
36 |
+
-c Filename:/var/cache/debconf/newconfig.dat \
|
37 |
+
-c Mode:644
|
38 |
+
mv -f /var/cache/debconf/newconfig.dat /var/cache/debconf/config.dat
|
39 |
+
fi
|
40 |
+
fi
|
41 |
+
|
42 |
+
. /usr/share/debconf/confmodule
|
43 |
+
|
44 |
+
if [ "$1" = configure ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt 1.3.11; then
|
45 |
+
# Remove old debconf database, and associated cruft in /var/lib/debconf.
|
46 |
+
# In fact, the whole directory can go! Earlier versions of debconf in the
|
47 |
+
# 0.9.x series kept it just in case, so make sure to delete it on upgrade
|
48 |
+
# from any of those versions, or even older versions.
|
49 |
+
if dpkg --compare-versions "$2" lt 0.9.50; then
|
50 |
+
rm -rf /var/lib/debconf
|
51 |
+
fi
|
52 |
+
|
53 |
+
# Kill db cruft.
|
54 |
+
if dpkg --compare-versions "$2" lt 0.9.73; then
|
55 |
+
# It may not be present, if upgrading from long ago.
|
56 |
+
db_unregister foo/bar || true
|
57 |
+
db_unregister debconf/switch-to-slang || true
|
58 |
+
fi
|
59 |
+
if dpkg --compare-versions "$2" lt 1.3.11; then
|
60 |
+
db_unregister debconf/showold || true
|
61 |
+
fi
|
62 |
+
|
63 |
+
# The Text frontend became the Readline frontend.
|
64 |
+
if dpkg --compare-versions "$2" lt 1.0.10; then
|
65 |
+
db_get debconf/frontend || true
|
66 |
+
if [ "$RET" = Text ]; then
|
67 |
+
db_set debconf/frontend Readline || true
|
68 |
+
fi
|
69 |
+
fi
|
70 |
+
fi
|
71 |
+
|
72 |
+
# Automatically added by dh_installdeb/12.2.3ubuntu1
|
73 |
+
dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/debconf 1.5.58~ -- "$@"
|
74 |
+
# End automatically added section
|
75 |
+
|