summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog35
-rw-r--r--debian/control2
-rw-r--r--dselect/pkgdisplay.cc2
-rw-r--r--lib/dpkg/buffer.c2
-rw-r--r--lib/dpkg/dump.c22
-rw-r--r--lib/dpkg/parsehelp.c87
-rw-r--r--lib/dpkg/triglib.c6
-rw-r--r--man/dpkg-checkbuilddeps.17
-rw-r--r--man/po/de.po114
-rw-r--r--man/po/fr.po52
-rw-r--r--man/po/sv.po80
-rw-r--r--scripts/Dpkg/Control/Info.pm2
-rw-r--r--scripts/Makefile.am111
-rwxr-xr-xscripts/changelog/debian.pl2
-rwxr-xr-xscripts/dpkg-checkbuilddeps.pl39
-rwxr-xr-xscripts/dpkg-gensymbols.pl2
-rwxr-xr-xscripts/dpkg-scanpackages.pl4
-rwxr-xr-xscripts/dpkg-scansources.pl41
-rw-r--r--scripts/po/de.po82
-rw-r--r--scripts/po/sv.po12
-rw-r--r--scripts/t/200_Dpkg_Shlibs.t64
-rw-r--r--scripts/t/200_Dpkg_Shlibs/ld.so.conf2
-rw-r--r--scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf2
-rw-r--r--scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf2
-rw-r--r--scripts/t/200_Dpkg_Shlibs/objdump.tags-amd6472
-rw-r--r--scripts/t/200_Dpkg_Shlibs/objdump.tags-i38673
-rw-r--r--scripts/t/500_Dpkg_Path.t61
-rw-r--r--scripts/t/600_Dpkg_Changelog.t12
-rw-r--r--scripts/t/700_Dpkg_Control.t8
-rw-r--r--scripts/t/750_Dpkg_Substvars.t4
-rw-r--r--scripts/t/900_update_alternatives.t9
-rwxr-xr-xscripts/update-alternatives.pl8
-rw-r--r--src/enquiry.c42
-rw-r--r--src/help.c16
-rw-r--r--src/query.c2
-rw-r--r--src/statcmd.c30
36 files changed, 505 insertions, 606 deletions
diff --git a/debian/changelog b/debian/changelog
index d33ceaffd..4906813c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,38 @@
+dpkg (1.15.6) UNRELEASED; urgency=low
+
+ [ Raphaël Hertzog ]
+ * debian/control: Add the accent on my first name.
+
+ [ Guillem Jover ]
+ * Handle argument parsing in dpkg-checkbuilddeps and dpkg-scanpackages
+ in a way consistent with the rest of the tools.
+ * Recognize --help in addition to -h in dpkg-checkbuilddeps.
+ * Add a --version option to dpkg-checkbuilddeps.
+ * Improve and mark more messages in writedb() to make translators lifes
+ easier. Closes: #408525
+ * Improve update-alternatives --display output to use two leading spaces
+ for current link and slave information. Use single quotes for both “best”
+ and the alternative it's pointing to. Closes: #549167
+ * Refer to “half configured” instead of “failed config” in «dpkg-query -l»
+ header and dselect package status printing for consistency.
+ * Make “dpkg-statoverride --quiet” actually do something, and quiesce
+ most of the inoquous warning messages. Closes: #403211
+ * Make “dpkg-statoverride --update --add” fail if it cannot update the
+ mode and owner of the file. This would fail later on when dpkg itself
+ applies the overrides, so better to signal this earlier.
+
+ [ Updated man page translations ]
+ * German (Helge Kreutzmann).
+ * Swedish (Peter Krefting).
+ * French (Christian Perrier): correcting inconsistencies for the translation
+ of "original" here and there. Thanks to Julien Valroff for pointing this.
+
+ [ Updated scripts translations ]
+ * German (Helge Kreutzmann).
+ * Swedish (Peter Krefting).
+
+ -- Raphaël Hertzog <hertzog@debian.org> Tue, 17 Nov 2009 17:24:47 +0100
+
dpkg (1.15.5.3) unstable; urgency=low
[ Raphael Hertzog ]
diff --git a/debian/control b/debian/control
index dd101b522..122a64904 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: dpkg
Section: admin
Priority: required
Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
-Uploaders: Guillem Jover <guillem@debian.org>, Raphael Hertzog <hertzog@debian.org>
+Uploaders: Guillem Jover <guillem@debian.org>, Raphaël Hertzog <hertzog@debian.org>
Origin: debian
Bugs: debbugs://bugs.debian.org
Homepage: http://wiki.debian.org/Teams/Dpkg
diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc
index abb318f5e..13ad3268c 100644
--- a/dselect/pkgdisplay.cc
+++ b/dselect/pkgdisplay.cc
@@ -51,7 +51,7 @@ const char
N_("removed (configs remain)"),
N_("half installed"),
N_("unpacked (not set up)"),
- N_("failed config"),
+ N_("half configured (config failed)"),
N_("awaiting trigger processing"),
N_("triggered"),
N_("installed"),
diff --git a/lib/dpkg/buffer.c b/lib/dpkg/buffer.c
index 074ea45c8..cddf9a757 100644
--- a/lib/dpkg/buffer.c
+++ b/lib/dpkg/buffer.c
@@ -198,7 +198,7 @@ buffer_copy_TYPE(PtrPtr, void *, ptr, void *, ptr);
off_t
buffer_hash(const void *input, void *output, int type, off_t limit)
{
- struct buffer_data data = { { output }, type };
+ struct buffer_data data = { .arg.ptr = output, .type = type };
off_t ret;
buffer_init(NULL, &data);
diff --git a/lib/dpkg/dump.c b/lib/dpkg/dump.c
index ffd3641dc..f7baa949a 100644
--- a/lib/dpkg/dump.c
+++ b/lib/dpkg/dump.c
@@ -363,7 +363,7 @@ void writedb(const char *filename, int available, int mustsync) {
struct varbuf vb = VARBUF_INIT;
int old_umask;
- which= available ? "available" : "status";
+ which = available ? _("available") : _("status");
oldfn= m_malloc(strlen(filename)+sizeof(OLDDBEXT));
strcpy(oldfn,filename); strcat(oldfn,OLDDBEXT);
newfn= m_malloc(strlen(filename)+sizeof(NEWDBEXT));
@@ -372,10 +372,11 @@ void writedb(const char *filename, int available, int mustsync) {
old_umask = umask(022);
file= fopen(newfn,"w");
umask(old_umask);
- if (!file) ohshite(_("failed to open `%s' for writing %s information"),filename,which);
+ if (!file)
+ ohshite(_("failed to open '%s' for writing %s database"), filename, which);
if (setvbuf(file,writebuf,_IOFBF,sizeof(writebuf)))
- ohshite(_("unable to set buffering on status file"));
+ ohshite(_("unable to set buffering on %s database file"), which);
it= iterpkgstart();
while ((pigp= iterpkgnext(it)) != NULL) {
@@ -386,7 +387,7 @@ void writedb(const char *filename, int available, int mustsync) {
varbufrecord(&vb,pigp,pifp);
varbufaddc(&vb,'\n'); varbufaddc(&vb,0);
if (fputs(vb.buf,file) < 0)
- ohshite(_("failed to write %s record about `%.50s' to `%.250s'"),
+ ohshite(_("failed to write %s database record about '%.50s' to '%.250s'"),
which, pigp->name, filename);
varbufreset(&vb);
}
@@ -394,18 +395,19 @@ void writedb(const char *filename, int available, int mustsync) {
varbuffree(&vb);
if (mustsync) {
if (fflush(file))
- ohshite(_("failed to flush %s information to `%.250s'"), which, filename);
+ ohshite(_("failed to flush %s database to '%.250s'"), which, filename);
if (fsync(fileno(file)))
- ohshite(_("failed to fsync %s information to `%.250s'"), which, filename);
+ ohshite(_("failed to fsync %s database to '%.250s'"), which, filename);
}
- if (fclose(file)) ohshite(_("failed to close `%.250s' after writing %s information"),
- filename, which);
+ if (fclose(file))
+ ohshite(_("failed to close '%.250s' after writing %s database"),
+ filename, which);
unlink(oldfn);
if (link(filename,oldfn) && errno != ENOENT)
- ohshite(_("failed to link `%.250s' to `%.250s' for backup of %s info"),
+ ohshite(_("failed to link '%.250s' to '%.250s' for backup of %s database"),
filename, oldfn, which);
if (rename(newfn,filename))
- ohshite(_("failed to install `%.250s' as `%.250s' containing %s info"),
+ ohshite(_("failed to install '%.250s' as '%.250s' containing %s database"),
newfn, filename, which);
free(newfn);
free(oldfn);
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index 97ba33cf7..a37df937a 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -80,53 +80,56 @@ parse_warn(struct parsedb_state *ps,
va_end(al);
}
-const struct namevalue booleaninfos[]= { /* Note ! These must be in order ! */
- { "no", 0, 2 },
- { "yes", 1, 3 },
- { NULL }
+#define NAMEVALUE_DEF(n, v) \
+ [v] = { .name = n, .value = v, .length = sizeof(n) - 1 }
+
+const struct namevalue booleaninfos[] = {
+ NAMEVALUE_DEF("no", 0),
+ NAMEVALUE_DEF("yes", 1),
+ { .name = NULL }
};
-const struct namevalue priorityinfos[]= { /* Note ! These must be in order ! */
- { "required", pri_required, 8 },
- { "important", pri_important, 9 },
- { "standard", pri_standard, 8 },
- { "optional", pri_optional, 8 },
- { "extra", pri_extra, 5 },
- { "this is a bug - please report", pri_other, 28 },
- { "unknown", pri_unknown, 7 },
- { NULL }
+const struct namevalue priorityinfos[] = {
+ NAMEVALUE_DEF("required", pri_required),
+ NAMEVALUE_DEF("important", pri_important),
+ NAMEVALUE_DEF("standard", pri_standard),
+ NAMEVALUE_DEF("optional", pri_optional),
+ NAMEVALUE_DEF("extra", pri_extra),
+ NAMEVALUE_DEF("this is a bug - please report", pri_other),
+ NAMEVALUE_DEF("unknown", pri_unknown),
+ { .name = NULL }
};
-const struct namevalue statusinfos[]= { /* Note ! These must be in order ! */
- { "not-installed", stat_notinstalled, 13 },
- { "config-files", stat_configfiles, 12 },
- { "half-installed", stat_halfinstalled, 14 },
- { "unpacked", stat_unpacked, 8 },
- { "half-configured", stat_halfconfigured, 15, },
- { "triggers-awaited", stat_triggersawaited, 16 },
- { "triggers-pending", stat_triggerspending, 16 },
- { "installed", stat_installed, 9 },
+const struct namevalue statusinfos[] = {
+ NAMEVALUE_DEF("not-installed", stat_notinstalled),
+ NAMEVALUE_DEF("config-files", stat_configfiles),
+ NAMEVALUE_DEF("half-installed", stat_halfinstalled),
+ NAMEVALUE_DEF("unpacked", stat_unpacked),
+ NAMEVALUE_DEF("half-configured", stat_halfconfigured),
+ NAMEVALUE_DEF("triggers-awaited", stat_triggersawaited),
+ NAMEVALUE_DEF("triggers-pending", stat_triggerspending),
+ NAMEVALUE_DEF("installed", stat_installed),
/* These are additional entries for reading only, in any order ... */
/* XXX: backwards compat., remove. */
- { "postinst-failed", stat_halfconfigured, 15 },
+ { .name = "postinst-failed", .value = stat_halfconfigured, .length = 15 },
/* XXX: backwards compat., remove. */
- { "removal-failed", stat_halfinstalled, 14 },
- { NULL }
+ { .name = "removal-failed", .value = stat_halfinstalled, .length = 14 },
+ { .name = NULL }
};
-const struct namevalue eflaginfos[]= { /* Note ! These must be in order ! */
- { "ok", eflag_ok, 2 },
- { "reinstreq", eflag_reinstreq, 9 },
- { NULL }
+const struct namevalue eflaginfos[] = {
+ NAMEVALUE_DEF("ok", eflag_ok),
+ NAMEVALUE_DEF("reinstreq", eflag_reinstreq),
+ { .name = NULL }
};
-const struct namevalue wantinfos[]= { /* Note ! These must be in order ! */
- { "unknown", want_unknown, 7 },
- { "install", want_install, 7 },
- { "hold", want_hold, 4 },
- { "deinstall", want_deinstall, 9 },
- { "purge", want_purge, 5 },
- { NULL }
+const struct namevalue wantinfos[] = {
+ NAMEVALUE_DEF("unknown", want_unknown),
+ NAMEVALUE_DEF("install", want_install),
+ NAMEVALUE_DEF("hold", want_hold),
+ NAMEVALUE_DEF("deinstall", want_deinstall),
+ NAMEVALUE_DEF("purge", want_purge),
+ { .name = NULL }
};
const char *illegal_packagename(const char *p, const char **ep) {
@@ -151,12 +154,12 @@ const char *illegal_packagename(const char *p, const char **ep) {
const struct nickname nicknames[]= {
/* NB: capitalisation of these strings is important. */
- { "Recommended", "Recommends" },
- { "Optional", "Suggests" },
- { "Class", "Priority" },
- { "Package-Revision", "Revision" },
- { "Package_Revision", "Revision" },
- { NULL }
+ { .nick = "Recommended", .canon = "Recommends" },
+ { .nick = "Optional", .canon = "Suggests" },
+ { .nick = "Class", .canon = "Priority" },
+ { .nick = "Package-Revision", .canon = "Revision" },
+ { .nick = "Package_Revision", .canon = "Revision" },
+ { .nick = NULL }
};
int informativeversion(const struct versionrevision *version) {
diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 8618158ff..3af221dfd 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -711,9 +711,9 @@ tdm_incorp_trig_end(void)
}
static const struct trigdefmeths tdm_incorp = {
- tdm_incorp_trig_begin,
- tdm_incorp_package,
- tdm_incorp_trig_end
+ .trig_begin = tdm_incorp_trig_begin,
+ .package = tdm_incorp_package,
+ .trig_end = tdm_incorp_trig_end
};
void
diff --git a/man/dpkg-checkbuilddeps.1 b/man/dpkg-checkbuilddeps.1
index 186d5ca32..1ac3bad32 100644
--- a/man/dpkg-checkbuilddeps.1
+++ b/man/dpkg-checkbuilddeps.1
@@ -1,4 +1,4 @@
-.TH dpkg\-checkbuilddeps 1 "2008-08-18" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "2009-11-21" "Debian Project" "dpkg utilities"
.SH NAME
dpkg\-checkbuilddeps \- check build dependencies and conflicts
.
@@ -31,8 +31,11 @@ be built.
Use the given build dependencies/conflicts instead of those contained in the
\fIdebian/control\fP file.
.TP
-.B \-h
+.BR \-h ", " \-\-help
Show the usage message and exit.
+.TP
+.BR \-\-version
+Show the version and exit.
.
.SH AUTHOR
Copyright \(co 2001 Joey Hess
diff --git a/man/po/de.po b/man/po/de.po
index 8c0d031b8..551f3c52b 100644
--- a/man/po/de.po
+++ b/man/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg man pages\n"
"POT-Creation-Date: 2009-11-27 18:45+0100\n"
-"PO-Revision-Date: 2009-11-13 21:10+0100\n"
+"PO-Revision-Date: 2009-11-23 19:34+0100\n"
"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
"Language-Team: de <debian-l10n-german@lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -1529,10 +1529,9 @@ msgstr "deb-substvars"
#. type: TH
#: deb-substvars.5:2
-#, fuzzy, no-wrap
-#| msgid "2009-08-16"
+#, no-wrap
msgid "2009-07-15"
-msgstr "2009-08-16"
+msgstr "2009-07-15"
#. type: Plain text
#: deb-substvars.5:5
@@ -2071,10 +2070,9 @@ msgstr "deb-triggers"
#. type: TH
#: deb-triggers.5:1 dpkg-trigger.1:1
-#, fuzzy, no-wrap
-#| msgid "2009-08-16"
+#, no-wrap
msgid "2009-03-15"
-msgstr "2009-08-16"
+msgstr "2009-03-15"
#. type: Plain text
#: deb-triggers.5:4
@@ -2186,10 +2184,9 @@ msgstr "dpkg"
#. type: TH
#: dpkg.1:1
-#, fuzzy, no-wrap
-#| msgid "2007-11-19"
+#, no-wrap
msgid "2009-11-12"
-msgstr "2007-11-19"
+msgstr "2009-11-12"
#. type: TH
#: dpkg.1:1 dpkg.cfg.5:1 dpkg-deb.1:1 dpkg-query.1:1 dpkg-trigger.1:1
@@ -4186,10 +4183,9 @@ msgstr "dpkg-architecture"
#. type: TH
#: dpkg-architecture.1:1
-#, fuzzy, no-wrap
-#| msgid "2009-08-16"
+#, no-wrap
msgid "2009-08-15"
-msgstr "2009-08-16"
+msgstr "2009-08-15"
#. type: Plain text
#: dpkg-architecture.1:4
@@ -5151,10 +5147,9 @@ msgstr "dpkg-buildpackage"
#. type: TH
#: dpkg-buildpackage.1:1
-#, fuzzy, no-wrap
-#| msgid "2009-08-16"
+#, no-wrap
msgid "2009-06-13"
-msgstr "2009-08-16"
+msgstr "2009-06-13"
#. type: Plain text
#: dpkg-buildpackage.1:4
@@ -5987,6 +5982,11 @@ msgstr "Copyright \\(co 2008 Rapha\\[:e]l Hertzog"
msgid "dpkg-checkbuilddeps"
msgstr "dpkg-checkbuilddeps"
+#: dpkg-checkbuilddeps.1:1
+#, no-wrap
+msgid "2009-11-21"
+msgstr "2009-11-21"
+
#. type: Plain text
#: dpkg-checkbuilddeps.1:4
msgid "dpkg-checkbuilddeps - check build dependencies and conflicts"
@@ -7710,10 +7710,9 @@ msgstr "dpkg-parsechangelog"
#. type: TH
#: dpkg-parsechangelog.1:1
-#, fuzzy, no-wrap
-#| msgid "2009-05-10"
+#, no-wrap
msgid "2009-05-19"
-msgstr "2009-05-10"
+msgstr "2009-05-19"
#. type: Plain text
#: dpkg-parsechangelog.1:4
@@ -8365,10 +8364,9 @@ msgstr "dpkg-scanpackages"
#. type: TH
#: dpkg-scanpackages.1:15 dpkg-scansources.1:1
-#, fuzzy, no-wrap
-#| msgid "2007-10-08"
+#, no-wrap
msgid "2009-10-01"
-msgstr "2007-10-08"
+msgstr "2009-10-01"
#. type: Plain text
#: dpkg-scanpackages.1:18
@@ -8728,10 +8726,9 @@ msgstr "dpkg-shlibdeps"
#. type: TH
#: dpkg-shlibdeps.1:1
-#, fuzzy, no-wrap
-#| msgid "2009-03-09"
+#, no-wrap
msgid "2009-03-08"
-msgstr "2009-03-09"
+msgstr "2009-03-08"
#. type: Plain text
#: dpkg-shlibdeps.1:4
@@ -9524,10 +9521,9 @@ msgstr "dpkg-source"
#. type: TH
#: dpkg-source.1:2
-#, fuzzy, no-wrap
-#| msgid "2007-11-19"
+#, no-wrap
msgid "2009-11-11"
-msgstr "2007-11-19"
+msgstr "2009-11-11"
#. type: Plain text
#: dpkg-source.1:5
@@ -9743,7 +9739,7 @@ msgstr ""
#: dpkg-source.1:119
#, no-wrap
msgid "B<-Z>I<compression>, B<--compression>=I<compression>"
-msgstr ""
+msgstr "B<-Z>I<Komprimierung>, B<--compression>=I<Komprimierung>"
#. type: Plain text
#: dpkg-source.1:127
@@ -9761,11 +9757,10 @@ msgstr ""
"I<gzip> ist voreingestellt. I<xz> wird erst seit Dpkg-dev 1.15.5 untersttzt."
#. type: TP
-#: dpkg-source.1:127
-#, fuzzy, no-wrap
-#| msgid "B<-z>I<compress_level>"
+#: dpkg-source.1:126
+#, no-wrap
msgid "B<-z>I<level>, B<--compression-level>=I<level>"
-msgstr "B<-z>I<Komprimierstufe>"
+msgstr "B<-z>I<Stufe>, B<--compression-level>=I<Stufe>"
#. type: Plain text
#: dpkg-source.1:133
@@ -10732,13 +10727,7 @@ msgstr "debian/source/options"
# type: Plain text
#. type: Plain text
-#: dpkg-source.1:518
-#, fuzzy
-#| msgid ""
-#| "This file contains a list of options that should be automatically "
-#| "prepended to the set of command line options of a B<dpkg-source -b> or "
-#| "B<dpkg-source --print-format> call. Options like B<-Z> and B<-z> are well "
-#| "suited for this file."
+#: dpkg-source.1:517
msgid ""
"This file contains a list of long options that should be automatically "
"prepended to the set of command line options of a B<dpkg-source -b> or "
@@ -10747,17 +10736,12 @@ msgid ""
msgstr ""
"Diese Datei enhlt eine Liste an Optionen, die automatisch vor den Satz an "
"Befehlszeilenoptionen bei einem Aufruf B<dpkg-source -b> oder B<dpkg-source "
-"--print-format> gesetzt werden sollen. Optionen wie B<-Z> und B<-z> sind fr "
-"diese Datei gut geeignet."
+"--print-format> gesetzt werden sollen. Optionen wie B<-compression> und "
+"B<--compression-level> sind fr diese Datei gut geeignet."
# type: Plain text
#. type: Plain text
-#: dpkg-source.1:524
-#, fuzzy
-#| msgid ""
-#| "Each option should be put on a separate line. Empty lines and lines "
-#| "starting with \"#\" are ignored. B<--format> options are not accepted in "
-#| "this file, you should use B<debian/source/format> instead."
+#: dpkg-source.1:523
msgid ""
"Each option should be put on a separate line. Empty lines and lines starting "
"with \"#\" are ignored. The leading \"--\" should be stripped and short "
@@ -10766,9 +10750,10 @@ msgid ""
"a file:"
msgstr ""
"Jede Option sollte auf einer separaten Zeile stehen. Leerzeilen und Zeilen, "
-"die mit # beginnen, werden ignoriert. B<--format>-Optionen werden in dieser "
-"Datei nicht akzeptiert, Sie sollten stattdessen B<debian/source/format> "
-"verwenden."
+"die mit # beginnen, werden ignoriert. Das einleitende -- sollte entfernt "
+"werden und kurze Optionen sind nicht erlaubt. Optionale Leerzeichen um das "
+"=-Symbol sowie optionale Anfhrungszeichen um den Wert sind erlaubt. Hier "
+"ist ein Beispiel fr so eine Datei:"
#. type: Plain text
#: dpkg-source.1:528
@@ -10778,23 +10763,20 @@ msgid ""
" compression = \"bzip2\"\n"
" compression-level = 9\n"
msgstr ""
+" # lass dpkg-source ein debian.tar.bz2 mit maximaler Komprimierung\n"
+" # erstellen\n"
+" compression = \"bzip2\"\n"
+" compression-level = 9\n"
# type: Plain text
#. type: Plain text
-#: dpkg-source.1:531
-#, fuzzy
-#| msgid ""
-#| "Each option should be put on a separate line. Empty lines and lines "
-#| "starting with \"#\" are ignored. B<--format> options are not accepted in "
-#| "this file, you should use B<debian/source/format> instead."
+#: dpkg-source.1:530
msgid ""
"Note: B<format> options are not accepted in this file, you should use "
"B<debian/source/format> instead."
msgstr ""
-"Jede Option sollte auf einer separaten Zeile stehen. Leerzeilen und Zeilen, "
-"die mit # beginnen, werden ignoriert. B<--format>-Optionen werden in dieser "
-"Datei nicht akzeptiert, Sie sollten stattdessen B<debian/source/format> "
-"verwenden."
+"Hinweis: B<--format>-Optionen werden in dieser Datei nicht akzeptiert, Sie "
+"sollten stattdessen B<debian/source/format> verwenden."
#. type: SS
#: dpkg-source.1:531
@@ -13018,10 +13000,9 @@ msgstr "start-stop-daemon"
#. type: TH
#: start-stop-daemon.8:1
-#, fuzzy, no-wrap
-#| msgid "2009-02-27"
+#, no-wrap
msgid "2009-02-26"
-msgstr "2009-02-27"
+msgstr "2009-02-26"
#. type: Plain text
#: start-stop-daemon.8:4
@@ -13611,10 +13592,9 @@ msgstr "update-alternatives"
#. type: TH
#: update-alternatives.8:8
-#, fuzzy, no-wrap
-#| msgid "2009-08-16"
+#, no-wrap
msgid "2009-04-13"
-msgstr "2009-08-16"
+msgstr "2009-04-13"
#. type: Plain text
#: update-alternatives.8:11
diff --git a/man/po/fr.po b/man/po/fr.po
index 731f2a1b0..36365e2bd 100644
--- a/man/po/fr.po
+++ b/man/po/fr.po
@@ -347,7 +347,7 @@ msgid ""
"non-native packages). The exact format and sorting algorithm are described "
"in B<deb-version>(5)."
msgstr ""
-"C'est classiquement le numéro de version du paquet original dans la forme "
+"C'est classiquement le numéro de version du paquet d'origine dans la forme "
"choisie par l'auteur du programme. Il peut y avoir aussi un numéro de "
"révision Debian (pour les paquets non natifs). Le format exact et "
"l'algorithme de tri sont décrits dans B<deb-version>(5)."
@@ -914,7 +914,7 @@ msgid ""
"comparison scheme."
msgstr ""
"Ceci est la partie principale du numéro de version. Cela correspond "
-"normalement au numéro de version du paquet originel qui a servi à générer le "
+"normalement au numéro de version du paquet d'origine qui a servi à créer le "
"fichier I<.deb>. Le format d'origine spécifié par l'auteur est généralement "
"conservé\\ ; cependant, il arrive qu'il soit nécessaire d'adapter ce numéro "
"pour qu'il se conforme au format du système de gestion de paquet et du "
@@ -7012,7 +7012,7 @@ msgid ""
"included in the upload if any source is being generated (i.e. B<-b> or B<-"
"B> haven't been used)."
msgstr ""
-"Les options B<-s>I<x> contrôlent si l'archive source originale est incluse "
+"Les options B<-s>I<x> contrôlent si l'archive source d'origine est incluse "
"dans l'installation produite si un paquet source est créé (cad. que les "
"options B<-b> ou B<-B> n'ont pas été utilisées)."
@@ -7024,7 +7024,7 @@ msgid ""
"revision) differs from the upstream version number of the previous changelog "
"entry."
msgstr ""
-"Par défaut, ou quand l'option est indiquée, les sources originales sont "
+"Par défaut, ou quand l'option est indiquée, les sources d'origine sont "
"incluses uniquement si le numéro de version majeur (c.à.d. la version sans "
"les parties epoch et «\\ révision Debian\\ ») diffère de la version "
"précédente indiquée dans le fichier de changelog."
@@ -7032,13 +7032,13 @@ msgstr ""
#. type: Plain text
#: dpkg-genchanges.1:45
msgid "Forces the inclusion of the original source."
-msgstr "Force l'inclusion des sources originelles."
+msgstr "Force l'inclusion des sources d'origine."
#. type: Plain text
#: dpkg-genchanges.1:48
msgid "Forces the exclusion of the original source and includes only the diff."
msgstr ""
-"Force l'exclusion des sources originelles et inclut seulement le «\\ diff\\ »."
+"Force l'exclusion des sources d'origine et inclut seulement le «\\ diff\\ »."
#. type: Plain text
#: dpkg-genchanges.1:54
@@ -7501,7 +7501,7 @@ msgstr ""
"I<E<lt>paquetE<gt>_E<lt>versionE<gt>_E<lt>architectureE<gt>type_de_paquetE<gt>>"
"\\ » telle qu'elle est indiquée dans le fichier «\\ control\\ » du paquet. La "
"partie I<E<lt>versionE<gt>> du nom est composée d'informations sur la "
-"version «\\ originale\\ » qui peuvent ou non être suivies d'un trait d'union "
+"version originelle qui peuvent ou non être suivies d'un trait d'union "
"et d'informations sur la révision. La partie I<E<lt>type_de_paquetE<gt>> "
"provient de ce champ s'il existe. La valeur par défault étant B<deb>."
@@ -9900,7 +9900,7 @@ msgstr "B<--no-copy>"
#: dpkg-source.1:188
msgid "Do not copy original tarballs near the extracted source package."
msgstr ""
-"Ne pas copier l'archive originale près de l'extraction du paquet source."
+"Ne pas copier l'archive d'origine près de l'extraction du paquet source."
#. type: TP
#: dpkg-source.1:188
@@ -10009,7 +10009,7 @@ msgid ""
msgstr ""
"Construire un paquet natif revient simplement à créer une archive TAR avec "
"le répertoire du source. La création d'un paquet non-natif consiste à "
-"extraire l'archive originale dans un répertoire séparé \".orig\" puis "
+"extraire l'archive d'origine dans un répertoire séparé \".orig\" puis "
"régénérer le B<.diff.gz> en comparant le I<répertoire> du paquet source avec "
"répertoire \".orig\"."
@@ -10030,12 +10030,12 @@ msgid ""
"directory I<directory>B<.orig> depending on the B<-sX> arguments."
msgstr ""
"Si l'on donne un second argument, ce sera le nom du répertoire source "
-"original ou le nom du fichier «\\ tar\\ » ou bien une chaîne vide si le "
+"d'origine ou le nom du fichier «\\ tar\\ » ou bien une chaîne vide si le "
"paquet est un «\\ debian pure souche\\ » et n'a donc pas de fichiers «\\ diffs"
"\\ » concernant sa «\\ debianisation\\ ». S'il n'y a pas de second argument, "
"et selon les autres arguments donnés, B<dpkg-source> cherche le fichier "
-"«\\ tar\\ » des sources originelles I<paquet>B<_>I<version-originelle>B<.orig."
-"tar.gz> ou bien le répertoire source originel I<répertoire>B<.orig> selon "
+"«\\ tar\\ » des sources d'origine I<paquet>B<_>I<version-d'origine>B<.orig."
+"tar.gz> ou bien le répertoire source d'origine I<répertoire>B<.orig> selon "
"les paramètres B<-sX>."
#. type: Plain text
@@ -10065,7 +10065,7 @@ msgid ""
"I<directory>B<.orig> for the generation of the diff."
msgstr ""
"Quand on spécifie en fichier source d'origine un fichier «\\ tar\\ »\\ ; par "
-"défaut, I<paquet>B<_>I<version-originelle>B<.orig.tar>I<extension>. Il le "
+"défaut, I<paquet>B<_>I<version-d'origine>B<.orig.tar>I<extension>. Il le "
"laisse en place en tant que fichier «\\ tar\\ » ou le copie dans le "
"répertoire en cours s'il n'y est pas déjà. Le fichier sera dépaqueté dans "
"I<répertoire>B<.orig> pour la génération du fichier diff."
@@ -10095,7 +10095,7 @@ msgid ""
"new original source archive from it."
msgstr ""
"Quand on spécifie que le source d'origine est un répertoire\\ ; la valeur "
-"par défaut est le répertoire I<paquet>B<->I<version-originelle>B<.orig> et "
+"par défaut est le répertoire I<paquet>B<->I<version-d'origine>B<.orig> et "
"B<dpkg-source> crée une nouvelle archive du source d'origine."
#. type: TP
@@ -10144,10 +10144,10 @@ msgid ""
"Debian-specific packages which do not have a separate upstream source and "
"therefore have no debianisation diffs."
msgstr ""
-"Indique de ne pas chercher de source originel et de ne pas créer de «\\ diff"
+"Indique de ne pas chercher de source d'origine et de ne pas créer de «\\ diff"
"\\ ». Le second argument, s'il existe, doit être une chaîne vide. Cela sert "
-"pour les paquets Debian pure souche qui n'ont pas un source originel "
-"distinct et donc pas de fichier «\\ diff\\ » de debianisation."
+"pour les paquets Debian pure souche qui n'ont pas une source d'origine "
+"distincte et donc pas de fichier «\\ diff\\ » de debianisation."
#. type: TP
#: dpkg-source.1:291
@@ -10170,13 +10170,13 @@ msgid ""
"sA> was specified (this is equivalent to B<-sP>) or raise an error if B<-"
"sa> was specified. B<-sA> is the default."
msgstr ""
-"Indique comme source originel soit un fichier «\\ tar\\ », soit un répertoire "
+"Indique comme source d'origine soit un fichier «\\ tar\\ », soit un répertoire "
"- le deuxième argument, s'il existe, doit être l'un d'eux ou bien une chaîne "
"vide (cela revient à utiliser l'option B<-sn)>. Quand un fichier «\\ tar\\ » "
"existe, il est dépaqueté pour créer le fichier «\\ diff\\ »\\ ; ensuite il "
"est supprimé (cela revient à utiliser l'option B<-sp)>\\ ; quand un "
"répertoire est trouvé, il est dépaqueté et B<dpkg-source> crée le source "
-"originel et supprime ensuite ce répertoire (cela revient à utiliser l'option "
+"d'origine et supprime ensuite ce répertoire (cela revient à utiliser l'option "
"B<-sr)>\\ ; quand ni l'un ni l'autre n'est trouvé, B<dpkg-source> suppose "
"que le paquet ne possède pas de fichier «\\ diff\\ » de debianisation, mais "
"seulement une simple archive source (cela revient à utiliser l'option B<-"
@@ -10195,7 +10195,7 @@ msgstr "B<options d'extractions (avec -x):>"
#: dpkg-source.1:321
msgid "In all cases any existing original source tree will be removed."
msgstr ""
-"Dans tous ces cas, l'arborescence existante du source originel est supprimée."
+"Dans tous ces cas, l'arborescence existante des sources d'origine est supprimée."
#. type: Plain text
#: dpkg-source.1:327
@@ -10205,7 +10205,7 @@ msgid ""
"existing but different file is there it will be copied there. (B<This is "
"the default>)."
msgstr ""
-"Quand on extrait le source originel (s'il existe), il est conservé en tant "
+"Quand on extrait le répertoire source d'origine (s'il existe), il est conservé en tant "
"que fichier «\\ tar\\ ». S'il n'est pas déjà dans le répertoire courant ou si "
"ce répertoire contient un fichier différent, le fichier «\\ tar\\ » est copié "
"dans ce répertoire. (B<Ceci est le comportement par défaut>)."
@@ -10213,7 +10213,7 @@ msgstr ""
#. type: Plain text
#: dpkg-source.1:330
msgid "Unpacks the original source tree."
-msgstr "Dépaquetage de l'arborescence du source originel."
+msgstr "Dépaquetage de l'arborescence du répertoire source d'origine."
#. type: Plain text
#: dpkg-source.1:335
@@ -10222,8 +10222,8 @@ msgid ""
"nor unpacked. Any original source tree that was in the current directory is "
"still removed."
msgstr ""
-"Assure que le source originel ne sera ni copié dans le répertoire en cours, "
-"ni dépaqueté. Si une arborescence source originelle est présente dans le "
+"Assure que le répertoire source d'origine ne sera ni copié dans le répertoire en cours, "
+"ni dépaqueté. Si une arborescence source d'origine est présente dans le "
"répertoire courant, elle est toujours supprimée."
#. type: Plain text
@@ -10906,7 +10906,7 @@ msgid ""
"Joins the parts of a package file together, reassembling the original file "
"as it was before it was split."
msgstr ""
-"Rassemble les parties d'un fichier, recomposant ainsi le fichier original "
+"Rassemble les parties d'un fichier, recomposant ainsi le fichier d'origine "
"tel qu'il était avant la décomposition."
#. type: Plain text
@@ -10917,7 +10917,7 @@ msgid ""
"list, though the parts to not need to be listed in order."
msgstr ""
"Ces parties, données comme arguments, doivent appartenir toutes au même "
-"fichier binaire original. Chaque partie ne doit apparaître qu'une seule fois "
+"fichier binaire d'origine. Chaque partie ne doit apparaître qu'une seule fois "
"dans la liste des arguments\\ ; mais il est inutile de les ordonner."
#. type: Plain text
diff --git a/man/po/sv.po b/man/po/sv.po
index 08b6e50a7..9ff33c3bd 100644
--- a/man/po/sv.po
+++ b/man/po/sv.po
@@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: dpkg man pages\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-11-27 18:45+0100\n"
-"PO-Revision-Date: 2009-11-13 13:38+0100\n"
+"PO-Revision-Date: 2009-11-18 12:54+0100\n"
"Last-Translator: Peter Krefting <peterk@debian.org>\n"
"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -1490,10 +1490,10 @@ msgstr "deb-substvars"
#. type: TH
#: deb-substvars.5:2
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-08-16"
msgid "2009-07-15"
-msgstr "2009-08-16"
+msgstr "2009-07-15"
#. type: Plain text
#: deb-substvars.5:5
@@ -2021,10 +2021,10 @@ msgstr "deb-triggers"
#. type: TH
#: deb-triggers.5:1 dpkg-trigger.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-08-16"
msgid "2009-03-15"
-msgstr "2009-08-16"
+msgstr "2009-03-15"
#. type: Plain text
#: deb-triggers.5:4
@@ -2134,10 +2134,10 @@ msgstr "dpkg"
#. type: TH
#: dpkg.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2007-11-19"
msgid "2009-11-12"
-msgstr "2007-11-19"
+msgstr "2009-11-12"
#. type: TH
#: dpkg.1:1 dpkg.cfg.5:1 dpkg-deb.1:1 dpkg-query.1:1 dpkg-trigger.1:1
@@ -4070,10 +4070,10 @@ msgstr "dpkg-architecture"
#. type: TH
#: dpkg-architecture.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-08-16"
msgid "2009-08-15"
-msgstr "2009-08-16"
+msgstr "2009-08-15"
#. type: Plain text
#: dpkg-architecture.1:4
@@ -5023,10 +5023,10 @@ msgstr "dpkg-buildpackage"
#. type: TH
#: dpkg-buildpackage.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-08-16"
msgid "2009-06-13"
-msgstr "2009-08-16"
+msgstr "2009-06-13"
#. type: Plain text
#: dpkg-buildpackage.1:4
@@ -7515,10 +7515,10 @@ msgstr "dpkg-parsechangelog"
#. type: TH
#: dpkg-parsechangelog.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-05-10"
msgid "2009-05-19"
-msgstr "2009-05-10"
+msgstr "2009-05-19"
#. type: Plain text
#: dpkg-parsechangelog.1:4
@@ -8157,10 +8157,10 @@ msgstr "dpkg-scanpackages"
#. type: TH
#: dpkg-scanpackages.1:15 dpkg-scansources.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2007-10-08"
msgid "2009-10-01"
-msgstr "2007-10-08"
+msgstr "2009-10-01"
#. type: Plain text
#: dpkg-scanpackages.1:18
@@ -8512,10 +8512,10 @@ msgstr "dpkg-shlibdeps"
#. type: TH
#: dpkg-shlibdeps.1:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-03-09"
msgid "2009-03-08"
-msgstr "2009-03-09"
+msgstr "2009-03-08"
#. type: Plain text
#: dpkg-shlibdeps.1:4
@@ -9273,10 +9273,10 @@ msgstr "dpkg-source"
#. type: TH
#: dpkg-source.1:2
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2007-11-19"
msgid "2009-11-11"
-msgstr "2007-11-19"
+msgstr "2009-11-11"
#. type: Plain text
#: dpkg-source.1:5
@@ -9483,7 +9483,7 @@ msgstr ""
#: dpkg-source.1:119
#, no-wrap
msgid "B<-Z>I<compression>, B<--compression>=I<compression>"
-msgstr ""
+msgstr "B<-Z>I<komprimering>, B<--compression>=I<komprimering>"
#. type: Plain text
#: dpkg-source.1:127
@@ -9501,11 +9501,11 @@ msgstr ""
"från och med dpkg-dev 1.15.5."
#. type: TP
-#: dpkg-source.1:127
-#, fuzzy, no-wrap
+#: dpkg-source.1:126
+#, no-wrap
#| msgid "B<-z>I<compress_level>"
msgid "B<-z>I<level>, B<--compression-level>=I<level>"
-msgstr "B<-z>I<komprimeringsnivå>"
+msgstr "B<-z>I<nivå>, B<--compression-level>=I<nivå>"
#. type: Plain text
#: dpkg-source.1:133
@@ -10447,8 +10447,7 @@ msgid "debian/source/options"
msgstr "debian/source/options"
#. type: Plain text
-#: dpkg-source.1:518
-#, fuzzy
+#: dpkg-source.1:517
#| msgid ""
#| "This file contains a list of options that should be automatically "
#| "prepended to the set of command line options of a B<dpkg-source -b> or "
@@ -10460,14 +10459,14 @@ msgid ""
"B<dpkg-source --print-format> call. Options like B<--compression> and B<--"
"compression-level> are well suited for this file."
msgstr ""
-"Filen innehåller en lista över flaggor som automatiskt sätts in före "
+"Filen innehåller en lista över långa flaggor som automatiskt sätts in före "
"kommandoradsflaggorna som anges i ett anrop til B<dpkg-source -b> eller "
-"B<dpkg-source --print-format>. Flaggor som B<-Z> och B<-z> är lämpliga att "
+"B<dpkg-source --print-format>. Flaggor som B<--compression> och "
+"B<--compression-level> är passande att "
"lägga in i den här filen."
#. type: Plain text
-#: dpkg-source.1:524
-#, fuzzy
+#: dpkg-source.1:523
#| msgid ""
#| "Each option should be put on a separate line. Empty lines and lines "
#| "starting with \"#\" are ignored. B<--format> options are not accepted in "
@@ -10480,8 +10479,10 @@ msgid ""
"a file:"
msgstr ""
"Ange varje flagga på en egen rad. Tomma rader och rader som börjar med \"#\" "
-"ignoreras. B<--format>-flaggor tillåts inte i den här filen, du bör använda "
-"filen B<debian/source/format> istället."
+"ignoreras. Inledande \"--\" skall tas bort och korta flaggor är inte "
+"tillåtna. Blanksteg tillåts runt \"=\"-tecknet och citattecken tillåts "
+"runt värdet. Här är ett exempel på en sådan fil:"
+""
#. type: Plain text
#: dpkg-source.1:528
@@ -10491,10 +10492,12 @@ msgid ""
" compression = \"bzip2\"\n"
" compression-level = 9\n"
msgstr ""
+" # låt dpkg-source skapa en debian.tar.bz2 med maximal komprimering\n"
+" compression = \"bzip2\"\n"
+" compression-level = 9\n"
#. type: Plain text
-#: dpkg-source.1:531
-#, fuzzy
+#: dpkg-source.1:530
#| msgid ""
#| "Each option should be put on a separate line. Empty lines and lines "
#| "starting with \"#\" are ignored. B<--format> options are not accepted in "
@@ -10503,8 +10506,7 @@ msgid ""
"Note: B<format> options are not accepted in this file, you should use "
"B<debian/source/format> instead."
msgstr ""
-"Ange varje flagga på en egen rad. Tomma rader och rader som börjar med \"#\" "
-"ignoreras. B<--format>-flaggor tillåts inte i den här filen, du bör använda "
+"Obsrvera: B<format>-flaggor tillåts inte i den här filen, du bör använda "
"filen B<debian/source/format> istället."
#. type: SS
@@ -12654,10 +12656,10 @@ msgstr "start-stop-daemon"
#. type: TH
#: start-stop-daemon.8:1
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-02-27"
msgid "2009-02-26"
-msgstr "2009-02-27"
+msgstr "2009-02-26"
#. type: Plain text
#: start-stop-daemon.8:4
@@ -13233,10 +13235,10 @@ msgstr "update-alternatives"
#. type: TH
#: update-alternatives.8:8
-#, fuzzy, no-wrap
+#, no-wrap
#| msgid "2009-08-16"
msgid "2009-04-13"
-msgstr "2009-08-16"
+msgstr "2009-04-13"
#. type: Plain text
#: update-alternatives.8:11
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm
index 4856465a7..72fd9abae 100644
--- a/scripts/Dpkg/Control/Info.pm
+++ b/scripts/Dpkg/Control/Info.pm
@@ -52,7 +52,7 @@ sub new {
bless $self, $class;
if ($arg) {
if ($arg eq "-") {
- $self->parse_fh(\*STDIN, _g("standard input"));
+ $self->parse_fh(\*STDIN, _g("<standard input>"));
} else {
$self->parse($arg);
}
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 27ff34da9..0bba6149a 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -43,44 +43,9 @@ EXTRA_DIST = \
dpkg-vendor.pl \
update-alternatives.pl \
changelog/debian.pl \
- t/000_pod.t \
- t/100_Dpkg_Version.t \
- t/200_Dpkg_Shlibs.t \
- t/200_Dpkg_Shlibs/symbols.fake-1 \
- t/200_Dpkg_Shlibs/symbols.fake-2 \
- t/200_Dpkg_Shlibs/symbols.fake-3 \
- t/200_Dpkg_Shlibs/symbols.include-1 \
- t/200_Dpkg_Shlibs/symbols.include-2 \
- t/200_Dpkg_Shlibs/symbols.include-3 \
- t/200_Dpkg_Shlibs/symbols.tags.in \
- t/200_Dpkg_Shlibs/symboltags.c \
- t/200_Dpkg_Shlibs/ld.so.conf \
- t/200_Dpkg_Shlibs/ld.so.conf_2 \
- t/200_Dpkg_Shlibs/ld.so.conf.d/normal.conf \
- t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf \
- t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf \
- t/200_Dpkg_Shlibs/objdump.glib-ia64 \
- t/200_Dpkg_Shlibs/objdump.libc6-2.3 \
- t/200_Dpkg_Shlibs/objdump.libc6-2.6 \
- t/200_Dpkg_Shlibs/objdump.dbd-pg \
- t/200_Dpkg_Shlibs/objdump.ls \
- t/200_Dpkg_Shlibs/objdump.tags-amd64 \
- t/200_Dpkg_Shlibs/objdump.tags-i386 \
- t/300_Dpkg_BuildOptions.t \
- t/400_Dpkg_Deps.t \
- t/500_Dpkg_Path.t \
- t/600_Dpkg_Changelog.t \
- t/600_Dpkg_Changelog/countme \
- t/600_Dpkg_Changelog/fields \
- t/600_Dpkg_Changelog/misplaced-tz \
- t/600_Dpkg_Changelog/regressions \
- t/600_Dpkg_Changelog/shadow \
- t/700_Dpkg_Control.t \
- t/700_Dpkg_Control/control-1 \
- t/750_Dpkg_Substvars.t \
- t/750_Dpkg_Substvars/substvars1 \
- t/800_Dpkg_IPC.t \
- t/900_update_alternatives.t
+ $(test_cases) \
+ $(test_data)
+
CLEANFILES = \
$(bin_SCRIPTS) $(changelog_SCRIPTS)
@@ -165,28 +130,72 @@ uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
rm -f $(DESTDIR)$(sbindir)/install-info
-TEST_FILES= $(srcdir)/t/*.t
TEST_VERBOSE= 0
-clean-local:
- [ ! -d t.tmp ] || chmod -R +w t.tmp
- rm -fr t.tmp
+test_tmpdir = t.tmp
+
+test_cases = \
+ t/000_pod.t \
+ t/100_Dpkg_Version.t \
+ t/200_Dpkg_Shlibs.t \
+ t/300_Dpkg_BuildOptions.t \
+ t/400_Dpkg_Deps.t \
+ t/500_Dpkg_Path.t \
+ t/600_Dpkg_Changelog.t \
+ t/700_Dpkg_Control.t \
+ t/750_Dpkg_Substvars.t \
+ t/800_Dpkg_IPC.t \
+ t/900_update_alternatives.t
+
+check_DATA = \
+ $(test_tmpdir)/200_Dpkg_Shlibs/objdump.tags-amd64 \
+ $(test_tmpdir)/200_Dpkg_Shlibs/objdump.tags-i386
+
+test_data = \
+ t/200_Dpkg_Shlibs/symbols.fake-1 \
+ t/200_Dpkg_Shlibs/symbols.fake-2 \
+ t/200_Dpkg_Shlibs/symbols.fake-3 \
+ t/200_Dpkg_Shlibs/symbols.include-1 \
+ t/200_Dpkg_Shlibs/symbols.include-2 \
+ t/200_Dpkg_Shlibs/symbols.include-3 \
+ t/200_Dpkg_Shlibs/symbols.tags.in \
+ t/200_Dpkg_Shlibs/symboltags.c \
+ t/200_Dpkg_Shlibs/ld.so.conf \
+ t/200_Dpkg_Shlibs/ld.so.conf_2 \
+ t/200_Dpkg_Shlibs/ld.so.conf.d/normal.conf \
+ t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf \
+ t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf \
+ t/200_Dpkg_Shlibs/objdump.glib-ia64 \
+ t/200_Dpkg_Shlibs/objdump.libc6-2.3 \
+ t/200_Dpkg_Shlibs/objdump.libc6-2.6 \
+ t/200_Dpkg_Shlibs/objdump.dbd-pg \
+ t/200_Dpkg_Shlibs/objdump.ls \
+ t/600_Dpkg_Changelog/countme \
+ t/600_Dpkg_Changelog/fields \
+ t/600_Dpkg_Changelog/misplaced-tz \
+ t/600_Dpkg_Changelog/regressions \
+ t/600_Dpkg_Changelog/shadow \
+ t/700_Dpkg_Control/control-1 \
+ t/750_Dpkg_Substvars/substvars1
-mkdir_t_tmp:
- $(mkdir_p) t.tmp
+clean-local:
+ rm -fr $(test_tmpdir)
-check: $(TEST_FILES) $(wildcard $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf*) mkdir_t_tmp
-# a bit hacky...
- cp -dRl $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf* t.tmp/
- PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(PATH)" srcdir=$(srcdir) PERL5LIB=$(srcdir) DPKG_DATADIR=$(srcdir)/.. PERL_DL_NONLAZY=1 $(PERL) -I$(srcdir) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '.')" $(TEST_FILES)
+check: $(test_data) $(test_cases)
+ $(mkdir_p) $(test_tmpdir)
+ PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(PATH)" \
+ srcdir=$(srcdir) DPKG_DATADIR=$(srcdir)/.. \
+ PERL5LIB=$(srcdir) PERL_DL_NONLAZY=1 \
+ $(PERL) -I$(srcdir) -MExtUtils::Command::MM \
+ -e "test_harness($(TEST_VERBOSE), '.')" \
+ $(addprefix $(srcdir)/,$(test_cases))
objdump_lib_name = lib`basename $@`.so
-$(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-amd64 $(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-i386: $(srcdir)/t/200_Dpkg_Shlibs/symboltags.c
+$(test_tmpdir)/200_Dpkg_Shlibs/objdump.tags-amd64 $(test_tmpdir)/200_Dpkg_Shlibs/objdump.tags-i386: $(srcdir)/t/200_Dpkg_Shlibs/symboltags.c
+ $(mkdir_p) $(test_tmpdir)/200_Dpkg_Shlibs
$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libsymboltags.so.1 $< \
$(if $(findstring amd64,$@),-DAMD64,) -o $(objdump_lib_name)
objdump -w -f -p -T -R $(objdump_lib_name) | \
sed "s/$(objdump_lib_name)/libsymboltags.so.1/g" > $@
rm -f $(objdump_lib_name)
-update-objdumps .PHONY: $(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-amd64
-update-objdumps .PHONY: $(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-i386
diff --git a/scripts/changelog/debian.pl b/scripts/changelog/debian.pl
index 1d8b8a1ba..4d6f3f07b 100755
--- a/scripts/changelog/debian.pl
+++ b/scripts/changelog/debian.pl
@@ -132,7 +132,7 @@ my $range = {
my $changes = Dpkg::Changelog::Debian->new(reportfile => $label, range => $range);
if ($file eq '-') {
- $changes->parse(\*STDIN, _g("standard input"))
+ $changes->parse(\*STDIN, _g("<standard input>"))
or error(_g('fatal error occured while parsing input'));
} else {
$changes->load($file)
diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl
index 114767047..3d22e7736 100755
--- a/scripts/dpkg-checkbuilddeps.pl
+++ b/scripts/dpkg-checkbuilddeps.pl
@@ -20,7 +20,8 @@
use strict;
use warnings;
-use Getopt::Long;
+use Getopt::Long qw(:config posix_default bundling no_ignorecase);
+
use Dpkg;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
@@ -30,12 +31,17 @@ use Dpkg::Control::Info;
textdomain("dpkg-dev");
+sub version()
+{
+ printf(_g("Debian %s version %s.\n"), $progname, $version);
+ exit(0);
+}
+
sub usage {
printf _g(
-"Usage: %s [<option> ...] [<control-file>]
-
-Options:
- control-file control file to process (default: debian/control).
+"Usage: %s [<option>...] [<control-file>]")
+ . "\n\n" . _g(
+"Options:
-B binary-only, ignore -Indep.
-d build-deps use given string as build dependencies instead of
retrieving them from control file
@@ -43,25 +49,24 @@ Options:
retrieving them from control file
--admindir=<directory>
change the administrative directory.
- -h show this help message.
-"), $progname;
+ -h, --help show this help message.
+ --version show the version.")
+ . "\n\n" . _g(
+"<control-file> is the control file to process (default: debian/control).")
+ . "\n", $progname;
}
my $binary_only=0;
-my $want_help=0;
my ($bd_value, $bc_value);
-if (! GetOptions('-B' => \$binary_only,
- '-h' => \$want_help,
- '-d=s' => \$bd_value,
- '-c=s' => \$bc_value,
- '--admindir=s' => \$admindir)) {
+if (!GetOptions('B' => \$binary_only,
+ 'help|h' => sub { usage(); exit(0); },
+ 'version' => \&version,
+ 'd=s' => \$bd_value,
+ 'c=s' => \$bc_value,
+ 'admindir=s' => \$admindir)) {
usage();
exit(2);
}
-if ($want_help) {
- usage();
- exit(0);
-}
my $controlfile = shift || "debian/control";
diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl
index f2692fad9..905cc1d99 100755
--- a/scripts/dpkg-gensymbols.pl
+++ b/scripts/dpkg-gensymbols.pl
@@ -208,7 +208,7 @@ $symfile->clear_except(keys %{$od->{objects}});
# Write out symbols files
if ($stdout) {
- $output = "standard output";
+ $output = _g("<standard output>");
$symfile->save("-", package => $oppackage,
template_mode => $template_mode, with_deprecated => 0);
} else {
diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl
index 9a3d59cb0..28df3efd0 100755
--- a/scripts/dpkg-scanpackages.pl
+++ b/scripts/dpkg-scanpackages.pl
@@ -20,6 +20,8 @@ use strict;
use IO::Handle;
use IO::File;
+use Getopt::Long qw(:config posix_default bundling no_ignorecase);
+
use Dpkg;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
@@ -39,8 +41,6 @@ my @spuriousover;
my %packages;
my %overridden;
-use Getopt::Long qw(:config bundling);
-
my %options = (help => sub { usage(); exit 0; },
version => \&version,
type => undef,
diff --git a/scripts/dpkg-scansources.pl b/scripts/dpkg-scansources.pl
index 5645d11eb..04dc83aec 100755
--- a/scripts/dpkg-scansources.pl
+++ b/scripts/dpkg-scansources.pl
@@ -17,16 +17,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Errors with a single package are warned about but don't affect the
-# exit code. Only errors which affect everything cause a non-zero exit.
-#
-# Dependencies are by request non-existant. I used to use the MD5 and
-# Proc::WaitStat modules.
-
-
use strict;
use warnings;
+use Getopt::Long qw(:config posix_default bundling no_ignorecase);
+
use Dpkg;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
@@ -37,8 +32,8 @@ use Dpkg::Compression;
textdomain("dpkg-dev");
-use Getopt::Long ();
-
+# Errors with a single package are warned about but don't affect the
+# exit code. Only errors which affect everything cause a non-zero exit.
my $Exit = 0;
# %Override is a hash of lists. The subs following describe what's in
@@ -105,38 +100,12 @@ See the man page for the full documentation.
exit;
}
-# Getopt::Long has some really awful defaults. This function loads it
-# then configures it to use more sane settings.
-
-sub getopt(@);
-sub configure_getopt {
- Getopt::Long->import(2.11);
- *getopt = \&Getopt::Long::GetOptions;
-
- # I'm setting this environment variable lest he sneaks more bad
- # defaults into the module.
- local $ENV{POSIXLY_CORRECT} = 1;
- Getopt::Long::config qw(
- default
- no_autoabbrev
- no_getopt_compat
- require_order
- bundling
- no_ignorecase
- );
-}
-
sub close_msg {
my $name = shift;
return sprintf(_g("error closing %s (\$? %d, \$! `%s')"),
$name, $?, $!)."\n";
}
-sub init {
- configure_getopt;
- getopt @Option_spec or usage;
-}
-
sub load_override {
my $file = shift;
local $_;
@@ -342,7 +311,7 @@ sub process_dsc {
sub main {
my (@out);
- init;
+ GetOptions(@Option_spec) or usage;
@ARGV >= 1 && @ARGV <= 3 or usageerr(_g("1 to 3 args expected\n"));
push @ARGV, undef if @ARGV < 2;
diff --git a/scripts/po/de.po b/scripts/po/de.po
index 42dbea969..a93715b53 100644
--- a/scripts/po/de.po
+++ b/scripts/po/de.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: dpkg scripts\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
"POT-Creation-Date: 2009-11-27 18:45+0100\n"
-"PO-Revision-Date: 2009-11-11 19:51+0100\n"
+"PO-Revision-Date: 2009-11-23 19:29+0100\n"
"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
"Language-Team: de <debian-l10n-german@lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -16,12 +16,12 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n>1;\n"
#: scripts/dpkg-architecture.pl:35 scripts/dpkg-buildpackage.pl:37
-#: scripts/dpkg-distaddfile.pl:33 scripts/dpkg-genchanges.pl:97
-#: scripts/dpkg-gencontrol.pl:56 scripts/dpkg-gensymbols.pl:47
-#: scripts/dpkg-name.pl:46 scripts/dpkg-parsechangelog.pl:31
-#: scripts/dpkg-scanpackages.pl:60 scripts/dpkg-scansources.pl:83
-#: scripts/dpkg-shlibdeps.pl:517 scripts/dpkg-source.pl:386
-#: scripts/changelog/debian.pl:34
+#: scripts/dpkg-checkbuilddeps.pl:36 scripts/dpkg-distaddfile.pl:33
+#: scripts/dpkg-genchanges.pl:97 scripts/dpkg-gencontrol.pl:56
+#: scripts/dpkg-gensymbols.pl:47 scripts/dpkg-name.pl:46
+#: scripts/dpkg-parsechangelog.pl:31 scripts/dpkg-scanpackages.pl:60
+#: scripts/dpkg-scansources.pl:78 scripts/dpkg-shlibdeps.pl:517
+#: scripts/dpkg-source.pl:386 scripts/changelog/debian.pl:34
#, perl-format
msgid "Debian %s version %s.\n"
msgstr "Debian %s Version %s.\n"
@@ -151,7 +151,7 @@ msgstr ""
"Copyright (C) 2007 Frank Lichtenheld"
#: scripts/dpkg-buildpackage.pl:51
-#, fuzzy, perl-format
+#, perl-format
msgid ""
"\n"
"Usage: %s [<options> ...]\n"
@@ -239,7 +239,7 @@ msgstr ""
" -sn erzwinge Debian native-Quellformat. }\n"
" -s[sAkurKUR] siehe dpkg-source fr Erklrung. } only passed\n"
" -z<Stufe> Kompressionsstufe der Quellen } an dpkg-source\n"
-" -Z(gz|bz2|lzma) Fr Quellen zu verwendende Kompression }\n"
+" -Z<Komprimierer> Fr Quellen zu verwendende Kompression }\n"
" -nc Quell-Baum nicht subern (impliziert -b).\n"
" -tc nach Abschluss Quell-Baum subern.\n"
" -ap Pause vor Beginn des Signaturprozesses einfgen.\n"
@@ -402,13 +402,14 @@ msgstr "Fehler beim Signieren der .changes-Datei"
msgid "unable to determine %s"
msgstr "kann %s nicht bestimmen"
-#: scripts/dpkg-checkbuilddeps.pl:35
+#: scripts/dpkg-checkbuilddeps.pl:42
#, perl-format
+msgid "Usage: %s [<option>...] [<control-file>]"
+msgstr "Aufruf: %s [<Option>...] [<Steuerdatei>]"
+
+#: scripts/dpkg-checkbuilddeps.pl:44
msgid ""
-"Usage: %s [<option> ...] [<control-file>]\n"
-"\n"
"Options:\n"
-" control-file control file to process (default: debian/control).\n"
" -B binary-only, ignore -Indep.\n"
" -d build-deps use given string as build dependencies instead of\n"
" retrieving them from control file\n"
@@ -416,33 +417,38 @@ msgid ""
" retrieving them from control file\n"
" --admindir=<directory>\n"
" change the administrative directory.\n"
-" -h show this help message.\n"
+" -h, --help show this help message.\n"
+" --version show the version."
msgstr ""
-"Aufruf: %s [<Option> ...] [<Steuerdatei>]\n"
-"\n"
"Optionen:\n"
-" Steuerdatei zu verarbeitende Steuerdatei (standardmig: debian/"
-"control).\n"
" -B nur binr, ignoriere -Indep.\n"
-" -d Bau-Abh verwende die bergebene Zeichenkette als Bauabhngigkeit\n"
+" -d Bau-Abh verwende die bergebene Zeichenkette als Bauabhngigkeiten\n"
" statt sie aus der Steuerdatei auszulesen\n"
" -c Bau-Konf verwende die bergebene Zeichenkette als Baukonflikte statt\n"
" sie aus der Steuerdatei auszulesen\n"
" --admindir=<Verzeichnis>\n"
" ndere das administrative Verzeichnis.\n"
-" -h zeige diese Hilfe.\n"
+" -h, --help zeige diese Hilfe.\n"
+" --version zeige die Version."
-#: scripts/dpkg-checkbuilddeps.pl:100
+#: scripts/dpkg-checkbuilddeps.pl:55
+msgid ""
+"<control-file> is the control file to process (default: debian/control)."
+msgstr ""
+"<Steuerdatei> ist die zu verarbeitende Steuerdatei (standardmig "
+"debian/control)."
+
+#: scripts/dpkg-checkbuilddeps.pl:105
#, perl-format
msgid "%s: Unmet build dependencies: "
msgstr "%s: Nicht erfllte Bauabhngigkeiten: "
-#: scripts/dpkg-checkbuilddeps.pl:104
+#: scripts/dpkg-checkbuilddeps.pl:109
#, perl-format
msgid "%s: Build conflicts: "
msgstr "%s: Baukonflikte: "
-#: scripts/dpkg-checkbuilddeps.pl:180 scripts/dpkg-source.pl:213
+#: scripts/dpkg-checkbuilddeps.pl:185 scripts/dpkg-source.pl:213
#, perl-format
msgid "error occurred while parsing %s"
msgstr "Fehler beim Parsen von %s"
@@ -923,6 +929,10 @@ msgstr "Kann Verzeichnis %s nicht lesen: %s"
msgid "Objdump couldn't parse %s\n"
msgstr "Objdump konnte %s nicht auswerten\n"
+#: scripts/dpkg-gensymbols.pl:211
+msgid "<standard output>"
+msgstr "<Standardausgabe>"
+
#: scripts/dpkg-gensymbols.pl:237
#, perl-format
msgid "new libraries appeared in the symbols file: %s"
@@ -1236,7 +1246,7 @@ msgstr "Pakete in Override-Datei aber nicht im Archiv:"
msgid "Wrote %s entries to output Packages file."
msgstr "%s Eintrge in Ausgabe-Paketdatei geschrieben."
-#: scripts/dpkg-scansources.pl:89
+#: scripts/dpkg-scansources.pl:84
#, perl-format
msgid ""
"Usage: %s [<option> ...] <binarypath> [<overridefile> [<pathprefix>]] > "
@@ -1274,42 +1284,42 @@ msgstr ""
"\n"
"Lesen Sie die Handbuchseite fr die komplette Dokumentation.\n"
-#: scripts/dpkg-scansources.pl:131
+#: scripts/dpkg-scansources.pl:105
#, perl-format
msgid "error closing %s ($? %d, $! `%s')"
msgstr "Fehler beim Schlieen von %s ($? %d, $! %s)"
-#: scripts/dpkg-scansources.pl:153
+#: scripts/dpkg-scansources.pl:122
#, perl-format
msgid "invalid override entry at line %d (%d fields)"
msgstr "ungltiger Override-Eintrag in Zeile %d (%d Felder)"
-#: scripts/dpkg-scansources.pl:159
+#: scripts/dpkg-scansources.pl:128
#, perl-format
msgid "ignoring duplicate override entry for %s at line %d"
msgstr "ignoriere doppelte Override-Eintrge fr %s in Zeile %d"
-#: scripts/dpkg-scansources.pl:164
+#: scripts/dpkg-scansources.pl:133
#, perl-format
msgid "ignoring override entry for %s, invalid priority %s"
msgstr "ignoriere Override-Eintrag fr %s, ungltige Prioritt %s"
-#: scripts/dpkg-scansources.pl:219
+#: scripts/dpkg-scansources.pl:188
#, perl-format
msgid "invalid source override entry at line %d (%d fields)"
msgstr "ungltiger Quell-Override-Eintrag in Zeile %d (%d Felder)"
-#: scripts/dpkg-scansources.pl:227
+#: scripts/dpkg-scansources.pl:196
#, perl-format
msgid "ignoring duplicate source override entry for %s at line %d"
msgstr "ignoriere doppelte Quell-Override-Eintrge fr %s in Zeile %d"
-#: scripts/dpkg-scansources.pl:274
+#: scripts/dpkg-scansources.pl:243
#, perl-format
msgid "no binary packages specified in %s"
msgstr "keine Binrpakete in %s angegeben"
-#: scripts/dpkg-scansources.pl:346
+#: scripts/dpkg-scansources.pl:315
msgid "1 to 3 args expected\n"
msgstr "1 bis 3 Argumente erwartet\n"
@@ -1853,8 +1863,8 @@ msgid "more than one file specified (%s and %s)"
msgstr "mehr als eine Datei angegeben (%s und %s)"
#: scripts/changelog/debian.pl:135 scripts/Dpkg/Control/Info.pm:55
-msgid "standard input"
-msgstr "Standardeingabe"
+msgid "<standard input>"
+msgstr "<Standardeingabe>"
#: scripts/changelog/debian.pl:136
msgid "fatal error occured while parsing input"
@@ -2107,9 +2117,9 @@ msgid "File %s has checksum %s instead of expected %s (algorithm %s)"
msgstr "Datei %s hat Prfsumme %s statt der erwarteten %s (Algorithmus %s)"
#: scripts/Dpkg/Conf.pm:93
-#, fuzzy, perl-format
+#, perl-format
msgid "short option not allowed in %s, line %d"
-msgstr "Syntaxfehler fr Option in %s auf Zeile %d"
+msgstr "kurze Option in %s auf Zeile %d nicht erlaubt"
#: scripts/Dpkg/Conf.pm:107
#, perl-format
diff --git a/scripts/po/sv.po b/scripts/po/sv.po
index a218c262c..e96015351 100644
--- a/scripts/po/sv.po
+++ b/scripts/po/sv.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: dpkg 1.15.1\n"
"Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2009-11-27 18:45+0100\n"
-"PO-Revision-Date: 2009-11-13 13:10+0100\n"
+"POT-Creation-Date: 2009-11-17 10:12+0100\n"
+"PO-Revision-Date: 2009-11-18 12:56+0100\n"
"Last-Translator: Peter Krefting <peterk@debian.org>\n"
"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
"MIME-Version: 1.0\n"
@@ -149,7 +149,7 @@ msgstr ""
"Copyright © 2007 Frank Lichtenheld."
#: scripts/dpkg-buildpackage.pl:51
-#, fuzzy, perl-format
+#, perl-format
msgid ""
"\n"
"Usage: %s [<options> ...]\n"
@@ -236,7 +236,7 @@ msgstr ""
" -sn tvinga Debianeget källkodsformat. }\n"
" -s[sAkurKUR] se dpkg-source för förklaring. } sänds bara\n"
" -z<nivå> komprimeringsnivå för källkod. } till dpkg-source\n"
-" -Z(gz|bz2|lzma) komprimering att använda för källkod. }\n"
+" -Z<komprim.> komprimering att använda för källkod. }\n"
" -nc städa inte källkodsträd (implicerar -b).\n"
" -tc städa källkodsträd när färdig.\n"
" -ap lägg in paus innan signaturprocessen startas.\n"
@@ -2071,9 +2071,9 @@ msgstr ""
"Filen %s har kontrollsumman %s istället för den förväntade %s (algoritm %s)"
#: scripts/Dpkg/Conf.pm:93
-#, fuzzy, perl-format
+#, perl-format
msgid "short option not allowed in %s, line %d"
-msgstr "syntaxfel för flagga i %s, rad %d"
+msgstr "kort flagga tillåts inte i %s, rad %d"
#: scripts/Dpkg/Conf.pm:107
#, perl-format
diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t
index 4c77499b3..876a7ca78 100644
--- a/scripts/t/200_Dpkg_Shlibs.t
+++ b/scripts/t/200_Dpkg_Shlibs.t
@@ -14,6 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use Test::More tests => 63;
+use Cwd;
use IO::String;
use strict;
@@ -27,9 +28,16 @@ my @save_paths = @Dpkg::Shlibs::librarypaths;
@Dpkg::Shlibs::librarypaths = ();
my $srcdir = $ENV{srcdir} || '.';
-$srcdir .= '/t/200_Dpkg_Shlibs';
+my $datadir = $srcdir . '/t/200_Dpkg_Shlibs';
+my $tmpdir = 't.tmp/200_Dpkg_Shlibs';
-Dpkg::Shlibs::parse_ldso_conf("t.tmp/ld.so.conf");
+# We want relative paths inside the ld.so.conf fragments to work, and $srcdir
+# is usually a relative path, so let's temporarily switch directory.
+# XXX: An alternative would be to make parse_ldso_conf relative path aware.
+my $cwd = cwd();
+chdir($srcdir);
+Dpkg::Shlibs::parse_ldso_conf("$datadir/ld.so.conf");
+chdir($cwd);
use Data::Dumper;
is_deeply([qw(/nonexistant32 /nonexistant/lib64
@@ -40,15 +48,15 @@ use_ok('Dpkg::Shlibs::Objdump');
my $obj = Dpkg::Shlibs::Objdump::Object->new;
-open my $objdump, '<', "$srcdir/objdump.dbd-pg"
- or die "$srcdir/objdump.dbd-pg: $!";
+open my $objdump, '<', "$datadir/objdump.dbd-pg"
+ or die "$datadir/objdump.dbd-pg: $!";
$obj->_parse($objdump);
close $objdump;
ok(!$obj->is_public_library(), 'Pg.so is not a public library');
ok(!$obj->is_executable(), 'Pg.so is not an executable');
-open $objdump, '<', "$srcdir/objdump.ls"
- or die "$srcdir/objdump.ls: $!";
+open $objdump, '<', "$datadir/objdump.ls"
+ or die "$datadir/objdump.ls: $!";
$obj->reset();
$obj->_parse($objdump);
close $objdump;
@@ -63,8 +71,8 @@ ok(!$sym->{'defined'}, 'R_*_COPY relocations are taken into account');
$sym = $obj->get_symbol('singlespace');
ok($sym, 'version less symbol separated by a single space are correctly parsed');
-open $objdump, '<', "$srcdir/objdump.libc6-2.6"
- or die "$srcdir/objdump.libc6-2.6: $!";
+open $objdump, '<', "$datadir/objdump.libc6-2.6"
+ or die "$datadir/objdump.libc6-2.6: $!";
$obj->reset();
$obj->_parse($objdump);
close $objdump;
@@ -103,8 +111,8 @@ is( scalar @syms, 9, 'undefined && dynamic' );
my $obj_old = Dpkg::Shlibs::Objdump::Object->new;
-open $objdump, '<', "$srcdir/objdump.libc6-2.3"
- or die "$srcdir/objdump.libc6-2.3: $!";
+open $objdump, '<', "$datadir/objdump.libc6-2.3"
+ or die "$datadir/objdump.libc6-2.3: $!";
$obj_old->_parse($objdump);
close $objdump;
@@ -112,9 +120,9 @@ close $objdump;
use_ok('Dpkg::Shlibs::SymbolFile');
use_ok('Dpkg::Shlibs::Symbol');
-my $sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbol_file.tmp");
-my $sym_file_dup = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbol_file.tmp");
-my $sym_file_old = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbol_file.tmp");
+my $sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbol_file.tmp");
+my $sym_file_dup = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbol_file.tmp");
+my $sym_file_old = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbol_file.tmp");
$sym_file->merge_symbols($obj_old, "2.3.6.ds1-13");
$sym_file_old->merge_symbols($obj_old, "2.3.6.ds1-13");
@@ -154,12 +162,12 @@ my $save_file = new File::Temp;
$sym_file->save($save_file->filename);
$sym_file_dup->load($save_file->filename);
-$sym_file_dup->{file} = "$srcdir/symbol_file.tmp";
+$sym_file_dup->{file} = "$datadir/symbol_file.tmp";
is_deeply($sym_file_dup, $sym_file, 'save -> load' );
# Test include mechanism of SymbolFile
-$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.include-1");
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.include-1");
$sym = $sym_file->lookup_symbol('symbol_before@Base', ['libfake.so.1']);
is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => 'symbol_before@Base',
@@ -194,7 +202,7 @@ is_deeply($sym, Dpkg::Shlibs::Symbol->new ( 'symbol' => 'symbol_in_libdivert@Bas
'depends' => 'libdivert1 #MINVER#', 'soname' => 'libdivert.so.1'),
'#include can change current object');
-$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.include-2");
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.include-2");
$sym = $sym_file->lookup_symbol('symbol1_fake2@Base', ['libfake.so.1']);
is_deeply($sym, Dpkg::Shlibs::Symbol->new ( 'symbol' => 'symbol1_fake2@Base',
@@ -215,15 +223,15 @@ is(${$io->string_ref()},
symbol1_fake2@Base 1.0 1
symbol2_fake2@Base 1.0
symbol3_fake2@Base 1.1
-', "Dump of $srcdir/symbols.include-2");
+', "Dump of $datadir/symbols.include-2");
# Check parsing of objdump output on ia64 (local symbols
# without versions and with visibility attribute)
$obj = Dpkg::Shlibs::Objdump::Object->new;
-open $objdump, '<', "$srcdir/objdump.glib-ia64"
- or die "$srcdir/objdump.glib-ia64: $!";
+open $objdump, '<', "$datadir/objdump.glib-ia64"
+ or die "$datadir/objdump.glib-ia64: $!";
$obj->_parse($objdump);
close $objdump;
@@ -240,14 +248,14 @@ is_deeply( $sym, { name => 'IA__g_free', version => '',
# Parsing/dumping
# Template mode
-$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.tags.in", arch => 'amd64');
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.tags.in", arch => 'amd64');
$sym_file->save($save_file->filename, template_mode => 1);
$sym_file_dup = Dpkg::Shlibs::SymbolFile->new(file => $save_file, arch => 'amd64');
-$sym_file_dup->{file} = "$srcdir/symbols.tags.in";
+$sym_file_dup->{file} = "$datadir/symbols.tags.in";
is_deeply($sym_file_dup, $sym_file, 'template save -> load' );
-is( system("diff -u '$srcdir/symbols.tags.in' '" . $save_file->filename . "' >&2"), 0, "symbols.tags.in template dumped identical" );
+is( system("diff -u '$datadir/symbols.tags.in' '" . $save_file->filename . "' >&2"), 0, "symbols.tags.in template dumped identical" );
# Dumping in non-template mode (amd64) (test for arch, subst tags)
$io = IO::String->new();
@@ -263,8 +271,8 @@ is(${$io->string_ref()},
# Dumping in non-template mode (i386) (test for arch, subst tags)
$io = IO::String->new();
-$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.tags.in", arch => 'i386');
-$sym_file_dup = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.tags.in", arch => 'i386');
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.tags.in", arch => 'i386');
+$sym_file_dup = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.tags.in", arch => 'i386');
$sym_file->dump($io);
is(${$io->string_ref()},
'libsymboltags.so.1 libsymboltags1 #MINVER#
@@ -281,14 +289,16 @@ ok (defined $sym_file->{objects}{'libsymboltags.so.1'}{syms}{'symbol21_amd64@Bas
# Preload objdumps
my $tags_obj_i386 = Dpkg::Shlibs::Objdump::Object->new();
-open $objdump, '<', "$srcdir/objdump.tags-i386" or die "$srcdir/objdump.tags-i386: $!";
+open $objdump, '<', "$tmpdir/objdump.tags-i386"
+ or die "$tmpdir/objdump.tags-i386: $!";
$tags_obj_i386->_parse($objdump);
close $objdump;
$sym_file->merge_symbols($tags_obj_i386, '100.MISSING');
is_deeply($sym_file, $sym_file_dup, "is objdump.tags-i386 and symbols.tags.in in sync");
my $tags_obj_amd64 = Dpkg::Shlibs::Objdump::Object->new();
-open $objdump, '<', "$srcdir/objdump.tags-amd64" or die "$srcdir/objdump.tags-amd64: $!";
+open $objdump, '<', "$tmpdir/objdump.tags-amd64"
+ or die "$tmpdir/objdump.tags-amd64: $!";
$tags_obj_amd64->_parse($objdump);
close $objdump;
@@ -363,7 +373,7 @@ is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => 'symbol41_i386_and_option
is_deeply( \@tmp, [ 'symbol22_i386@Base' ], "missing arch specific is LOST, but optional arch specific isn't");
# Tests for tagged #includes
-$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.include-3", arch => 'i386');
+$sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$datadir/symbols.include-3", arch => 'i386');
$sym = $sym_file->lookup_symbol('symbol2_fake1@Base', ['libsymboltags.so.2']);
is_deeply($sym, Dpkg::Shlibs::Symbol->new( 'symbol' => 'symbol2_fake1@Base',
'minver' => '1.0', 'depends' => 'libsymboltags2', 'soname' => 'libsymboltags.so.2',
diff --git a/scripts/t/200_Dpkg_Shlibs/ld.so.conf b/scripts/t/200_Dpkg_Shlibs/ld.so.conf
index 23861b714..cbbf7bd98 100644
--- a/scripts/t/200_Dpkg_Shlibs/ld.so.conf
+++ b/scripts/t/200_Dpkg_Shlibs/ld.so.conf
@@ -5,5 +5,5 @@
/nonexistant/lib64
include /nonexistant/*.conf
-include t.tmp/ld.so.conf.d/*.conf
+include t/200_Dpkg_Shlibs/ld.so.conf.d/*.conf
diff --git a/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf b/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf
index d0f90f2cd..a8e88c0c2 100644
--- a/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf
+++ b/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf
@@ -1 +1 @@
-include t.tmp/ld.so.conf
+include t/200_Dpkg_Shlibs/ld.so.conf
diff --git a/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf b/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf
index bcc534bce..8e6fe25f4 100644
--- a/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf
+++ b/scripts/t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf
@@ -1 +1 @@
-include t.tmp/ld.so.conf_2
+include t/200_Dpkg_Shlibs/ld.so.conf_2
diff --git a/scripts/t/200_Dpkg_Shlibs/objdump.tags-amd64 b/scripts/t/200_Dpkg_Shlibs/objdump.tags-amd64
deleted file mode 100644
index b6865e5d8..000000000
--- a/scripts/t/200_Dpkg_Shlibs/objdump.tags-amd64
+++ /dev/null
@@ -1,72 +0,0 @@
-
-libsymboltags.so.1: file format elf64-x86-64
-architecture: i386:x86-64, flags 0x00000150:
-HAS_SYMS, DYNAMIC, D_PAGED
-start address 0x0000000000000560
-
-Program Header:
- LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21
- filesz 0x0000000000000774 memsz 0x0000000000000774 flags r-x
- LOAD off 0x0000000000000778 vaddr 0x0000000000200778 paddr 0x0000000000200778 align 2**21
- filesz 0x0000000000000208 memsz 0x0000000000000218 flags rw-
- DYNAMIC off 0x00000000000007a0 vaddr 0x00000000002007a0 paddr 0x00000000002007a0 align 2**3
- filesz 0x00000000000001a0 memsz 0x00000000000001a0 flags rw-
- NOTE off 0x0000000000000190 vaddr 0x0000000000000190 paddr 0x0000000000000190 align 2**2
- filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--
-EH_FRAME off 0x00000000000006c8 vaddr 0x00000000000006c8 paddr 0x00000000000006c8 align 2**2
- filesz 0x000000000000002c memsz 0x000000000000002c flags r--
- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3
- filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
-
-Dynamic Section:
- NEEDED libc.so.6
- SONAME libsymboltags.so.1
- INIT 0x0000000000000520
- FINI 0x00000000000006b8
- HASH 0x00000000000001b8
- GNU_HASH 0x0000000000000208
- STRTAB 0x00000000000003a0
- SYMTAB 0x0000000000000250
- STRSZ 0x00000000000000c6
- SYMENT 0x0000000000000018
- PLTGOT 0x0000000000200958
- PLTRELSZ 0x0000000000000018
- PLTREL 0x0000000000000007
- JMPREL 0x0000000000000508
- RELA 0x00000000000004a8
- RELASZ 0x0000000000000060
- RELAENT 0x0000000000000018
- VERNEED 0x0000000000000488
- VERNEEDNUM 0x0000000000000001
- VERSYM 0x0000000000000466
- RELACOUNT 0x0000000000000001
-
-Version References:
- required from libc.so.6:
- 0x09691a75 0x00 02 GLIBC_2.2.5
-
-DYNAMIC SYMBOL TABLE:
-0000000000000520 l d .init 0000000000000000 .init
-0000000000000000 w D *UND* 0000000000000000 __gmon_start__
-0000000000000000 w D *UND* 0000000000000000 _Jv_RegisterClasses
-0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.2.5 __cxa_finalize
-0000000000000650 g DF .text 0000000000000002 Base symbol21_amd64
-0000000000200990 g D *ABS* 0000000000000000 Base _end
-0000000000200980 g D *ABS* 0000000000000000 Base _edata
-0000000000200980 g D *ABS* 0000000000000000 Base __bss_start
-0000000000000520 g DF .init 0000000000000000 Base _init
-00000000000006b8 g DF .fini 0000000000000000 Base _fini
-0000000000000640 g DF .text 0000000000000002 Base symbol11_optional
-0000000000000660 g DF .text 0000000000000002 Base symbol31_randomtag
-0000000000000670 g DF .text 0000000000000002 Base symbol51_untagged
-
-
-DYNAMIC RELOCATION RECORDS
-OFFSET TYPE VALUE
-0000000000200978 R_X86_64_RELATIVE *ABS*+0x0000000000200978
-0000000000200940 R_X86_64_GLOB_DAT __gmon_start__
-0000000000200948 R_X86_64_GLOB_DAT _Jv_RegisterClasses
-0000000000200950 R_X86_64_GLOB_DAT __cxa_finalize
-0000000000200970 R_X86_64_JUMP_SLOT __cxa_finalize
-
-
diff --git a/scripts/t/200_Dpkg_Shlibs/objdump.tags-i386 b/scripts/t/200_Dpkg_Shlibs/objdump.tags-i386
deleted file mode 100644
index 425709bbc..000000000
--- a/scripts/t/200_Dpkg_Shlibs/objdump.tags-i386
+++ /dev/null
@@ -1,73 +0,0 @@
-
-libsymboltags.so.1: file format elf64-x86-64
-architecture: i386:x86-64, flags 0x00000150:
-HAS_SYMS, DYNAMIC, D_PAGED
-start address 0x0000000000000590
-
-Program Header:
- LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21
- filesz 0x00000000000007d4 memsz 0x00000000000007d4 flags r-x
- LOAD off 0x00000000000007d8 vaddr 0x00000000002007d8 paddr 0x00000000002007d8 align 2**21
- filesz 0x0000000000000208 memsz 0x0000000000000218 flags rw-
- DYNAMIC off 0x0000000000000800 vaddr 0x0000000000200800 paddr 0x0000000000200800 align 2**3
- filesz 0x00000000000001a0 memsz 0x00000000000001a0 flags rw-
- NOTE off 0x0000000000000190 vaddr 0x0000000000000190 paddr 0x0000000000000190 align 2**2
- filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--
-EH_FRAME off 0x0000000000000708 vaddr 0x0000000000000708 paddr 0x0000000000000708 align 2**2
- filesz 0x0000000000000034 memsz 0x0000000000000034 flags r--
- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3
- filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
-
-Dynamic Section:
- NEEDED libc.so.6
- SONAME libsymboltags.so.1
- INIT 0x0000000000000558
- FINI 0x00000000000006f8
- HASH 0x00000000000001b8
- GNU_HASH 0x0000000000000208
- STRTAB 0x00000000000003c0
- SYMTAB 0x0000000000000258
- STRSZ 0x00000000000000e0
- SYMENT 0x0000000000000018
- PLTGOT 0x00000000002009b8
- PLTRELSZ 0x0000000000000018
- PLTREL 0x0000000000000007
- JMPREL 0x0000000000000540
- RELA 0x00000000000004e0
- RELASZ 0x0000000000000060
- RELAENT 0x0000000000000018
- VERNEED 0x00000000000004c0
- VERNEEDNUM 0x0000000000000001
- VERSYM 0x00000000000004a0
- RELACOUNT 0x0000000000000001
-
-Version References:
- required from libc.so.6:
- 0x09691a75 0x00 02 GLIBC_2.2.5
-
-DYNAMIC SYMBOL TABLE:
-0000000000000558 l d .init 0000000000000000 .init
-0000000000000000 w D *UND* 0000000000000000 __gmon_start__
-0000000000000000 w D *UND* 0000000000000000 _Jv_RegisterClasses
-0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.2.5 __cxa_finalize
-00000000000006a0 g DF .text 0000000000000002 Base symbol41_i386_and_optional
-00000000002009f0 g D *ABS* 0000000000000000 Base _end
-00000000002009e0 g D *ABS* 0000000000000000 Base _edata
-0000000000000680 g DF .text 0000000000000002 Base symbol22_i386
-00000000002009e0 g D *ABS* 0000000000000000 Base __bss_start
-0000000000000558 g DF .init 0000000000000000 Base _init
-00000000000006f8 g DF .fini 0000000000000000 Base _fini
-0000000000000670 g DF .text 0000000000000002 Base symbol11_optional
-0000000000000690 g DF .text 0000000000000002 Base symbol31_randomtag
-00000000000006b0 g DF .text 0000000000000002 Base symbol51_untagged
-
-
-DYNAMIC RELOCATION RECORDS
-OFFSET TYPE VALUE
-00000000002009d8 R_X86_64_RELATIVE *ABS*+0x00000000002009d8
-00000000002009a0 R_X86_64_GLOB_DAT __gmon_start__
-00000000002009a8 R_X86_64_GLOB_DAT _Jv_RegisterClasses
-00000000002009b0 R_X86_64_GLOB_DAT __cxa_finalize
-00000000002009d0 R_X86_64_JUMP_SLOT __cxa_finalize
-
-
diff --git a/scripts/t/500_Dpkg_Path.t b/scripts/t/500_Dpkg_Path.t
index 45a6ab73e..cda17f761 100644
--- a/scripts/t/500_Dpkg_Path.t
+++ b/scripts/t/500_Dpkg_Path.t
@@ -22,35 +22,38 @@ use_ok('Dpkg::Path', 'canonpath', 'resolve_symlink',
'check_files_are_the_same', 'get_pkg_root_dir',
'guess_pkg_root_dir', 'relative_to_pkg_root');
-mkdir "t.tmp/a";
-mkdir "t.tmp/a/b";
-mkdir "t.tmp/a/b/c";
-mkdir "t.tmp/a/DEBIAN";
-mkdir "t.tmp/debian";
-mkdir "t.tmp/debian/a";
-mkdir "t.tmp/debian/a/b";
-mkdir "t.tmp/debian/a/b/c";
-symlink "a/b/c", "t.tmp/cbis";
-symlink "/this/does/not/exist", "t.tmp/tmp";
-symlink ".", "t.tmp/here";
-
-is(canonpath("t.tmp/./a///b/c"), "t.tmp/a/b/c", "canonpath basic test");
-is(canonpath("t.tmp/a/b/../../a/b/c"), "t.tmp/a/b/c", "canonpath and ..");
-is(canonpath("t.tmp/a/b/c/../../"), "t.tmp/a", "canonpath .. at end");
-is(canonpath("t.tmp/cbis/../"), "t.tmp/cbis/..", "canonpath .. after symlink");
-
-is(resolve_symlink("t.tmp/here/cbis"), "t.tmp/here/a/b/c", "resolve_symlink");
-is(resolve_symlink("t.tmp/tmp"), "/this/does/not/exist", "resolve_symlink absolute");
-is(resolve_symlink("t.tmp/here"), "t.tmp", "resolve_symlink .");
-
-ok(!check_files_are_the_same("t.tmp/here", "t.tmp"), "Symlink is not the same!");
-ok(check_files_are_the_same("t.tmp/here/a", "t.tmp/a"), "Same directory");
-
-is(get_pkg_root_dir("t.tmp/a/b/c"), "t.tmp/a", "get_pkg_root_dir");
-is(guess_pkg_root_dir("t.tmp/a/b/c"), "t.tmp/a", "guess_pkg_root_dir");
-is(relative_to_pkg_root("t.tmp/a/b/c"), "b/c", "relative_to_pkg_root");
-
-chdir("t.tmp");
+my $tmpdir = 't.tmp/500_Dpkg_Path';
+
+mkdir $tmpdir;
+mkdir "$tmpdir/a";
+mkdir "$tmpdir/a/b";
+mkdir "$tmpdir/a/b/c";
+mkdir "$tmpdir/a/DEBIAN";
+mkdir "$tmpdir/debian";
+mkdir "$tmpdir/debian/a";
+mkdir "$tmpdir/debian/a/b";
+mkdir "$tmpdir/debian/a/b/c";
+symlink "a/b/c", "$tmpdir/cbis";
+symlink "/this/does/not/exist", "$tmpdir/tmp";
+symlink ".", "$tmpdir/here";
+
+is(canonpath("$tmpdir/./a///b/c"), "$tmpdir/a/b/c", "canonpath basic test");
+is(canonpath("$tmpdir/a/b/../../a/b/c"), "$tmpdir/a/b/c", "canonpath and ..");
+is(canonpath("$tmpdir/a/b/c/../../"), "$tmpdir/a", "canonpath .. at end");
+is(canonpath("$tmpdir/cbis/../"), "$tmpdir/cbis/..", "canonpath .. after symlink");
+
+is(resolve_symlink("$tmpdir/here/cbis"), "$tmpdir/here/a/b/c", "resolve_symlink");
+is(resolve_symlink("$tmpdir/tmp"), "/this/does/not/exist", "resolve_symlink absolute");
+is(resolve_symlink("$tmpdir/here"), $tmpdir, "resolve_symlink .");
+
+ok(!check_files_are_the_same("$tmpdir/here", $tmpdir), "Symlink is not the same!");
+ok(check_files_are_the_same("$tmpdir/here/a", "$tmpdir/a"), "Same directory");
+
+is(get_pkg_root_dir("$tmpdir/a/b/c"), "$tmpdir/a", "get_pkg_root_dir");
+is(guess_pkg_root_dir("$tmpdir/a/b/c"), "$tmpdir/a", "guess_pkg_root_dir");
+is(relative_to_pkg_root("$tmpdir/a/b/c"), "b/c", "relative_to_pkg_root");
+
+chdir($tmpdir);
ok(!defined(get_pkg_root_dir("debian/a/b/c")), "get_pkg_root_dir undef");
ok(!defined(relative_to_pkg_root("debian/a/b/c")), "relative_to_pkg_root");
diff --git a/scripts/t/600_Dpkg_Changelog.t b/scripts/t/600_Dpkg_Changelog.t
index 1cd1bede1..930d35303 100644
--- a/scripts/t/600_Dpkg_Changelog.t
+++ b/scripts/t/600_Dpkg_Changelog.t
@@ -36,12 +36,12 @@ BEGIN {
};
my $srcdir = $ENV{srcdir} || '.';
-$srcdir .= '/t/600_Dpkg_Changelog';
+my $datadir = $srcdir . '/t/600_Dpkg_Changelog';
#########################
-foreach my $file ("$srcdir/countme", "$srcdir/shadow", "$srcdir/fields",
- "$srcdir/regressions") {
+foreach my $file ("$datadir/countme", "$datadir/shadow", "$datadir/fields",
+ "$datadir/regressions") {
my $changes = Dpkg::Changelog::Debian->new(verbose => 0);
$changes->load($file);
@@ -59,7 +59,7 @@ foreach my $file ("$srcdir/countme", "$srcdir/shadow", "$srcdir/fields",
ok(@data, "data is not empty");
my $str;
- if ($file eq "$srcdir/countme") {
+ if ($file eq "$datadir/countme") {
# test range options
cmp_ok( @data, '==', 7, "no options -> count" );
my $all_versions = join( '/', map { $_->get_version() } @data);
@@ -168,7 +168,7 @@ foreach my $file ("$srcdir/countme", "$srcdir/shadow", "$srcdir/fields",
'until => "1:2.0~rc2-1sarge2"' );
#TODO: test combinations
}
- if ($file eq "$srcdir/fields") {
+ if ($file eq "$datadir/fields") {
my $str = $changes->dpkg({ all => 1 });
my $expected = 'Source: fields
Version: 2.0-0etch1
@@ -300,7 +300,7 @@ Xb-Userfield2: foobar
}
}
-foreach my $test (( [ "$srcdir/misplaced-tz", 6 ])) {
+foreach my $test (( [ "$datadir/misplaced-tz", 6 ])) {
my $file = shift @$test;
my $changes = Dpkg::Changelog::Debian->new(verbose => 0);
diff --git a/scripts/t/700_Dpkg_Control.t b/scripts/t/700_Dpkg_Control.t
index 5714025e9..73c31c05d 100644
--- a/scripts/t/700_Dpkg_Control.t
+++ b/scripts/t/700_Dpkg_Control.t
@@ -22,9 +22,9 @@ use IO::String;
use_ok('Dpkg::Control::Info');
my $srcdir = $ENV{srcdir} || '.';
-$srcdir .= '/t/700_Dpkg_Control';
+my $datadir = $srcdir . '/t/700_Dpkg_Control';
-my $c = Dpkg::Control::Info->new("$srcdir/control-1");
+my $c = Dpkg::Control::Info->new("$datadir/control-1");
my $io = IO::String->new();
$c->dump($io);
@@ -52,7 +52,7 @@ Description: short one
long one
very long one
';
-is($value, $expected, "Dump of $srcdir/control-1");
+is($value, $expected, "Dump of $datadir/control-1");
my $src = $c->get_source();
is($src->{'my-field-one'}, 'myvalue1', "Access field through badly capitalized field name");
@@ -79,5 +79,5 @@ $pkg->output($io);
is(${$io->string_ref()},
'Package: mypackage2
Depends: hello
-', "Dump of second binary package of $srcdir/control-1");
+', "Dump of second binary package of $datadir/control-1");
diff --git a/scripts/t/750_Dpkg_Substvars.t b/scripts/t/750_Dpkg_Substvars.t
index dfc3e16f9..ae4609f5c 100644
--- a/scripts/t/750_Dpkg_Substvars.t
+++ b/scripts/t/750_Dpkg_Substvars.t
@@ -24,11 +24,11 @@ use Dpkg::Arch qw(get_host_arch);
use_ok('Dpkg::Substvars');
my $srcdir = $ENV{srcdir} || '.';
-$srcdir .= '/t/750_Dpkg_Substvars';
+my $datadir = $srcdir . '/t/750_Dpkg_Substvars';
my $s = Dpkg::Substvars->new();
-$s->parse("$srcdir/substvars1");
+$s->parse("$datadir/substvars1");
# simple value tests
is($s->get('var1'), 'Some value', 'var1');
diff --git a/scripts/t/900_update_alternatives.t b/scripts/t/900_update_alternatives.t
index 5eb8cd8ee..d630ddfaf 100644
--- a/scripts/t/900_update_alternatives.t
+++ b/scripts/t/900_update_alternatives.t
@@ -21,9 +21,10 @@ use strict;
use warnings;
my $srcdir = $ENV{srcdir} || '.';
-my $admindir = File::Spec->rel2abs("t.tmp/ua/admindir"),
-my $altdir = File::Spec->rel2abs("t.tmp/ua/alternatives");
-my $bindir = File::Spec->rel2abs("t.tmp/ua/bin");
+my $tmpdir = 't.tmp/900_update_alternatives';
+my $admindir = File::Spec->rel2abs("$tmpdir/admindir"),
+my $altdir = File::Spec->rel2abs("$tmpdir/alternatives");
+my $bindir = File::Spec->rel2abs("$tmpdir/bin");
# XXX: switch to version without .pl
my @ua = ("$srcdir/update-alternatives.pl", "--log", "/dev/null",
"--quiet", "--admindir", "$admindir", "--altdir", "$altdir");
@@ -69,7 +70,7 @@ plan tests => (4 * ($nb_slaves + 1) + 2) * 24 # number of check_choices
+ 63; # rest
sub cleanup {
- system("rm -rf t.tmp/ua && mkdir -p $admindir && mkdir -p $altdir");
+ system("rm -rf $tmpdir && mkdir -p $admindir && mkdir -p $altdir");
system("mkdir -p $bindir/more");
}
diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl
index 4865337e5..df753d7c9 100755
--- a/scripts/update-alternatives.pl
+++ b/scripts/update-alternatives.pl
@@ -910,23 +910,23 @@ sub display_user {
($self->status() eq "auto") ? _g("auto mode") : _g("manual mode"));
if ($self->has_current_link()) {
- pr(_g(" link currently points to %s"), $self->current());
+ pr(_g(" link currently points to %s"), $self->current());
} else {
- pr(_g(" link currently absent"));
+ pr(_g(" link currently absent"));
}
foreach my $choice ($self->choices()) {
my $fileset = $self->fileset($choice);
pr(_g("%s - priority %s"), $choice, $fileset->priority());
foreach my $slave ($self->slaves()) {
if ($fileset->has_slave($slave)) {
- pr(_g(" slave %s: %s"), $slave, $fileset->slave($slave));
+ pr(_g(" slave %s: %s"), $slave, $fileset->slave($slave));
}
}
}
my $best = $self->best();
if (defined($best) && $best) {
- pr(_g("Current \`best' version is %s."), $best);
+ pr(_g("Current 'best' version is '%s'."), $best);
} else {
pr(_g("No versions available."));
}
diff --git a/src/enquiry.c b/src/enquiry.c
index dc4d614cb..ee8938d9e 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -45,7 +45,7 @@
struct badstatinfo {
bool (*yesno)(struct pkginfo *, const struct badstatinfo *bsi);
- int val;
+ int value;
const char *explanation;
};
@@ -60,42 +60,54 @@ bsyn_status(struct pkginfo *pkg, const struct badstatinfo *bsi)
{
if (pkg->eflag &= eflag_reinstreq)
return false;
- return (int)pkg->status == bsi->val;
+ return (int)pkg->status == bsi->value;
}
static const struct badstatinfo badstatinfos[]= {
{
- bsyn_reinstreq, 0,
- N_("The following packages are in a mess due to serious problems during\n"
+ .yesno = bsyn_reinstreq,
+ .value = 0,
+ .explanation = N_(
+ "The following packages are in a mess due to serious problems during\n"
"installation. They must be reinstalled for them (and any packages\n"
"that depend on them) to function properly:\n")
}, {
- bsyn_status, stat_unpacked,
- N_("The following packages have been unpacked but not yet configured.\n"
+ .yesno = bsyn_status,
+ .value = stat_unpacked,
+ .explanation = N_(
+ "The following packages have been unpacked but not yet configured.\n"
"They must be configured using dpkg --configure or the configure\n"
"menu option in dselect for them to work:\n")
}, {
- bsyn_status, stat_halfconfigured,
- N_("The following packages are only half configured, probably due to problems\n"
+ .yesno = bsyn_status,
+ .value = stat_halfconfigured,
+ .explanation = N_(
+ "The following packages are only half configured, probably due to problems\n"
"configuring them the first time. The configuration should be retried using\n"
"dpkg --configure <package> or the configure menu option in dselect:\n")
}, {
- bsyn_status, stat_halfinstalled,
- N_("The following packages are only half installed, due to problems during\n"
+ .yesno = bsyn_status,
+ .value = stat_halfinstalled,
+ .explanation = N_(
+ "The following packages are only half installed, due to problems during\n"
"installation. The installation can probably be completed by retrying it;\n"
"the packages can be removed using dselect or dpkg --remove:\n")
}, {
- bsyn_status, stat_triggersawaited,
- N_("The following packages are awaiting processing of triggers that they\n"
+ .yesno = bsyn_status,
+ .value = stat_triggersawaited,
+ .explanation = N_(
+ "The following packages are awaiting processing of triggers that they\n"
"have activated in other packages. This processing can be requested using\n"
"dselect or dpkg --configure --pending (or dpkg --triggers-only):\n")
}, {
- bsyn_status, stat_triggerspending,
- N_("The following packages have been triggered, but the trigger processing\n"
+ .yesno = bsyn_status,
+ .value = stat_triggerspending,
+ .explanation = N_(
+ "The following packages have been triggered, but the trigger processing\n"
"has not yet been done. Trigger processing can be requested using\n"
"dselect or dpkg --configure --pending (or dpkg --triggers-only):\n")
}, {
- NULL
+ .yesno = NULL
}
};
diff --git a/src/help.c b/src/help.c
index d20a396a3..669ad133a 100644
--- a/src/help.c
+++ b/src/help.c
@@ -43,14 +43,14 @@
#include "main.h"
const char *const statusstrings[]= {
- N_("not installed"),
- N_("not installed but configs remain"),
- N_("broken due to failed removal or installation"),
- N_("unpacked but not configured"),
- N_("broken due to postinst failure"),
- N_("awaiting trigger processing by another package"),
- N_("triggered"),
- N_("installed")
+ [stat_notinstalled] = N_("not installed"),
+ [stat_configfiles] = N_("not installed but configs remain"),
+ [stat_halfinstalled] = N_("broken due to failed removal or installation"),
+ [stat_unpacked] = N_("unpacked but not configured"),
+ [stat_halfconfigured] = N_("broken due to postinst failure"),
+ [stat_triggersawaited] = N_("awaiting trigger processing by another package"),
+ [stat_triggerspending] = N_("triggered"),
+ [stat_installed] = N_("installed")
};
struct filenamenode *namenodetouse(struct filenamenode *namenode, struct pkginfo *pkg) {
diff --git a/src/query.c b/src/query.c
index 04650e082..40e8f8050 100644
--- a/src/query.c
+++ b/src/query.c
@@ -113,7 +113,7 @@ list1package(struct pkginfo *pkg, int *head, struct pkg_array *array)
if (!*head) {
fputs(_("\
Desired=Unknown/Install/Remove/Purge/Hold\n\
-| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend\n\
+| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend\n\
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)\n"), stdout);
printf(format,'|','|','/', _("Name"), _("Version"), 40, _("Description"));
printf("+++-"); /* status */
diff --git a/src/statcmd.c b/src/statcmd.c
index 0cacc44b3..6d44455f9 100644
--- a/src/statcmd.c
+++ b/src/statcmd.c
@@ -123,7 +123,7 @@ path_cleanup(const char *path)
char *new_path = m_strdup(path);
path_rtrim_slash_slashdot(new_path);
- if (strcmp(path, new_path) != 0)
+ if (opt_verbose && strcmp(path, new_path) != 0)
warning(_("stripping trailing /"));
return new_path;
@@ -170,16 +170,10 @@ statdb_node_remove(const char *filename)
static void
statdb_node_apply(const char *filename, struct filestatoverride *filestat)
{
- if (access(filename, F_OK) != 0) {
- warning(_("--update given but %s does not exist"), filename);
- } else {
- if (chown(filename, filestat->uid, filestat->gid) < 0)
- warning(_("failed to chown %s: %s"), filename,
- strerror(errno));
- if (chmod(filename, filestat->mode))
- warning(_("failed to chmod %s: %s"), filename,
- strerror(errno));
- }
+ if (chown(filename, filestat->uid, filestat->gid) < 0)
+ ohshite(_("error setting ownership of `%.255s'"), filename);
+ if (chmod(filename, filestat->mode))
+ ohshite(_("error setting permissions of `%.255s'"), filename);
}
static void
@@ -284,8 +278,13 @@ statoverride_add(const char *const *argv)
*filestat = statdb_node_new(user, group, mode);
- if (opt_update)
- statdb_node_apply(filename, *filestat);
+ if (opt_update) {
+ if (access(filename, F_OK) == 0)
+ statdb_node_apply(filename, *filestat);
+ else if (opt_verbose)
+ warning(_("--update given but %s does not exist"),
+ filename);
+ }
statdb_write();
@@ -306,14 +305,15 @@ statoverride_remove(const char *const *argv)
filename = path_cleanup(path);
if (!statdb_node_remove(filename)) {
- warning(_("No override present."));
+ if (opt_verbose)
+ warning(_("No override present."));
if (opt_force)
exit(0);
else
exit(2);
}
- if (opt_update)
+ if (opt_update && opt_verbose)
warning(_("--update is useless for --remove"));
statdb_write();