summaryrefslogtreecommitdiffstats
path: root/src/at/deb-fields.at
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commitcbffab246997fb5a06211dfb706b54e5ae5bb59f (patch)
tree0573c5d96f58d74d76a49c0f2a70398e389a36d3 /src/at/deb-fields.at
parentInitial commit. (diff)
downloaddpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.tar.xz
dpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.zip
Adding upstream version 1.21.22.upstream/1.21.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/at/deb-fields.at')
-rw-r--r--src/at/deb-fields.at47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/at/deb-fields.at b/src/at/deb-fields.at
new file mode 100644
index 0000000..484ccb7
--- /dev/null
+++ b/src/at/deb-fields.at
@@ -0,0 +1,47 @@
+AT_SETUP([dpkg-deb .deb fields])
+AT_KEYWORDS([dpkg-deb deb fields])
+
+DPKG_GEN_CONTROL([pkg-package-type-void])
+AT_CHECK([
+dpkg-deb -b pkg-package-type-void
+# Test absence of Package-Type field.
+test -z "$(dpkg-deb -f pkg-package-type-void.deb Package-Type)"
+], [0], [ignore])
+
+DPKG_GEN_CONTROL([pkg-package-type-use])
+DPKG_MOD_CONTROL([pkg-package-type-use], [/^Package:/aPackage-Type: udeb])
+AT_CHECK([
+dpkg-deb -b pkg-package-type-use
+# Test presence of Package-Type field.
+test -n "$(dpkg-deb -f pkg-package-type-use.deb Package-Type)"
+], [0], [ignore])
+
+DPKG_GEN_CONTROL([pkg-obsolete-fields])
+DPKG_MOD_CONTROL([pkg-obsolete-fields], [s/^Priority:/Class:/])
+DPKG_MOD_CONTROL([pkg-obsolete-fields], [s/^Version: 0.0-1/Version: 0.0/])
+DPKG_MOD_CONTROL([pkg-obsolete-fields], [/^Version:/aRevision: 1])
+DPKG_MOD_CONTROL([pkg-obsolete-fields], [/^Package:/aOptional: suggests])
+DPKG_MOD_CONTROL([pkg-obsolete-fields], [/^Package:/aRecommended: recommends])
+AT_CHECK([
+dpkg-deb -b pkg-obsolete-fields
+], [0], [ignore],
+[dpkg-deb: warning: parsing file 'pkg-obsolete-fields/DEBIAN/control' near line 2 package 'pkg-obsolete-fields':
+ obsolete 'Recommended' field used
+dpkg-deb: warning: parsing file 'pkg-obsolete-fields/DEBIAN/control' near line 3 package 'pkg-obsolete-fields':
+ obsolete 'Optional' field used
+dpkg-deb: warning: parsing file 'pkg-obsolete-fields/DEBIAN/control' near line 5 package 'pkg-obsolete-fields':
+ obsolete 'Revision' field used
+dpkg-deb: warning: parsing file 'pkg-obsolete-fields/DEBIAN/control' near line 7 package 'pkg-obsolete-fields':
+ obsolete 'Class' field used
+dpkg-deb: warning: ignoring 4 warnings about the control file(s)
+])
+AT_CHECK([
+dpkg-deb -f pkg-obsolete-fields.deb \
+ Version Recommends Suggests Priority 2>/dev/null
+], [0], [Version: 0.0-1
+Recommends: recommends
+Suggests: suggests
+Priority: extra
+])
+
+AT_CLEANUP